minor changes

This commit is contained in:
Jonas Zeunert
2018-11-21 00:21:17 +01:00
parent ab6979ae63
commit 957f1f2334
8 changed files with 38 additions and 39 deletions

View File

@@ -18,7 +18,8 @@ namespace items
Sound::Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, int i2c_address, int data_pin, std::string name)
:
OutputItem(output_gpio_interface, i2c_address, data_pin, name)
OutputItem(output_gpio_interface, i2c_address, data_pin, name),
deactivation_time(deactivation_time)
{}
void Sound::play()
@@ -30,7 +31,7 @@ void Sound::playTask()
{
OutputItem::activate();
std::this_thread::sleep_for(50 /*todo change magic number */);
std::this_thread::sleep_for(deactivation_time);
OutputItem::deactivate();
}