Corrected index offset for priority array when read one index at a time.

This commit is contained in:
skarg
2007-01-15 16:10:12 +00:00
parent 40582999b3
commit b36225149c
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -236,12 +236,12 @@ int Analog_Output_Encode_Property_APDU(uint8_t * apdu,
object_index =
Analog_Output_Instance_To_Index(object_instance);
if (array_index <= BACNET_MAX_PRIORITY) {
if (Analog_Output_Level[object_index][array_index] ==
if (Analog_Output_Level[object_index][array_index-1] ==
AO_LEVEL_NULL)
apdu_len = encode_tagged_null(&apdu[0]);
else {
real_value =
Analog_Output_Level[object_index][array_index];
Analog_Output_Level[object_index][array_index-1];
apdu_len = encode_tagged_real(&apdu[0], real_value);
}
} else {
+2 -2
View File
@@ -233,12 +233,12 @@ int Analog_Value_Encode_Property_APDU(uint8_t * apdu,
} else {
object_index = Analog_Value_Instance_To_Index(object_instance);
if (array_index <= BACNET_MAX_PRIORITY) {
if (Analog_Value_Level[object_index][array_index] ==
if (Analog_Value_Level[object_index][array_index-1] ==
ANALOG_LEVEL_NULL)
apdu_len = encode_tagged_null(&apdu[0]);
else {
real_value =
Analog_Value_Level[object_index][array_index];
Analog_Value_Level[object_index][array_index-1];
apdu_len = encode_tagged_real(&apdu[0], real_value);
}
} else {
+2 -2
View File
@@ -236,12 +236,12 @@ int Multistate_Output_Encode_Property_APDU(uint8_t * apdu,
object_index =
Multistate_Output_Instance_To_Index(object_instance);
if (array_index <= BACNET_MAX_PRIORITY) {
if (Multistate_Output_Level[object_index][array_index] ==
if (Multistate_Output_Level[object_index][array_index-1] ==
MULTISTATE_NULL)
apdu_len = encode_tagged_null(&apdu[0]);
else {
present_value =
Multistate_Output_Level[object_index][array_index];
Multistate_Output_Level[object_index][array_index-1];
apdu_len =
encode_tagged_unsigned(&apdu[0],
present_value);