added debug logging

This commit is contained in:
Jonas Zeunert
2018-09-20 20:31:38 +02:00
parent e450e9c664
commit 17ed977e5e
2 changed files with 9 additions and 8 deletions

View File

@@ -43,6 +43,7 @@ void Detector::detect()
try
{
auto event = events.at(address);
CLOG(DEBUG, OUTPUT_LOGGER) << "Found event " << event->name << "(" << event->address << ").";
event_notifier->distribute_event(event);
}
catch(std::out_of_range& e)
@@ -55,11 +56,11 @@ void Detector::detect()
bool Detector::check_inputs(char& address)
{
//todo
for(char pin = 0; pin < (INPUT_MATRIX_SIZE * INPUT_MATRIX_SIZE); pin++)
{
if(input_gpio_interface->read_data(pin))
{
CLOG(DEBUG, OUTPUT_LOGGER) << "Pin " << pin << " is triggered.";
address = pin;
return true;
}