light up error lamp if modbus connection is lost

This commit is contained in:
2022-03-30 16:16:42 +02:00
parent 56ff8260a1
commit b21076ce2b

View File

@@ -1,4 +1,6 @@
#include <avrIOhelper/io-helper.h>
#include "kraftsensor.h"
#include "avrIOhelper/io-helper.h"
#include <stdio.h>
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);
}