From d53551558a723b9ec930c6c45d3a00c408a52a15 Mon Sep 17 00:00:00 2001 From: skarg Date: Tue, 11 Nov 2014 16:54:35 +0000 Subject: [PATCH] Merged revision(s) 2782 from branches/releases/bacnet-stack-0-8-0: Added initial names and descriptions to example multi-state value and multi-state input objects. ........ --- bacnet-stack/demo/object/ms-input.c | 4 +++- bacnet-stack/demo/object/msv.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bacnet-stack/demo/object/ms-input.c b/bacnet-stack/demo/object/ms-input.c index cae5982e..2239a73c 100644 --- a/bacnet-stack/demo/object/ms-input.c +++ b/bacnet-stack/demo/object/ms-input.c @@ -41,7 +41,7 @@ /* number of demo objects */ #ifndef MAX_MULTISTATE_INPUTS -#define MAX_MULTISTATE_INPUTS 1 +#define MAX_MULTISTATE_INPUTS 4 #endif /* how many states? 1 to 254 states - 0 is not allowed. */ @@ -103,6 +103,8 @@ void Multistate_Input_Init( /* initialize all the analog output priority arrays to NULL */ for (i = 0; i < MAX_MULTISTATE_INPUTS; i++) { Present_Value[i] = 1; + sprintf(&Object_Name[i][0], "MULTISTATE INPUT %u", i); + sprintf(&Object_Description[i][0], "MULTISTATE INPUT %u", i); } return; diff --git a/bacnet-stack/demo/object/msv.c b/bacnet-stack/demo/object/msv.c index a0d5f874..c6b0f0e1 100644 --- a/bacnet-stack/demo/object/msv.c +++ b/bacnet-stack/demo/object/msv.c @@ -97,11 +97,13 @@ void Multistate_Value_Property_Lists( void Multistate_Value_Init( void) { - unsigned i; + unsigned int i; /* initialize all the analog output priority arrays to NULL */ for (i = 0; i < MAX_MULTISTATE_VALUES; i++) { Present_Value[i] = 1; + sprintf(&Object_Name[i][0], "MULTISTATE VALUE %u", i); + sprintf(&Object_Description[i][0], "MULTISTATE VALUE %u", i); } return;