works now?
This commit is contained in:
@@ -16,18 +16,18 @@ 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):
|
||||
Item(output_gpio_interface, address, i2c_address, data_pin, name),
|
||||
Solenoid::Solenoid(std::shared_ptr<utility::IOutputGPIOInterface> output_gpio_interface, uint8_t address, std::string name, std::chrono::milliseconds deactivation_time):
|
||||
Item(output_gpio_interface, address, name),
|
||||
deactivation_time(deactivation_time)
|
||||
{}
|
||||
|
||||
void Solenoid::triggerTask()
|
||||
{
|
||||
Item::activate();
|
||||
gpio_interface->activate(this);
|
||||
|
||||
std::this_thread::sleep_for(deactivation_time);
|
||||
|
||||
Item::deactivate();
|
||||
gpio_interface->deactivate(this);
|
||||
}
|
||||
|
||||
void Solenoid::trigger()
|
||||
|
||||
Reference in New Issue
Block a user