Fixed errors in compile.

This commit is contained in:
skarg
2007-01-19 21:59:38 +00:00
parent 6864a32d22
commit 5aee2513fa
2 changed files with 10 additions and 7 deletions
+2 -2
View File
@@ -485,8 +485,8 @@ void bacapp_set_datetime_values(BACNET_DATE_TIME * bdatetime,
bdatetime->date.day = day; bdatetime->date.day = day;
bdatetime->date.wday = wday; bdatetime->date.wday = wday;
bdatetime->time.hour = hour; bdatetime->time.hour = hour;
bdatetime->time.min = min; bdatetime->time.min = minute;
bdatetime->time.sec = sec; bdatetime->time.sec = seconds;
bdatetime->time.hundredths = hundredths; bdatetime->time.hundredths = hundredths;
} }
} }
+8 -5
View File
@@ -221,6 +221,7 @@ void Load_Control_State_Machine_Handler(int object_index)
{ {
static LOAD_CONTROL_STATE state[MAX_LOAD_CONTROLS]; static LOAD_CONTROL_STATE state[MAX_LOAD_CONTROLS];
static initialized = false; static initialized = false;
unsigned i = 0; /* loop counter */
if (!initialized) { if (!initialized) {
initialized = true; initialized = true;
@@ -229,7 +230,7 @@ void Load_Control_State_Machine_Handler(int object_index)
} }
} }
switch (state) switch (state[object_index])
{ {
case SHED_REQUEST_PENDING: case SHED_REQUEST_PENDING:
/* CancelShed */ /* CancelShed */
@@ -267,7 +268,7 @@ void Load_Control_State_Machine_Handler(int object_index)
Requested_Shed_Level[object_index].value.level; Requested_Shed_Level[object_index].value.level;
break; break;
} }
state = SHED_REQUEST_PENDING; state[object_index] = SHED_REQUEST_PENDING;
} }
break; break;
} }
@@ -278,9 +279,11 @@ void Load_Control_State_Machine_Handler(int object_index)
/* call every second or so */ /* call every second or so */
void Load_Control_State_Machine(void) void Load_Control_State_Machine(void)
{ {
for (i = 0; i < MAX_LOAD_CONTROLS; i++) { unsigned i = 0;
Load_Control_State_Machine_Handler(i);
} for (i = 0; i < MAX_LOAD_CONTROLS; i++) {
Load_Control_State_Machine_Handler(i);
}
} }
/* return apdu len, or -1 on error */ /* return apdu len, or -1 on error */