Index: firmware/App/Monitors/Conductivity.c =================================================================== diff -u -rbd896114f304304a7096b30b2a85067a64645e82 -r811395ecb8574f4190671ffdf4217675a7adfbf7 --- firmware/App/Monitors/Conductivity.c (.../Conductivity.c) (revision bd896114f304304a7096b30b2a85067a64645e82) +++ firmware/App/Monitors/Conductivity.c (.../Conductivity.c) (revision 811395ecb8574f4190671ffdf4217675a7adfbf7) @@ -257,9 +257,9 @@ for ( sensor = FIRST_DD_COND_SENSOR; sensor < NUM_OF_CONDUCTIVITY_SENSORS; sensor++ ) { #ifdef __TEENSY_CONDUCTIVITY_DRIVER__ - F32 rawCond = getTeensyConductivityValue( sensor ); + F32 calculatedConductivity = getTeensyConductivityValue( sensor ); #else - F32 rawCond = getConductivityValue( sensor ); + F32 calculatedConductivity = getConductivityValue( sensor ); #endif // TODO - calibrate @@ -268,8 +268,8 @@ { filteredConductivityReadings[ sensor ].conductivityReadingsTotal -= filteredConductivityReadings[ sensor ].conductivityReadings[ filteredConductivityReadings[ sensor ].conductivityReadingsIdx ]; } - filteredConductivityReadings[ sensor ].conductivityReadings[ filteredConductivityReadings[ sensor ].conductivityReadingsIdx ] = rawCond; - filteredConductivityReadings[ sensor ].conductivityReadingsTotal += rawCond; + filteredConductivityReadings[ sensor ].conductivityReadings[ filteredConductivityReadings[ sensor ].conductivityReadingsIdx ] = calculatedConductivity; + filteredConductivityReadings[ sensor ].conductivityReadingsTotal += calculatedConductivity; filteredConductivityReadings[ sensor ].conductivityReadingsIdx = INC_WRAP( filteredConductivityReadings[ sensor ].conductivityReadingsIdx, 0, SIZE_OF_FLOW_ROLLING_AVG - 1 ); filteredConductivityReadings[ sensor ].conductivityReadingsCount = INC_CAP( filteredConductivityReadings[ sensor ].conductivityReadingsCount, SIZE_OF_FLOW_ROLLING_AVG ); filteredcurrentConductivityReadings[ sensor ].data = filteredConductivityReadings[ sensor ].conductivityReadingsTotal / (F32)filteredConductivityReadings[ sensor ].conductivityReadingsCount; @@ -321,9 +321,9 @@ for ( sensor = FIRST_DD_COND_SENSOR; sensor < NUM_OF_CONDUCTIVITY_SENSORS; sensor++ ) { #ifdef __TEENSY_CONDUCTIVITY_DRIVER__ - F32 rawTemp = getTeensyConductivityTemperatureValue( sensor ); + F32 calculatedTemp = getTeensyConductivityTemperatureValue( sensor ); #else - F32 rawTemp = getConductivityTemperatureValue( sensor ); + F32 calculatedTemp = getConductivityTemperatureValue( sensor ); #endif // TODO - calibrate @@ -332,8 +332,8 @@ { filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsTotal -= filteredConductivityTemperatureReadings[sensor].conductivityTempReadings[ filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsIdx ]; } - filteredConductivityTemperatureReadings[sensor].conductivityTempReadings[ filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsIdx ] = rawTemp; - filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsTotal += rawTemp; + filteredConductivityTemperatureReadings[sensor].conductivityTempReadings[ filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsIdx ] = calculatedTemp; + filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsTotal += calculatedTemp; filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsIdx = INC_WRAP( filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsIdx, 0, SIZE_OF_FLOW_ROLLING_AVG - 1 ); filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsCount = INC_CAP( filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsCount, SIZE_OF_FLOW_ROLLING_AVG ); filteredcurrentTemperatureReadings[sensor].data = filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsTotal / (F32)filteredConductivityTemperatureReadings[sensor].conductivityTempReadingsCount;