Index: firmware/App/Drivers/ConductivityTeensy.h =================================================================== diff -u -r614a58c1d55d79e47329adb7e191d8cc9c681c72 -r0797158d6e367debb04e043798f1aeb1fb17063b --- firmware/App/Drivers/ConductivityTeensy.h (.../ConductivityTeensy.h) (revision 614a58c1d55d79e47329adb7e191d8cc9c681c72) +++ firmware/App/Drivers/ConductivityTeensy.h (.../ConductivityTeensy.h) (revision 0797158d6e367debb04e043798f1aeb1fb17063b) @@ -7,42 +7,25 @@ * * @file ConductivityTeensy.h * -* @author (last) Arpita Srivastava -* @date (last) 3-Nov-2025 +* @author (last) Michael Garthwaite +* @date (last) 06-Mar-2026 * * @author (original) Arpita Srivastava -* @date (original) 3-Nov-2025 +* @date (original) 03-Nov-2025 * ***************************************************************************/ #ifndef _CONDUCTIVITY_TEENSY_H_ #define _CONDUCTIVITY_TEENSY_H_ #include "DDCommon.h" - +#include "ConductivitySensors.h" // ********** public definitions ********** #define DOUBLE_COUNT 8 ///< Number of double values in Teensy EEPROM data #define FLOAT_COUNT 16 ///< Number of float values in Teensy EEPROM data #define MAX_COND_MST_PARAM_IDX 7 ///< Total number of parameters in measurement settings CONDUCTIVITY_MEASUREMENT_SETTINGS_T -/// Enumeration of conductivity sensors. -typedef enum ConductivitySensors -{ - D17_COND = 0, ///< Bicarb only conductivity sensor - 1 - FIRST_DD_COND_SENSOR = D17_COND, ///< First conductivity sensor - D27_COND, ///< Acid and Bicarb mix conductivity sensor - 1 - D29_COND, ///< Acid and Bicarb mix conductivity sensor - 2 - D43_COND, ///< Spent dialysate conductivity sensor - D74_COND, ///< Bicarb only conductivity sensor - 2 - LAST_DD_COND_SENSOR = D74_COND, ///< Last conductivity sensor - P9_COND, ///< Inlet water conductivity sensor - FIRST_FP_COND_SENSOR = P9_COND, ///< First FP conductivity sensor - P18_COND, ///< RO outlet water conductivity sensor - LAST_FP_COND_SENSOR = P18_COND, ///< Last FP conductivity sensor - NUM_OF_CONDUCTIVITY_SENSORS ///< Number of conductivity sensors -} CONDUCTIVITY_SENSORS_T; - /// Enumeration of Teensy Sensor Index values typedef enum TeensySensorIndex { @@ -94,7 +77,8 @@ /// Enumeration of Conductivity Communication states. typedef enum Conductivity_Comm_States { - COND_COMM_STATE_IDLE = 0, ///< Idle comm state, will q automated polling if nothing is q'd. + COND_COMM_STATE_INIT = 0, ///< Init comm state, waits 1s before moving to idle. + COND_COMM_STATE_IDLE, ///< Idle comm state, will q automated polling if nothing is q'd. COND_COMM_STATE_TX, ///< TX comm state, sends commands to teensy. COND_COMM_STATE_RX, ///< RX comm state, recv data from teensy. COND_COMM_STATE_FAILED, ///< Failed comm state @@ -196,9 +180,9 @@ /// Structure to store calculated Conductivity and Temperature for each sensor. typedef struct { - F64 Conductivity; - F64 Resistance; - F64 Temperature; + OVERRIDE_F32_T Conductivity; + OVERRIDE_F32_T Resistance; + OVERRIDE_F32_T Temperature; } COND_CALCULATED_MEASUREMENTS_T; /// Structure to enqueue and dequeue commands in the command queue @@ -219,5 +203,8 @@ F32 getTeensyConductivityValue( CONDUCTIVITY_SENSORS_T sensorId ); F32 getTeensyConductivityTemperatureValue( CONDUCTIVITY_SENSORS_T sensorId ); BOOL testSetTeenyConductivityModel( MESSAGE_T *message ); +BOOL testTeensyConductivitySensorReadingsOverride( MESSAGE_T *message ); +BOOL testTeensyConductivitySensorTemperatureReadingsOverride( MESSAGE_T *message ); +BOOL testTeensyConductivitySensorResistanceReadingsOverride( MESSAGE_T *message ); #endif /* _CONDUCTIVITY_TEENSY_H_ */