detector stuff
This commit is contained in:
@@ -26,8 +26,10 @@ Detector::~Detector()
|
|||||||
is_running = false;
|
is_running = false;
|
||||||
|
|
||||||
detect_thread.join();
|
detect_thread.join();
|
||||||
|
|
||||||
delete this->input_gpio_interface;
|
delete this->input_gpio_interface;
|
||||||
this->input_gpio_interface = NULL;
|
this->input_gpio_interface = NULL;
|
||||||
|
|
||||||
delete this->event_notifier;
|
delete this->event_notifier;
|
||||||
this->event_notifier = NULL;
|
this->event_notifier = NULL;
|
||||||
}
|
}
|
||||||
@@ -55,7 +57,7 @@ void Detector::detect()
|
|||||||
|
|
||||||
bool Detector::check_inputs(char& address)
|
bool Detector::check_inputs(char& address)
|
||||||
{
|
{
|
||||||
for(int pin = 0; pin < MATRIX_SIZE * MATRIX_SIZE; pin++)
|
for(int pin = 0; pin < (INPUT_MATRIX_SIZE * INPUT_MATRIX_SIZE); pin++)
|
||||||
{
|
{
|
||||||
if(input_gpio_interface->read_input_data(pin))
|
if(input_gpio_interface->read_input_data(pin))
|
||||||
{
|
{
|
||||||
@@ -64,7 +66,6 @@ bool Detector::check_inputs(char& address)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#define SRC_INPUT_INPUTDRIVER_HPP_
|
#define SRC_INPUT_INPUTDRIVER_HPP_
|
||||||
|
|
||||||
#include "EventHandler.hpp"
|
#include "EventHandler.hpp"
|
||||||
|
|
||||||
namespace Input
|
namespace Input
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user