Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -r2acaf549519854f7e6de1511d541582267f4d1e8 -r9e85e7ace1390d48587174a5bc6eb11d5185cea4 --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 2acaf549519854f7e6de1511d541582267f4d1e8) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 9e85e7ace1390d48587174a5bc6eb11d5185cea4) @@ -116,6 +116,8 @@ #define PUMP_DIR_ERROR_COUNT_MASK 0x3F ///< Bit mask for pump direction error counter. +#define DATA_PUBLISH_COUNTER_START_COUNT 5 ///< Data publish counter start count. + /// Enumeration of dialysate inlet pump states. typedef enum DialInPump_States { @@ -147,7 +149,7 @@ // ********** private data ********** static DIAL_IN_PUMP_STATE_T dialInPumpState = DIAL_IN_PUMP_OFF_STATE; ///< Current state of dialIn flow controller state machine -static U32 dialInFlowDataPublicationTimerCounter = 5; ///< Used to schedule dialIn flow data publication to CAN bus +static U32 dialInFlowDataPublicationTimerCounter; ///< Used to schedule dialIn flow data publication to CAN bus static BOOL isDialInPumpOn = FALSE; ///< DialIn pump is currently running static F32 dialInPumpPWMDutyCyclePct = 0.0; ///< Initial dialIn pump PWM duty cycle static F32 dialInPumpPWMDutyCyclePctSet = 0.0; ///< Currently set dialIn pump PWM duty cycle @@ -222,6 +224,8 @@ void initDialInFlow( void ) { U32 i; + + dialInFlowDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; signalDialInPumpHardStop(); setDialInPumpDirection( MOTOR_DIR_FORWARD );