Moved constants defining the number of each object back into the source files for the demo objects since the header files are currently common to all.
This commit is contained in:
@@ -35,6 +35,10 @@
|
||||
#include "ai.h"
|
||||
#include "handlers.h"
|
||||
|
||||
#ifndef MAX_ANALOG_INPUTS
|
||||
#define MAX_ANALOG_INPUTS 2
|
||||
#endif
|
||||
|
||||
static uint8_t Present_Value[MAX_ANALOG_INPUTS];
|
||||
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
#include "av.h"
|
||||
#include "handlers.h"
|
||||
|
||||
#ifndef MAX_ANALOG_VALUES
|
||||
#define MAX_ANALOG_VALUES 2
|
||||
#endif
|
||||
|
||||
static float Present_Value[MAX_ANALOG_VALUES];
|
||||
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
#include "bi.h"
|
||||
#include "handlers.h"
|
||||
|
||||
#ifndef MAX_BINARY_INPUTS
|
||||
#define MAX_BINARY_INPUTS 5
|
||||
#endif
|
||||
|
||||
static BACNET_BINARY_PV Present_Value[MAX_BINARY_INPUTS];
|
||||
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
|
||||
@@ -38,6 +38,10 @@
|
||||
#include "bo.h"
|
||||
#include "handlers.h"
|
||||
|
||||
#ifndef MAX_BINARY_OUTPUTS
|
||||
#define MAX_BINARY_OUTPUTS 2
|
||||
#endif
|
||||
|
||||
/* When all the priorities are level null, the present value returns */
|
||||
/* the Relinquish Default value */
|
||||
#define RELINQUISH_DEFAULT BINARY_INACTIVE
|
||||
|
||||
@@ -138,7 +138,7 @@ static void bacnet_task(
|
||||
/* handle the inputs */
|
||||
value = adc_result(7);
|
||||
Analog_Input_Present_Value_Set(0, value);
|
||||
for (i = 0; i < MAX_BINARY_INPUTS; i++) {
|
||||
for (i = 0; i < 5; i++) {
|
||||
button_value = input_button_value(i);
|
||||
if (button_value) {
|
||||
binary_value = BINARY_ACTIVE;
|
||||
|
||||
Reference in New Issue
Block a user