Enhanced the ATmega168 demo project to include WriteProperty service to the Analog Value and Device objects.

This commit is contained in:
skarg
2008-03-19 23:17:19 +00:00
parent fe0563f751
commit 944cb46e51
10 changed files with 52 additions and 36 deletions
+6
View File
@@ -27,6 +27,7 @@
#include <stdbool.h>
#include <stdint.h>
#include "hardware.h"
#include "bacdef.h"
#include "bacdcode.h"
#include "bacenum.h"
@@ -182,6 +183,11 @@ bool Analog_Value_Write_Property(
object_index =
Analog_Value_Instance_To_Index(wp_data->object_instance);
AV_Present_Value[object_index] = value.type.Real;
if ((AV_Present_Value[0] < 1.0) && (AV_Present_Value[0] > -1.0)) {
LED_GREEN_OFF();
} else {
LED_GREEN_ON();
}
status = true;
} else {
*error_class = ERROR_CLASS_PROPERTY;