reafectored stuff and corrected shit to make everything compiling

This commit is contained in:
Johannes Wendel
2018-11-21 10:30:04 +01:00
parent d2379868ec
commit 03dc3c61ce
26 changed files with 183 additions and 144 deletions

View File

@@ -7,7 +7,7 @@
#include "Sound.h"
#include <future>
#include <thread>
namespace flippR_driver
{
@@ -16,15 +16,14 @@ namespace output
namespace items
{
Sound::Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int address, unsigned int i2c_address, unsigned int data_pin, std::string name)
:
OutputItem(output_gpio_interface, address, i2c_address, data_pin, name),
deactivation_time(deactivation_time)
Sound::Sound(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, unsigned int address, unsigned int i2c_address, unsigned int data_pin, std::string name, std::chrono::milliseconds deactivation_time) :
OutputItem(output_gpio_interface, address, i2c_address, data_pin, name),
deactivation_time(deactivation_time)
{}
void Sound::play()
{
std::async(std::launch::async, &Sound::playTask);
this->play_task = std::async(std::launch::async, &Sound::playTask, this);
}
void Sound::playTask()