fix: logger

This commit is contained in:
Tobias Reisinger 2020-04-24 15:08:26 +02:00
parent 61e025343d
commit db3bcaf7d1
28 changed files with 200 additions and 180 deletions
handlers

View file

@ -15,14 +15,14 @@
void
handler_loop(controller_t *controller)
{
LOG_DEBUG("===== IDLE LOOP START =====");
LOG_DEBUG("===== IDLE LOOP START =====\n");
for(uint_fast8_t i = 0; i < controller->relay_count; ++i)
{
relay_t *relay = controller->relays[i];
int is_active = 0;
if(relay_is_active(relay, time(NULL)))
{
LOG_DEBUG("relay %d is active", i);
LOG_DEBUG("relay %d is active\n", i);
is_active = 1;
}
if(global_config.relay_configs[i].inverted)
@ -38,7 +38,7 @@ handler_loop(controller_t *controller)
driver_piface_set(global_config.relay_configs[i].pin, is_active);
break;
default:
LOG_WARN("relay %d is not using a driver", i);
LOG_WARN("relay %d is not using a driver\n", i);
}
}
}