Corrected the COV lifetime to be seconds, not milliseconds.

This commit is contained in:
skarg
2008-01-14 22:03:15 +00:00
parent bfc5a52a6f
commit b698ba0cdd
6 changed files with 16 additions and 14 deletions
+6 -4
View File
@@ -107,6 +107,7 @@ int main(
unsigned timeout = 100; /* milliseconds */
time_t last_seconds = 0;
time_t current_seconds = 0;
uint32_t elapsed_seconds = 0;
uint32_t elapsed_milliseconds = 0;
char *pEnv = NULL;
@@ -178,11 +179,12 @@ int main(
npdu_handler(&src, &Rx_Buf[0], pdu_len);
}
/* at least one second has passed */
if (current_seconds != last_seconds) {
dcc_timer_seconds(current_seconds - last_seconds);
elapsed_seconds = current_seconds - last_seconds;
if (elapsed_seconds) {
dcc_timer_seconds(elapsed_seconds);
Load_Control_State_Machine_Handler();
elapsed_milliseconds = (current_seconds - last_seconds) * 1000;
handler_cov_task(elapsed_milliseconds);
elapsed_milliseconds = elapsed_seconds * 1000;
handler_cov_task(elapsed_seconds);
tsm_timer_milliseconds(elapsed_milliseconds);
}
/* output */