Index: firmware/App/Modes/TreatmentRecirc.c =================================================================== diff -u -r3135defd5053f5724eac7375ffd56ad1d129d5ae -r47d58f4762e487f2aa13affba3deccc6d2ae324f --- firmware/App/Modes/TreatmentRecirc.c (.../TreatmentRecirc.c) (revision 3135defd5053f5724eac7375ffd56ad1d129d5ae) +++ firmware/App/Modes/TreatmentRecirc.c (.../TreatmentRecirc.c) (revision 47d58f4762e487f2aa13affba3deccc6d2ae324f) @@ -460,8 +460,8 @@ { if ( ++recircPublishTimerCtr >= RECIRC_DATA_PUBLISH_INTERVAL ) { - U32 timeout = RECIRC_TIMEOUT / TASK_GENERAL_INTERVAL; - U32 countdown = ( recircTimerCtr >= RECIRC_TIMEOUT ? 0 : ( RECIRC_TIMEOUT - recircTimerCtr ) / TASK_GENERAL_INTERVAL ); + U32 timeout = RECIRC_TIMEOUT / ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ); + U32 countdown = ( recircTimerCtr >= RECIRC_TIMEOUT ? 0 : ( RECIRC_TIMEOUT - recircTimerCtr ) / ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ); recircPublishTimerCtr = 0; broadcastRecircData( timeout, countdown ); Index: firmware/App/Modes/TreatmentStop.c =================================================================== diff -u -r3135defd5053f5724eac7375ffd56ad1d129d5ae -r47d58f4762e487f2aa13affba3deccc6d2ae324f --- firmware/App/Modes/TreatmentStop.c (.../TreatmentStop.c) (revision 3135defd5053f5724eac7375ffd56ad1d129d5ae) +++ firmware/App/Modes/TreatmentStop.c (.../TreatmentStop.c) (revision 47d58f4762e487f2aa13affba3deccc6d2ae324f) @@ -230,8 +230,8 @@ { if ( ++stopPublishTimerCtr >= TREATMENT_STOP_DATA_PUBLISH_INTERVAL ) { - U32 timeout = MAX_TIME_BLOOD_SITTING / TASK_GENERAL_INTERVAL; - U32 countdown = ( bloodSittingTimerCtr >= MAX_TIME_BLOOD_SITTING ? 0 : ( MAX_TIME_BLOOD_SITTING - bloodSittingTimerCtr ) / TASK_GENERAL_INTERVAL ); + U32 timeout = MAX_TIME_BLOOD_SITTING / ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ); + U32 countdown = ( bloodSittingTimerCtr >= MAX_TIME_BLOOD_SITTING ? 0 : ( MAX_TIME_BLOOD_SITTING - bloodSittingTimerCtr ) / ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ); stopPublishTimerCtr = 0; broadcastTreatmentStopData( timeout, countdown );