to string

This commit is contained in:
Jonas Zeunert
2018-09-20 21:29:35 +02:00
parent df546ca369
commit 934e64af57
2 changed files with 3 additions and 4 deletions

View File

@@ -6,7 +6,6 @@
"address" : 16, "address" : 16,
"priority" : 1 "priority" : 1
}, },
{ {
"name" : "Left outer exit canal", "name" : "Left outer exit canal",
"address" : 17, "address" : 17,

View File

@@ -43,12 +43,12 @@ void Detector::detect()
try try
{ {
auto event = events.at(address); auto event = events.at(address);
CLOG(INFO, INPUT_LOGGER) << "Found event " << event->name << "(" << event->address << ")."; CLOG(INFO, INPUT_LOGGER) << "Found event " << event->name << "(" << std::to_string(event->address) << ").";
event_notifier->distribute_event(event); event_notifier->distribute_event(event);
} }
catch(std::out_of_range& e) catch(std::out_of_range& e)
{ {
CLOG_N_TIMES(1, WARNING, INPUT_LOGGER) << "Did not found event for address: " << address << " check config-file"; CLOG_N_TIMES(1, WARNING, INPUT_LOGGER) << "Did not found event for address: " << std::to_string(address) << " check config-file";
} }
} }
} }
@@ -60,7 +60,7 @@ bool Detector::check_inputs(char& address)
{ {
if(input_gpio_interface->read_data(pin)) if(input_gpio_interface->read_data(pin))
{ {
CLOG(INFO, INPUT_LOGGER) << "Pin " << pin << " is triggered."; CLOG(INFO, INPUT_LOGGER) << "Pin " << std::to_string(pin) << " is triggered.";
address = pin; address = pin;
return true; return true;
} }