Index: firmware/App/Controllers/BloodLeak.h =================================================================== diff -u -r967ea942b679788e09ff129686c63836cfe6609f -rca8a4a4cf6d2c59d9296c3abdf314765550a2624 --- firmware/App/Controllers/BloodLeak.h (.../BloodLeak.h) (revision 967ea942b679788e09ff129686c63836cfe6609f) +++ firmware/App/Controllers/BloodLeak.h (.../BloodLeak.h) (revision ca8a4a4cf6d2c59d9296c3abdf314765550a2624) @@ -7,8 +7,8 @@ * * @file BloodLeak.h * -* @author (last) Bill Bracken -* @date (last) 18-Oct-2023 +* @author (last) Dara Navaei +* @date (last) 06-Nov-2024 * * @author (original) Peman Montazemi * @date (original) 18-Mar-2021 @@ -39,7 +39,7 @@ BLOOD_LEAK_DETECTED = 0, ///< Blood leak detector senses blood. BLOOD_LEAK_NOT_DETECTED, ///< Blood leak detector does not sense any blood. NUM_OF_BLOOD_LEAK_STATUS ///< Number of blood leak detector status. -} BLOOD_LEAK_STATUS_T; +} BLOOD_LEAK_STATUS_T; /// Blood leak detector data publish typedef struct @@ -48,6 +48,12 @@ U32 bloodLeakState; ///< Blood leak detector state. U32 bloodLeakPersistentCounter; ///< Blood leak detector persistent counter. U32 bloodLeakSerialCommState; ///< Blood leak detector serial communication state. + U32 bloodLeakIntensity; ///< Blood leak detector intensity. + U32 bloodLeakDetect; ///< Blood leak detector detect. + F32 bloodLeakIntensityMovingAvg; ///< Blood leak detector intensity moving average. + U32 bloodLeakTimeSinceZeroMS; ///< Blood leak detector time since last zero in milliseconds. + U32 driftInRangeStatus; ///< Blood leak detector drift in range status. + U32 driftUpperRangeStatus; ///< Blood leak detector drift upper range status. } BLOOD_LEAK_DATA_T; // ********** public function prototypes ********** @@ -56,8 +62,9 @@ void execBloodLeak( void ); void execBloodLeakEmbModeCommand( void ); BOOL zeroBloodLeak( void ); -void zeroBloodLeakReset (void ); +void zeroBloodLeakReset( void ); BOOL hasBloodLeakZeroSequenceFailed( void ); +BOOL isBloodLeakZeroingNeeded( void ); void exitBloodLeakNormalState( void ); @@ -75,6 +82,15 @@ BOOL testSetBloodLeak2EmbeddedMode( void ); BOOL testSetBloodLeakEmbeddedModeCommand( U08 command, U16 setPointPayload ); +BOOL testSetBloodLeakEmbeddedModeInfoOverride( U08 command, U32 value ); +BOOL testResetBloodLeakEmbeddedModeInfoOverride( U08 command ); + +BOOL testSetBloodLeakIntensityMovingAverageOverride( F32 value ); +BOOL testResetBloodLeakIntensityMovingAverageOverride( void ); + +BOOL testSetBloodLeakZeroingIntervalInMinsOverride( BOOL upperRangeInterval, U32 valueMins ); +BOOL testResetBloodLeakZeroingIntervalInMinsOverride( BOOL upperRangeInterval ); + /**@}*/ #endif