Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -r2acaf549519854f7e6de1511d541582267f4d1e8 -r9e85e7ace1390d48587174a5bc6eb11d5185cea4 --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 2acaf549519854f7e6de1511d541582267f4d1e8) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 9e85e7ace1390d48587174a5bc6eb11d5185cea4) @@ -123,6 +123,7 @@ #define BP_FLOW_WEAR_A_TERM 0.000000001 ///< A term used for wear portion of alpha flow coefficient. #define BP_FLOW_WEAR_B_TERM 0.00055 ///< B term used for wear portion of alpha flow coefficient. #define BP_MAX_ROTOR_COUNT_FOR_WEAR 25000 ///< Maximum rotor count for determining wear of the cartridge (negligible affect beyond this threshold). +#define DATA_PUBLISH_COUNTER_START_COUNT 9 ///< Data publish counter start count. /// Enumeration of blood pump controller states. typedef enum BloodPump_States @@ -155,7 +156,7 @@ // ********** private data ********** static BLOOD_PUMP_STATE_T bloodPumpState = BLOOD_PUMP_OFF_STATE; ///< Current state of blood flow controller state machine -static U32 bloodFlowDataPublicationTimerCounter = 0; ///< Used to schedule blood flow data publication to CAN bus +static U32 bloodFlowDataPublicationTimerCounter; ///< Used to schedule blood flow data publication to CAN bus static BOOL isBloodPumpOn = FALSE; ///< Blood pump is currently running static F32 bloodPumpPWMDutyCyclePct = 0.0; ///< Initial blood pump PWM duty cycle static F32 bloodPumpPWMDutyCyclePctSet = 0.0; ///< Currently set blood pump PWM duty cycle @@ -220,12 +221,14 @@ * @brief * The initBloodFlow function initializes the BloodFlow module. * @details Inputs: none - * @details Outputs: BloodFlow module initialized. + * @details Outputs: bloodFlowDataPublicationTimerCounter * @return none *************************************************************************/ void initBloodFlow( void ) { U32 i; + + bloodFlowDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; signalBloodPumpHardStop(); setBloodPumpDirection( MOTOR_DIR_FORWARD );