Index: firmware/App/Drivers/ConductivitySensors.h =================================================================== diff -u -rd7abd9c0c214ec3b7704e7f89b6de83c341b9b0e -ree9c8a27ccb6a9f1f5e18faf9f684935ccf118f4 --- firmware/App/Drivers/ConductivitySensors.h (.../ConductivitySensors.h) (revision d7abd9c0c214ec3b7704e7f89b6de83c341b9b0e) +++ firmware/App/Drivers/ConductivitySensors.h (.../ConductivitySensors.h) (revision ee9c8a27ccb6a9f1f5e18faf9f684935ccf118f4) @@ -55,6 +55,7 @@ NUM_OF_CONDUCTIVITY_SENSORS ///< Number of conductivity sensors } CONDUCTIVITY_SENSORS_T; +/// Enumeration of calibration data typedef enum ConductivityCalDataIdx { CAL_DATA_1, ///< Cal Data 1. cell coefficient, high range @@ -89,6 +90,7 @@ NUM_OF_CONDUCTIVTY_CAL_IDXS, ///< Number of conductivity cal indexes. } CONDUCTIVITY_CAL_IDX_T; +/// Conductivity sensor calibration struct typedef struct { F32 K_high; ///< (cell coefficient, high range), default = 4, range = [3, 6] F32 alpha_high; ///< (temperature correction, high range), default = 0.02, range = [0.005, 0.04] @@ -117,8 +119,8 @@ void execConductivitySensors( void ); void readConductivitySensorData( void ); -F32 getConductivityValue( CONDUCTIVITY_SENSORS_T sensor ); -F32 getConductivityTemperatureValue( CONDUCTIVITY_SENSORS_T sensor ); +F32 getConductivity( CONDUCTIVITY_SENSORS_T sensor ); +F32 getConductivityTemperature( CONDUCTIVITY_SENSORS_T sensor ); BOOL testDDConductivitySensorReadingsOverride( MESSAGE_T *message ); BOOL testDDConductivitySensorTemperatureReadingsOverride( MESSAGE_T *message ); Index: firmware/App/Drivers/ConductivityTeensy.c =================================================================== diff -u -re0c45c725884d780b76dd54a617ab6ed333d7ba2 -ree9c8a27ccb6a9f1f5e18faf9f684935ccf118f4 --- firmware/App/Drivers/ConductivityTeensy.c (.../ConductivityTeensy.c) (revision e0c45c725884d780b76dd54a617ab6ed333d7ba2) +++ firmware/App/Drivers/ConductivityTeensy.c (.../ConductivityTeensy.c) (revision ee9c8a27ccb6a9f1f5e18faf9f684935ccf118f4) @@ -838,16 +838,15 @@ static COND_COMM_STATE_T rxInitSensor( void ) { COND_COMM_STATE_T state = COND_COMM_STATE_RX; - COND_INIT_STATUS_T initStatusInProgress = COND_INIT_STATUS_FAILED; // set to fail for testing COND_INIT_STATUS_T initStatusInitialized = COND_INIT_STATUS_FAILED; // if data populates BOOL recvComplete = rxTeensyReadRsp( TEENSY_CMD_INIT_SENSOR ); if ( TRUE == recvComplete ) { // Reset the timer for next use. condResponseTime = 0; - // Read the data from the receive buffer - initStatusInProgress = ( COND_INIT_STATUS_T )condRxBuffer[ 0 ]; + // Read the data from the receive buffer. Pull 2nd byte as first byte is + // discarded. initStatusInitialized = ( COND_INIT_STATUS_T )condRxBuffer[ 1 ]; // Store the init status