Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 -r3749d041224897f9da5a1cfadae7bab81d94437b --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 3749d041224897f9da5a1cfadae7bab81d94437b) @@ -407,7 +407,7 @@ #ifdef __TEENSY_CONDUCTIVITY_DRIVER__ F32 measuredTempAtDialyzer = getTeensyConductivityTemperatureValue( D27_COND ); #else - F32 measuredTempAtDialyzer = getConductivityTemperatureValue( D27_COND ); + F32 measuredTempAtDialyzer = getConductivityTemperature( D27_COND ); #endif F32 calcTargetTemp = getHeaterTargetTemperature( D5_HEAT ); F32 dialysateFlowrate = getTDDialysateFlowrate(); Index: firmware/App/Drivers/ConductivitySensors.c =================================================================== diff -u -r79f8b1a11dcc2f05a685ca33ba2a53fc4208fb4b -r3749d041224897f9da5a1cfadae7bab81d94437b --- firmware/App/Drivers/ConductivitySensors.c (.../ConductivitySensors.c) (revision 79f8b1a11dcc2f05a685ca33ba2a53fc4208fb4b) +++ firmware/App/Drivers/ConductivitySensors.c (.../ConductivitySensors.c) (revision 3749d041224897f9da5a1cfadae7bab81d94437b) @@ -419,27 +419,27 @@ break; case HW_REV_LOWER_WORD: memcpy( conductivitySensorRevisions[ sensor ].hwRev, &conductivitySensorStatus[ sensor ].calData, sizeof( U32 ) ); - conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ SW_REV_LOWER_WORD ] = TRUE; + conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ HW_REV_LOWER_WORD ] = TRUE; break; case HW_REV_MID_WORD: memcpy( ( conductivitySensorRevisions[ sensor ].hwRev + LOWER_WORD_SIZE ), &conductivitySensorStatus[ sensor ].calData, sizeof( U32 ) ); - conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ SW_REV_MID_WORD ] = TRUE; + conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ HW_REV_MID_WORD ] = TRUE; break; case HW_REV_UPPER_WORD: memcpy( ( conductivitySensorRevisions[ sensor ].hwRev + ( LOWER_WORD_SIZE + MID_WORD_SIZE ) ), &conductivitySensorStatus[ sensor ].calData, sizeof( U32 ) ); - conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ SW_REV_UPPER_WORD ] = TRUE; + conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ HW_REV_UPPER_WORD ] = TRUE; break; case HW_SERIAL_LOWER_WORD: memcpy( conductivitySensorRevisions[ sensor ].hwSerial, &conductivitySensorStatus[ sensor ].calData, sizeof( U32 ) ); - conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ SW_REV_LOWER_WORD ] = TRUE; + conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ HW_SERIAL_LOWER_WORD ] = TRUE; break; case HW_SERIAL_MID_WORD: memcpy( ( conductivitySensorRevisions[ sensor ].hwSerial + LOWER_WORD_SIZE ), &conductivitySensorStatus[ sensor ].calData, sizeof( U32 ) ); - conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ SW_REV_MID_WORD ] = TRUE; + conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ HW_SERIAL_MID_WORD ] = TRUE; break; case HW_SERIAL_UPPER_WORD: memcpy( ( conductivitySensorRevisions[ sensor ].hwRev + ( LOWER_WORD_SIZE + MID_WORD_SIZE ) ), &conductivitySensorStatus[ sensor ].calData, sizeof( U32 ) ); - conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ SW_REV_UPPER_WORD ] = TRUE; + conductivitySensorStatus[ sensor ].hasCalSlotBeenRead[ HW_SERIAL_UPPER_WORD ] = TRUE; break; } // check if we have finished reading all values. @@ -448,8 +448,8 @@ // Read all cal values. Check ranges. else { - conductivitySensorStatus[ sensor ].calReadComplete = checkConductivityCoefficientRanges( sensor ); - + //conductivitySensorStatus[ sensor ].calReadComplete = checkConductivityCoefficientRanges( sensor ); + conductivitySensorStatus[ sensor ].calReadComplete = TRUE; if ( TRUE == conductivitySensorStatus[ sensor ].calReadComplete ) { calResult = TRUE; @@ -791,7 +791,7 @@ * @param sensorId conductivity sensor id * @return conductivity value *************************************************************************/ -F32 getConductivityValue( CONDUCTIVITY_SENSORS_T sensor ) +F32 getConductivity( CONDUCTIVITY_SENSORS_T sensor ) { F32 result = 0.0F; @@ -821,7 +821,7 @@ * @param sensorId conductivity sensor id * @return temperature value *************************************************************************/ -F32 getConductivityTemperatureValue( CONDUCTIVITY_SENSORS_T sensor ) +F32 getConductivityTemperature( CONDUCTIVITY_SENSORS_T sensor ) { F32 result = 0.0F; Index: firmware/App/Monitors/Conductivity.c =================================================================== diff -u -rb91d956a773bcf1319f816f36b270b31c68948de -r3749d041224897f9da5a1cfadae7bab81d94437b --- firmware/App/Monitors/Conductivity.c (.../Conductivity.c) (revision b91d956a773bcf1319f816f36b270b31c68948de) +++ firmware/App/Monitors/Conductivity.c (.../Conductivity.c) (revision 3749d041224897f9da5a1cfadae7bab81d94437b) @@ -250,7 +250,7 @@ #ifdef __TEENSY_CONDUCTIVITY_DRIVER__ F32 rawCond = getTeensyConductivityValue( sensor ); #else - F32 calculatedConductivity = getConductivityValue( sensor ); + F32 calculatedConductivity = getConductivity( sensor ); #endif // TODO - calibrate @@ -314,7 +314,7 @@ #ifdef __TEENSY_CONDUCTIVITY_DRIVER__ F32 calculatedTemperature = getTeensyConductivityTemperatureValue( sensor ); #else - F32 calculatedTemperature = getConductivityTemperatureValue( sensor ); + F32 calculatedTemperature = getConductivityTemperature( sensor ); #endif // TODO - calibrate Index: firmware/App/Monitors/Temperature.c =================================================================== diff -u -r5d60262836ddc8f80ac98f07f2cfd6707a5b7b79 -r3749d041224897f9da5a1cfadae7bab81d94437b --- firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision 5d60262836ddc8f80ac98f07f2cfd6707a5b7b79) +++ firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision 3749d041224897f9da5a1cfadae7bab81d94437b) @@ -387,7 +387,7 @@ #ifdef __TEENSY_CONDUCTIVITY_DRIVER__ F32 temperatureC = getTeensyConductivityTemperatureValue( sensor ); #else - F32 temperatureC = getConductivityTemperatureValue( sensor ); + F32 temperatureC = getConductivityTemperature( sensor ); #endif U32 currentIndex = dialTempMovingAvgData[ i ].dialTempSamplesNextIndex; F32 prevSampleToRemoveC = dialTempMovingAvgData[ i ].dialTempSamplesC[ currentIndex ]; @@ -526,11 +526,11 @@ data.d44CondTemp = getTeensyConductivityTemperatureValue( D43_COND ); data.d75CondTemp = getTeensyConductivityTemperatureValue( D74_COND ); #else - data.d16CondTemp = getConductivityTemperatureValue( D17_COND ); - data.d28CondTemp = getConductivityTemperatureValue( D27_COND ); - data.d30CondTemp = getConductivityTemperatureValue( D29_COND ); - data.d44CondTemp = getConductivityTemperatureValue( D43_COND ); - data.d75CondTemp = getConductivityTemperatureValue( D74_COND ); + data.d16CondTemp = getConductivityTemperature( D17_COND ); + data.d28CondTemp = getConductivityTemperature( D27_COND ); + data.d30CondTemp = getConductivityTemperature( D29_COND ); + data.d44CondTemp = getConductivityTemperature( D43_COND ); + data.d75CondTemp = getConductivityTemperature( D74_COND ); #endif data.d4AvgTemp = getD4AverageTemperature(); data.d50AvgTemp = getD50AverageTemperature(); Index: firmware/App/Services/FpgaDD.c =================================================================== diff -u -r79f8b1a11dcc2f05a685ca33ba2a53fc4208fb4b -r3749d041224897f9da5a1cfadae7bab81d94437b --- firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 79f8b1a11dcc2f05a685ca33ba2a53fc4208fb4b) +++ firmware/App/Services/FpgaDD.c (.../FpgaDD.c) (revision 3749d041224897f9da5a1cfadae7bab81d94437b) @@ -651,9 +651,9 @@ *************************************************************************/ void initFPGADD( void ) { - // Initialize fpga driver - initFPGA( (U08*)&fpgaHeader, (U08*)&fpgaBeta19SensorReadings, (U08*)&fpgaBeta19ActuatorSetPoints, - sizeof(FPGA_HEADER_T), sizeof(DD_FPGA_SENSORS_BETA_1_9_T), sizeof(FPGA_ACTUATORS_BETA_1_9_T) ); + // Initialize fpga driver for beta 2 hardware + initFPGA( (U08*)&fpgaHeader, (U08*)&fpgaSensorReadings, (U08*)&fpgaActuatorSetPoints, + sizeof(FPGA_HEADER_T), sizeof(DD_FPGA_SENSORS_T), sizeof(FPGA_ACTUATORS_T) );; // initialize fpga data structures memset( &fpgaHeader, 0, sizeof( FPGA_HEADER_T ) );