Index: firmware/App/Monitors/Conductivity.c =================================================================== diff -u -r3749d041224897f9da5a1cfadae7bab81d94437b -r4643a4b7f7ecaca8e07a809af6b218fac1c74799 --- firmware/App/Monitors/Conductivity.c (.../Conductivity.c) (revision 3749d041224897f9da5a1cfadae7bab81d94437b) +++ firmware/App/Monitors/Conductivity.c (.../Conductivity.c) (revision 4643a4b7f7ecaca8e07a809af6b218fac1c74799) @@ -102,11 +102,8 @@ { CONDUCTIVITY_SENSORS_T sensor; -#ifdef __TEENSY_CONDUCTIVITY_DRIVER__ initConductivityTeensy(); -#else initConductivitySensors(); -#endif ddConductivityPublishTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; fpConductivityPublishTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; @@ -175,11 +172,9 @@ void execConductivity( void ) { //read conductivity sensors raw value -#ifdef __TEENSY_CONDUCTIVITY_DRIVER__ execConductivityTeensy(); -#else execConductivitySensors(); -#endif + filterConductivitySensors(); calcRORejectionRatio(); // TODO: should this be called here or inside filter function filterRORejectionRatioReadings(); @@ -244,15 +239,20 @@ static void filterConductivitySensorReadings( void ) { CONDUCTIVITY_SENSORS_T sensor; + F32 calculatedConductivity = 0.0F; for ( sensor = FIRST_DD_COND_SENSOR; sensor < NUM_OF_CONDUCTIVITY_SENSORS; sensor++ ) { -#ifdef __TEENSY_CONDUCTIVITY_DRIVER__ - F32 rawCond = getTeensyConductivityValue( sensor ); -#else - F32 calculatedConductivity = getConductivity( sensor ); -#endif + if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) != TRUE ) + { + calculatedConductivity = getTeensyConductivityValue( sensor ); + } + else + { + calculatedConductivity = getConductivity( sensor ); + } + // TODO - calibrate if ( filteredConductivityReadings[ sensor ].conductivityReadingsCount >= SIZE_OF_FLOW_ROLLING_AVG ) @@ -308,14 +308,18 @@ static void filterConductivitySensorTemperatureReadings( void ) { CONDUCTIVITY_SENSORS_T sensor; + F32 calculatedTemperature = 0.0F; for ( sensor = FIRST_DD_COND_SENSOR; sensor < NUM_OF_CONDUCTIVITY_SENSORS; sensor++ ) { -#ifdef __TEENSY_CONDUCTIVITY_DRIVER__ - F32 calculatedTemperature = getTeensyConductivityTemperatureValue( sensor ); -#else - F32 calculatedTemperature = getConductivityTemperature( sensor ); -#endif + if ( getTestConfigStatus( TEST_CONFIG_DD_FP_ENABLE_BETA_2_0_HW ) != TRUE ) + { + calculatedTemperature = getTeensyConductivityTemperatureValue( sensor ); + } + else + { + calculatedTemperature = getConductivityTemperature( sensor ); + } // TODO - calibrate