Index: firmware/App/Monitors/Conductivity.h =================================================================== diff -u -r337136fc77fe5628fa727aac6252a06238561a10 -r44dbba513dffd7b1a997f873426407dbfc4163d1 --- firmware/App/Monitors/Conductivity.h (.../Conductivity.h) (revision 337136fc77fe5628fa727aac6252a06238561a10) +++ firmware/App/Monitors/Conductivity.h (.../Conductivity.h) (revision 44dbba513dffd7b1a997f873426407dbfc4163d1) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2024-2024 Diality Inc. - All Rights Reserved. +* Copyright (c) 2024-2025 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file Conductivity.h * -* @author (last) Sean Nash -* @date (last) 09-Nov-2024 +* @author (last) Michael Garthwaite +* @date (last) 25-Jul-2025 * * @author (original) Sean Nash * @date (original) 09-Nov-2024 @@ -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 ); /**@}*/