fix: relays in on mode on start

This commit is contained in:
Tobias Reisinger 2020-07-02 02:40:23 +02:00
parent 79bf436a01
commit 03b1cb857e
2 changed files with 2 additions and 1 deletions

View file

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7) cmake_minimum_required (VERSION 3.7)
project(controller project(controller
VERSION 0.2.2 VERSION 0.2.3
LANGUAGES C) LANGUAGES C)
add_executable(controller src/main.c) add_executable(controller src/main.c)

View file

@ -125,6 +125,7 @@ main(int argc, const char** argv)
if(global_config.relay_configs[i].driver == RELAY_DRIVER_GPIO) if(global_config.relay_configs[i].driver == RELAY_DRIVER_GPIO)
{ {
pinMode(global_config.relay_configs[i].pin, OUTPUT); pinMode(global_config.relay_configs[i].pin, OUTPUT);
digitalWrite(global_config.relay_configs[i].pin, global_config.relay_configs[i].inverted);
} }
} }