Corrected test application writes to Binary Output object. Corrected BACnet task to use Binary Output to control LEDs.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "rs485.h"
|
||||
#include "input.h"
|
||||
#include "adc.h"
|
||||
#include "led.h"
|
||||
/* BACnet Stack includes */
|
||||
#include "datalink.h"
|
||||
#include "npdu.h"
|
||||
@@ -144,6 +145,16 @@ void bacnet_task(
|
||||
}
|
||||
Binary_Input_Present_Value_Set(i, binary_value);
|
||||
}
|
||||
if (Binary_Output_Present_Value(0) == BINARY_ACTIVE) {
|
||||
led_on(LED_3);
|
||||
} else {
|
||||
led_off(LED_3);
|
||||
}
|
||||
if (Binary_Output_Present_Value(1) == BINARY_ACTIVE) {
|
||||
led_on(LED_4);
|
||||
} else {
|
||||
led_off(LED_4);
|
||||
}
|
||||
/* handle the communication timer */
|
||||
if (timer_interval_expired(&DCC_Timer)) {
|
||||
timer_interval_reset(&DCC_Timer);
|
||||
|
||||
Reference in New Issue
Block a user