Index: firmware/App/Monitors/Conductivity.h =================================================================== diff -u -r337136fc77fe5628fa727aac6252a06238561a10 -r5ad3da2cfc5014e6beebf3b67ef394a3a65426a0 --- firmware/App/Monitors/Conductivity.h (.../Conductivity.h) (revision 337136fc77fe5628fa727aac6252a06238561a10) +++ firmware/App/Monitors/Conductivity.h (.../Conductivity.h) (revision 5ad3da2cfc5014e6beebf3b67ef394a3a65426a0) @@ -31,21 +31,39 @@ // ********** public definitions ********** +#define RO_REJECTION_RATIO_OUT_OF_RANGE_VALUE 100.0F ///< Out of range value for RO rejection ratio when CPi conductivity is zero. + /// Conductivity data struct. typedef struct { F32 p9Conductivity; ///< (P9) conductivity sensor value F32 p18Conductivity; ///< (P18) conductivity sensor value } CONDUCTIVITY_DATA_T; +/// RO rejection ratio data struct. +typedef struct +{ + F32 rawRORejectionRatio; ///< ro rejection ratio during tank full and fill state + F32 rawRORejectionRatioTankFill; ///< ro rejection ratio during tank fill state + F32 avgRORejectionRatio; ///< ro rejection ratio average during tank full and fill state + F32 avgRORejectionRatioTankFill; ///< ro rejection ratio average during tank fill state + U32 genPermeateState; ///< permeate tank state +} RO_REJECTION_RATIO_DATA_T; + // ********** public function prototypes ********** void initConductivity( void ); void execConductivity( void ); F32 getFilteredConductivity( CONDUCTIVITY_SENSORS_T sensor ); F32 getFilteredConductivitySensorTemperature( CONDUCTIVITY_SENSORS_T sensor ); +F32 getRORejectonRatio( void ); +F32 getTankFillRORejectionRatio( void ); +F32 getRORRAverage( void ); +F32 getTankFillRORRAverage( void ); BOOL testConductivitySensorDataPublishIntervalOverride( MESSAGE_T *message ); +BOOL testRORejectionRatioDataPublishIntervalOverride( MESSAGE_T *message ); +BOOL testRORejectionRatioFilteredOverride( MESSAGE_T *message ); /**@}*/