light up error lamp if modbus connection is lost
This commit is contained in:
12
notaus.c
12
notaus.c
@@ -1,4 +1,6 @@
|
|||||||
#include <avrIOhelper/io-helper.h>
|
#include "kraftsensor.h"
|
||||||
|
#include "avrIOhelper/io-helper.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
void do_notaus(){
|
void do_notaus(){
|
||||||
if(!read_Input(IN_NOTAUS_ANLAGE, LEVEL) || read_Input(IN_NOTAUS_SCHRANK, LEVEL) || read_Input(IN_NOTAUS_DISPLAY, LEVEL)){
|
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_SCHRANK, OFF);
|
||||||
set_Output(LED_ROT_NOTAUS_DISPLAY, OFF);
|
set_Output(LED_ROT_NOTAUS_DISPLAY, OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!kraftsensor_valid)
|
||||||
|
{
|
||||||
|
set_Output(LED_FEHLER, ON);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
set_Output(LED_FEHLER, OFF);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user