From 03b1cb857ead5a6f0c9ef1d9b046cb42fcabb98f Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Thu, 2 Jul 2020 02:40:23 +0200 Subject: [PATCH] fix: relays in on mode on start --- CMakeLists.txt | 2 +- src/main.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b700667..48f8dd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project(controller - VERSION 0.2.2 + VERSION 0.2.3 LANGUAGES C) add_executable(controller src/main.c) diff --git a/src/main.c b/src/main.c index 1c64695..4736efe 100644 --- a/src/main.c +++ b/src/main.c @@ -125,6 +125,7 @@ main(int argc, const char** argv) if(global_config.relay_configs[i].driver == RELAY_DRIVER_GPIO) { pinMode(global_config.relay_configs[i].pin, OUTPUT); + digitalWrite(global_config.relay_configs[i].pin, global_config.relay_configs[i].inverted); } }