From b21076ce2b651cb181a0a6c155d785fde250d3d5 Mon Sep 17 00:00:00 2001 From: Eggert Jung Date: Wed, 30 Mar 2022 16:16:42 +0200 Subject: [PATCH] light up error lamp if modbus connection is lost --- notaus.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/notaus.c b/notaus.c index cccc8f6..eb9225b 100644 --- a/notaus.c +++ b/notaus.c @@ -1,4 +1,6 @@ -#include +#include "kraftsensor.h" +#include "avrIOhelper/io-helper.h" +#include void do_notaus(){ if(!read_Input(IN_NOTAUS_ANLAGE, LEVEL) || read_Input(IN_NOTAUS_SCHRANK, LEVEL) || read_Input(IN_NOTAUS_DISPLAY, LEVEL)){ @@ -58,6 +60,14 @@ void do_notaus(){ set_Output(LED_ROT_NOTAUS_SCHRANK, OFF); set_Output(LED_ROT_NOTAUS_DISPLAY, OFF); } + + if(!kraftsensor_valid) + { + set_Output(LED_FEHLER, ON); + } + else + set_Output(LED_FEHLER, OFF); + }