Index: firmware/App/Controllers/BalancingChamber.c =================================================================== diff -u -rdc451e960ab328d05a06137ffdc4d8b2b1601d55 -re7e698ed85055dd286e8c0501a582ff66d601590 --- firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision dc451e960ab328d05a06137ffdc4d8b2b1601d55) +++ firmware/App/Controllers/BalancingChamber.c (.../BalancingChamber.c) (revision e7e698ed85055dd286e8c0501a582ff66d601590) @@ -7,8 +7,8 @@ * * @file BalancingChamber.c * -* @author (last) Jashwant Gantyada -* @date (last) 21-May-2026 +* @author (last) Vinayakam Mani +* @date (last) 01-Jun-2026 * * @author (original) Vinayakam Mani * @date (original) 28-Jan-2025 @@ -781,7 +781,8 @@ // Check both spent and fresh side fill is complete isBothFillsComplete = ( ( TRUE == isSpentFillComplete ) && ( TRUE == isPressureStabilizedDuringFill ) ) ? TRUE : FALSE; - isFirstCycleNotDone = ( FALSE == isFirstCycleBCSwitchingCompleted ) && ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ); + isFirstCycleNotDone = ( ( FALSE == isFirstCycleBCSwitchingCompleted ) && + ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) ) ? TRUE : FALSE; if ( FALSE == getBalChamberSwitchingOnlyStatus() ) { @@ -1052,7 +1053,8 @@ // Check switching cycle time or pressure check for valve closure isBothFillsComplete = ( ( TRUE == isSpentFillComplete ) && ( TRUE == isPressureStabilizedDuringFill ) ) ? TRUE : FALSE; - isFirstCycleNotDone = ( ( FALSE == isFirstCycleBCSwitchingCompleted ) && ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) ); + isFirstCycleNotDone = ( ( FALSE == isFirstCycleBCSwitchingCompleted ) && + ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) ) ? TRUE : FALSE; if ( FALSE == getBalChamberSwitchingOnlyStatus() ) { @@ -1392,7 +1394,7 @@ } } - //Update spent fill is complete + //Update spent fill is complete if ( currentBalChamberSwitchingCounter >= balChamberValveClosePeriod ) { isSpentFillComplete = TRUE; Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -rb085a36e252a01504b415bf145e4b1fc129cdcdf -re7e698ed85055dd286e8c0501a582ff66d601590 --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision b085a36e252a01504b415bf145e4b1fc129cdcdf) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision e7e698ed85055dd286e8c0501a582ff66d601590) @@ -7,8 +7,8 @@ * * @file Heaters.c * -* @author (last) Sameer Kalliadan Poyil -* @date (last) 27-Apr-2026 +* @author (last) Vinayakam Mani +* @date (last) 28-May-2026 * * @author (original) Vinayakam Mani * @date (original) 11-Oct-2024 Index: firmware/App/Controllers/Ultrafiltration.c =================================================================== diff -u -r87ee9712a928c58e3fe8b456bce567df0c6a2038 -re7e698ed85055dd286e8c0501a582ff66d601590 --- firmware/App/Controllers/Ultrafiltration.c (.../Ultrafiltration.c) (revision 87ee9712a928c58e3fe8b456bce567df0c6a2038) +++ firmware/App/Controllers/Ultrafiltration.c (.../Ultrafiltration.c) (revision e7e698ed85055dd286e8c0501a582ff66d601590) @@ -8,7 +8,7 @@ * @file Ultrafiltration.c * * @author (last) Vinayakam Mani -* @date (last) 14-Apr-2026 +* @date (last) 06-May-2026 * * @author (original) Vinayakam Mani * @date (original) 28-Jul-2025 Index: firmware/App/DDCommon.h =================================================================== diff -u -r9250f4859cf368aa58e74bf9679ac68461125591 -re7e698ed85055dd286e8c0501a582ff66d601590 --- firmware/App/DDCommon.h (.../DDCommon.h) (revision 9250f4859cf368aa58e74bf9679ac68461125591) +++ firmware/App/DDCommon.h (.../DDCommon.h) (revision e7e698ed85055dd286e8c0501a582ff66d601590) @@ -7,8 +7,8 @@ * * @file DDCommon.h * -* @author (last) Jashwant Gantyada -* @date (last) 22-May-2026 +* @author (last) Vinayakam Mani +* @date (last) 29-May-2026 * * @author (original) Vinayakam Mani * @date (original) 07-Aug-2024 Index: firmware/App/Drivers/ConductivitySensors.c =================================================================== diff -u -rdc451e960ab328d05a06137ffdc4d8b2b1601d55 -re7e698ed85055dd286e8c0501a582ff66d601590 --- firmware/App/Drivers/ConductivitySensors.c (.../ConductivitySensors.c) (revision dc451e960ab328d05a06137ffdc4d8b2b1601d55) +++ firmware/App/Drivers/ConductivitySensors.c (.../ConductivitySensors.c) (revision e7e698ed85055dd286e8c0501a582ff66d601590) @@ -890,6 +890,60 @@ /*********************************************************************//** * @brief + * The getConductivityRawResistance function gets the raw conductivity resistance + * value for a given conductivity sensor id. + * @details \b Inputs: conductivitySensorStatus[] + * @details \b Outputs: none + * @details \b Alarm: ALARM_ID_DD_SOFTWARE_FAULT if given sensor is invalid. + * @param sensorId conductivity sensor id + * @return temperature value + *************************************************************************/ +F32 getConductivityRawResistance( CONDUCTIVITY_SENSORS_T sensor ) +{ + F32 result = 0.0F; + + if ( sensor < NUM_OF_CONDUCTIVITY_SENSORS ) + { + result = conductivitySensorStatus[ sensor ].rawResistance; + + } + else + { + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_INVALID_CONDUCTIVITY_SENSOR_ID1, sensor ) + } + + return result; +} + +/*********************************************************************//** + * @brief + * The getConductivityRawRTD function gets the raw RTD resistance + * value for a given conductivity sensor id. + * @details \b Inputs: conductivitySensorStatus[] + * @details \b Outputs: none + * @details \b Alarm: ALARM_ID_DD_SOFTWARE_FAULT if given sensor is invalid. + * @param sensorId conductivity sensor id + * @return temperature value + *************************************************************************/ +F32 getConductivityRawRTD( CONDUCTIVITY_SENSORS_T sensor ) +{ + F32 result = 0.0F; + + if ( sensor < NUM_OF_CONDUCTIVITY_SENSORS ) + { + result = conductivitySensorStatus[ sensor ].rawTemperature; + + } + else + { + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_INVALID_CONDUCTIVITY_SENSOR_ID1, sensor ) + } + + return result; +} + +/*********************************************************************//** + * @brief * The calculateConductivityUpdatedStandard function calculates the conductivity value. * @details \b Inputs: conductivitySensorCoefficients - Conductivity Coefficients * @details \b Inputs: conductivitySensorStatus - Raw measurement values Index: firmware/App/Modes/ModeGenDialysate.c =================================================================== diff -u -rdc451e960ab328d05a06137ffdc4d8b2b1601d55 -re7e698ed85055dd286e8c0501a582ff66d601590 --- firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision dc451e960ab328d05a06137ffdc4d8b2b1601d55) +++ firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision e7e698ed85055dd286e8c0501a582ff66d601590) @@ -7,8 +7,8 @@ * * @file ModeGenDialysate.c * -* @author (last) Jashwant Gantyada -* @date (last) 14-May-2026 +* @author (last) Vinayakam Mani +* @date (last) 28-May-2026 * * @author (original) Vinayakam Mani * @date (original) 06-Nov-2024 Index: firmware/App/Monitors/Conductivity.c =================================================================== diff -u -rb085a36e252a01504b415bf145e4b1fc129cdcdf -re7e698ed85055dd286e8c0501a582ff66d601590 --- firmware/App/Monitors/Conductivity.c (.../Conductivity.c) (revision b085a36e252a01504b415bf145e4b1fc129cdcdf) +++ firmware/App/Monitors/Conductivity.c (.../Conductivity.c) (revision e7e698ed85055dd286e8c0501a582ff66d601590) @@ -7,8 +7,8 @@ * * @file Conductivity.c * -* @author (last) Sameer Kalliadan Poyil -* @date (last) 16-Apr-2026 +* @author (last) Vinayakam Mani +* @date (last) 28-May-2026 * * @author (original) Vinayakam Mani * @date (original) 13-Sep-2024 @@ -34,7 +34,10 @@ #define COND_SENSOR_REPORT_PERIOD ( MS_PER_SECOND / TASK_PRIORITY_INTERVAL ) ///< Broadcast conductivity values message every second. #define COND_SENSOR_UPDATE_INTERVAL ( 700 / TASK_PRIORITY_INTERVAL ) ///< Time in task intervals for new sensor data -#define DATA_PUBLISH_COUNTER_START_COUNT 40 ///< Data publish counter start count. +#define DD_CONDUCTIVITY_DATA_PUBLISH_COUNTER_START_COUNT 40 ///< Data publish counter start count. +#define FP_CONDUCTIVITY_DATA_PUBLISH_COUNTER_START_COUNT 41 ///< Data publish counter start count. +#define RO_DATA_PUBLISH_COUNTER_START_COUNT 42 ///< Data publish counter start count. +#define RESISTANCE_DATA_PUBLISH_COUNTER_START_COUNT 43 ///< Data publish counter start count. #define CONDUCTIVITY_SAMPLE_FILTER_MS ( 30 ) ///< Filter conductivity data for given time. Currently set to have 5 samples over 3.5s ( 700ms sample rate ) #define CONDUCTIVITY_TEMP_SAMPLE_FILTER_MS ( 30 ) ///< Filter conductivity temperature data for given time. Currently set to have 5 samples over 3.5s ( 700ms sample rate ) #define SIZE_OF_COND_ROLLING_AVG ( CONDUCTIVITY_SAMPLE_FILTER_MS / TASK_PRIORITY_INTERVAL ) ///< Filtered conductivity moving average sample count. @@ -53,7 +56,7 @@ } FILTER_CONDUCTIVITY_READINGS_T; /// Filter conductivity sensor temperature readings record. -typedef struct +typedef struct publishConductivitySensorsData { F32 conductivityTempReadings[ SIZE_OF_COND_TEMP_ROLLING_AVG ]; ///< Holds conductivity sample rolling average. U32 conductivityTempReadingsIdx; ///< Index for next sample in rolling average array. @@ -84,6 +87,8 @@ static U32 roRRCount; ///< RO rejection ratio Number of samples in average buffer. static F32 roRRTankFillAvg; ///< Average RO rejection ratio during permeate tank fill state. static U32 roRRSampleIntervalCounter; ///< RO rejection ratio sample collection timer counter. +static U32 conductivityResistancePublishTimerCounter; ///< DD and FP Conductivity data publication counter. +static OVERRIDE_U32_T conductivityResistanceDataPublishInterval; ///< DD and FP Conductivity sensors publish time interval override. // ********** private function prototypes ********** @@ -108,20 +113,23 @@ initConductivityTeensy(); initConductivitySensors(); - ddConductivityPublishTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; - fpConductivityPublishTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; - roRRPublishTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; - roRejectionRatio = 0.0F; - roRejectionRatioTankFill = 0.0F; - roRRRunningSum = 0.0F; - roRRSamplesNextIndex = 0; - roRRCount = 0; - roRRTankFillAvg = 0.0F; - roRRAvg.data = 0.0F; - roRRAvg.ovData = 0.0F; - roRRAvg.ovInitData = 0.0F; - roRRAvg.override = OVERRIDE_RESET; - roRRSampleIntervalCounter = 0; + ddConductivityPublishTimerCounter = DD_CONDUCTIVITY_DATA_PUBLISH_COUNTER_START_COUNT; + fpConductivityPublishTimerCounter = FP_CONDUCTIVITY_DATA_PUBLISH_COUNTER_START_COUNT; + roRRPublishTimerCounter = RO_DATA_PUBLISH_COUNTER_START_COUNT; + conductivityResistancePublishTimerCounter = RESISTANCE_DATA_PUBLISH_COUNTER_START_COUNT; + roRejectionRatio = 0.0F; + roRejectionRatioTankFill = 0.0F; + roRRRunningSum = 0.0F; + roRRSamplesNextIndex = 0; + roRRCount = 0; + roRRTankFillAvg = 0.0F; + roRRAvg.data = 0.0F; + roRRAvg.ovData = 0.0F; + roRRAvg.ovInitData = 0.0F; + roRRAvg.override = OVERRIDE_RESET; + roRRSampleIntervalCounter = 0; + condtempDataCollectionTimeInterval = COND_SENSOR_UPDATE_INTERVAL; + condtempSampleIntervalCounter = 0; memset( &roRRSamples, 0, sizeof( roRRSamples ) ); @@ -150,20 +158,26 @@ condTempPrevReadCount[ sensor ] = 0; } - ddConductivityDataPublishInterval.data = COND_SENSOR_REPORT_PERIOD; - ddConductivityDataPublishInterval.ovData = COND_SENSOR_REPORT_PERIOD; - ddConductivityDataPublishInterval.ovInitData = 0; - ddConductivityDataPublishInterval.override = OVERRIDE_RESET; + ddConductivityDataPublishInterval.data = COND_SENSOR_REPORT_PERIOD; + ddConductivityDataPublishInterval.ovData = COND_SENSOR_REPORT_PERIOD; + ddConductivityDataPublishInterval.ovInitData = 0; + ddConductivityDataPublishInterval.override = OVERRIDE_RESET; - fpConductivityDataPublishInterval.data = COND_SENSOR_REPORT_PERIOD; - fpConductivityDataPublishInterval.ovData = COND_SENSOR_REPORT_PERIOD; - fpConductivityDataPublishInterval.ovInitData = 0; - fpConductivityDataPublishInterval.override = OVERRIDE_RESET; + fpConductivityDataPublishInterval.data = COND_SENSOR_REPORT_PERIOD; + fpConductivityDataPublishInterval.ovData = COND_SENSOR_REPORT_PERIOD; + fpConductivityDataPublishInterval.ovInitData = 0; + fpConductivityDataPublishInterval.override = OVERRIDE_RESET; - roRRDataPublishInterval.data = COND_SENSOR_REPORT_PERIOD; - roRRDataPublishInterval.ovData = COND_SENSOR_REPORT_PERIOD; - roRRDataPublishInterval.ovInitData = 0; - roRRDataPublishInterval.override = OVERRIDE_RESET; + roRRDataPublishInterval.data = COND_SENSOR_REPORT_PERIOD; + roRRDataPublishInterval.ovData = COND_SENSOR_REPORT_PERIOD; + roRRDataPublishInterval.ovInitData = 0; + roRRDataPublishInterval.override = OVERRIDE_RESET; + + conductivityResistanceDataPublishInterval.data = COND_SENSOR_REPORT_PERIOD; + conductivityResistanceDataPublishInterval.ovData = COND_SENSOR_REPORT_PERIOD; + conductivityResistanceDataPublishInterval.ovInitData = 0; + conductivityResistanceDataPublishInterval.override = OVERRIDE_RESET; + } /*********************************************************************//** @@ -546,6 +560,33 @@ broadcastData( MSG_ID_FP_RO_REJECTION_RATIO_DATA, COMM_BUFFER_OUT_CAN_FP_BROADCAST, (U08*)&data, sizeof( RO_REJECTION_RATIO_DATA_T ) ); } + + if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_1_9_HW ) != TRUE ) + { + // publish conductivity resistance data on interval + if ( ++conductivityResistancePublishTimerCounter >= getU32OverrideValue( &conductivityResistanceDataPublishInterval ) ) + { + CONDUCTIVITY_RESISTANCE_DATA_T data; + + data.d17CondResist = getConductivityRawResistance( D17_COND ); + data.d27CondResist = getConductivityRawResistance( D27_COND ); + data.d29CondResist = getConductivityRawResistance( D29_COND ); + data.d43CondResist = getConductivityRawResistance( D43_COND ); + data.d74CondResist = getConductivityRawResistance( D74_COND ); + data.p9CondResist = getConductivityRawResistance( P9_COND ); + data.p18CondResist = getConductivityRawResistance( P18_COND ); + data.d17RTDResist = getConductivityRawRTD( D17_COND ); + data.d27RTDResist = getConductivityRawRTD( D27_COND ); + data.d29RTDResist = getConductivityRawRTD( D29_COND ); + data.d43RTDResist = getConductivityRawRTD( D43_COND ); + data.d74RTDResist = getConductivityRawRTD( D74_COND ); + data.p9RTDResist = getConductivityRawRTD( P9_COND ); + data.p18RTDResist = getConductivityRawRTD( P18_COND ); + conductivityResistancePublishTimerCounter = 0; + + broadcastData( MSG_ID_DD_CONDUCTIVITY_SENSOR_RESISTANCE_DATA, COMM_BUFFER_OUT_CAN_DD_BROADCAST, (U08*)&data, sizeof( CONDUCTIVITY_RESISTANCE_DATA_T ) ); + } + } } Index: firmware/App/Monitors/Temperature.c =================================================================== diff -u -rb085a36e252a01504b415bf145e4b1fc129cdcdf -re7e698ed85055dd286e8c0501a582ff66d601590 --- firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision b085a36e252a01504b415bf145e4b1fc129cdcdf) +++ firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision e7e698ed85055dd286e8c0501a582ff66d601590) @@ -7,8 +7,8 @@ * * @file Temperature.c * -* @author (last) Jashwant Gantyada -* @date (last) 21-May-2026 +* @author (last) Vinayakam Mani +* @date (last) 28-May-2026 * * @author (original) Vinayakam Mani * @date (original) 25-Sep-2024