fix: forgot pulse condition

This commit is contained in:
Tobias Reisinger 2020-08-27 12:01:49 +02:00
parent 14f93e44ce
commit d82a6219f0
2 changed files with 2 additions and 2 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.3.5 VERSION 0.3.6
LANGUAGES C) LANGUAGES C)
add_executable(controller src/main.c) add_executable(controller src/main.c)

View file

@ -38,7 +38,7 @@ handler_loop(struct mg_connection *c_mqtt)
if(is_on_schedule) if(is_on_schedule)
{ {
if(pulse_relay) if(pulse_relay && relay->pulse_timer)
{ {
is_on = 1; is_on = 1;
--relay->pulse_timer; --relay->pulse_timer;