From d82a6219f0682eef1e4b88adb8679eb66124c221 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Thu, 27 Aug 2020 12:01:49 +0200 Subject: [PATCH] fix: forgot pulse condition --- CMakeLists.txt | 2 +- src/handlers/loop.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec9f33a..9d07b24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required (VERSION 3.7) project(controller - VERSION 0.3.5 + VERSION 0.3.6 LANGUAGES C) add_executable(controller src/main.c) diff --git a/src/handlers/loop.c b/src/handlers/loop.c index 035e462..f121bcd 100644 --- a/src/handlers/loop.c +++ b/src/handlers/loop.c @@ -38,7 +38,7 @@ handler_loop(struct mg_connection *c_mqtt) if(is_on_schedule) { - if(pulse_relay) + if(pulse_relay && relay->pulse_timer) { is_on = 1; --relay->pulse_timer;