add: invert gpios

This commit is contained in:
Tobias Reisinger 2020-04-18 02:09:50 +02:00
parent 27df642ee6
commit 82f43080ac
5 changed files with 27 additions and 2 deletions
handlers

View file

@ -25,6 +25,10 @@ handler_loop(controller_t *controller)
LOG_DEBUG("relay %d is active", i);
is_active = 1;
}
if(global_config.relay_configs[i].inverted)
{
is_active = !is_active;
}
switch(global_config.relay_configs[i].driver)
{
case RELAY_DRIVER_GPIO: