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,6 +7,8 @@
#include "Solenoid.h"
#include <thread>
namespace flippR_driver
{
namespace output
@@ -14,10 +16,9 @@ namespace output
namespace items
{
Solenoid::Solenoid(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)
Solenoid::Solenoid(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 Solenoid::triggerTask()
@@ -31,7 +32,7 @@ void Solenoid::triggerTask()
void Solenoid::trigger()
{
std::async(std::launch::async, &Solenoid::triggerTask);
this->trigger_task = std::async(std::launch::async, &Solenoid::triggerTask, this);
}
}