Index: firmware/App/Drivers/FluidPump.c =================================================================== diff -u -r311c75cc5ac41b4b9ca4983df84e43af910f9be4 -r71ea7fe082e92a86b737983e3fb51e6f37072560 --- firmware/App/Drivers/FluidPump.c (.../FluidPump.c) (revision 311c75cc5ac41b4b9ca4983df84e43af910f9be4) +++ firmware/App/Drivers/FluidPump.c (.../FluidPump.c) (revision 71ea7fe082e92a86b737983e3fb51e6f37072560) @@ -318,6 +318,61 @@ return pwmCnt; } +/*********************************************************************//** + * @brief + * The handleFluidPumpU32Data function checks the OVERRIDE_U32_T and sets + * the current data to 0 and resets the override if it is active. + * @details \b Inputs: None + * @details \b Outputs: None + * @param ovU32 pointer to an unsigned integer override record + * @return none + *************************************************************************/ +void handleFluidPumpU32Data( OVERRIDE_U32_T *ovU32) +{ + if ( ovU32->data > 0 ) + { + if ( ovU32->override != OVERRIDE_RESET ) + { + ovU32->ovData = 0; + ovU32->override = OVERRIDE_RESET; + ovU32->data = 0; + } + else if ( ovU32->ovInitData == 0 ) + { + ovU32->ovInitData = ovU32->data; + ovU32->data = 0; + } + } +} + +/*********************************************************************//** + * @brief + * The handleFluidPumpF32Data function checks the OVERRIDE_F32_T and sets + * the current data to 0 and resets the override if it is active. + * @details \b Inputs: None + * @details \b Outputs: None + * @param ovF32 pointer to an floating point override record + * @return none + *************************************************************************/ +void handleFluidPumpF32Data( OVERRIDE_F32_T *ovF32) +{ + if ( ovF32->data > 0.0F ) + { + if ( ovF32->override != OVERRIDE_RESET ) + { + ovF32->ovData = 0.0F; + ovF32->override = OVERRIDE_RESET; + ovF32->data = 0.0F; + } + else if ( ovF32->ovInitData == 0.0F ) + { + ovF32->ovInitData = ovF32->data; + ovF32->data = 0.0F; + } + } +} + + /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/