made activation state more clear
This commit is contained in:
@@ -16,7 +16,7 @@ namespace flippR_driver
|
||||
namespace input
|
||||
{
|
||||
|
||||
Detector::Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::vector<std::shared_ptr<DistributingEvent>>& events) :
|
||||
Detector::Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::vector<std::shared_ptr<DistributingEvent>> events) :
|
||||
input_gpio_interface(std::move(input_gpio_interface)), events(std::move(events)), is_running(true)
|
||||
{
|
||||
this->detect_thread = std::thread(&Detector::detect, this);
|
||||
|
||||
@@ -34,8 +34,8 @@ class Detector : public IDetector
|
||||
{
|
||||
|
||||
public:
|
||||
Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::vector<std::shared_ptr<DistributingEvent>>& events);
|
||||
~Detector();
|
||||
Detector(std::unique_ptr<IInputGPIOInterface> input_gpio_interface, std::vector<std::shared_ptr<DistributingEvent>> events);
|
||||
~Detector() override;
|
||||
|
||||
private:
|
||||
void detect();
|
||||
|
||||
@@ -23,7 +23,7 @@ void flippR_driver::input::DistributingEvent::active()
|
||||
{
|
||||
if(activation_state != ACTIVATED)
|
||||
{
|
||||
activation_state = static_cast<ActivationState>(static_cast<int>(activation_state) + 1);
|
||||
activation_state = activation_state == NOT_ACTIVATED ? FIRST_ACTIVATED : ACTIVATED;
|
||||
}
|
||||
|
||||
last_activation = std::chrono::high_resolution_clock::now();
|
||||
|
||||
@@ -25,7 +25,7 @@ class DisplayController : public IDisplayController
|
||||
{
|
||||
public:
|
||||
explicit DisplayController(std::vector<std::shared_ptr<items::IDisplay>> displays, std::shared_ptr<IOutputGPIOInterface> output_gpio_interface);
|
||||
~DisplayController();
|
||||
~DisplayController() override;
|
||||
|
||||
private:
|
||||
void cycle_displays();
|
||||
|
||||
Reference in New Issue
Block a user