working on item rewrite
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "Lamp.h"
|
||||
|
||||
#include <output/DriverBoardPinController.h>
|
||||
#include "utility/config.h"
|
||||
|
||||
namespace flippR_driver
|
||||
@@ -19,7 +20,7 @@ namespace detail
|
||||
{
|
||||
|
||||
Lamp::Lamp(std::shared_ptr<DriverBoardPinController> pin_controller, uint8_t address, std::string name) :
|
||||
DriverBoardItem(std::move(pin_controller), address, std::move(name)), activated(false)
|
||||
detail::Item(std::move(name)), DriverBoardItem(std::move(pin_controller), address), activated(false)
|
||||
{
|
||||
CLOG(INFO, OUTPUT_LOGGER) << "Created lamp " << name << " with address " << address;
|
||||
}
|
||||
@@ -27,13 +28,13 @@ DriverBoardItem(std::move(pin_controller), address, std::move(name)), activated(
|
||||
void Lamp::activate()
|
||||
{
|
||||
CLOG(INFO, OUTPUT_LOGGER) << "Activate lamp " << name;
|
||||
pin_controller->activate(*this);
|
||||
this->pin_controller->activate(*this);
|
||||
}
|
||||
|
||||
void Lamp::deactivate()
|
||||
{
|
||||
CLOG(INFO, OUTPUT_LOGGER) << "Deactivate lamp " << name;
|
||||
pin_controller->deactivate(*this);
|
||||
this->pin_controller->deactivate(*this);
|
||||
}
|
||||
|
||||
bool Lamp::is_activated()
|
||||
|
||||
Reference in New Issue
Block a user