Working O2 calibration on stm32

This commit is contained in:
Josh Stewart 2022-01-11 11:20:54 +11:00
parent 2096c1c91d
commit 25bc7dfc0d
2 changed files with 9 additions and 2 deletions

View File

@ -5196,7 +5196,7 @@ cmdVSSratio6 = "E\x99\x06"
#if NEW_COMMS
tableWriteCommand = "t\$tsCanId%2i%2o%2c%v"; "t%2i%2o%2c%v"; "t\x01\xFC\x00\x01\xFC" "t\%2i%2o%2c%v"
#if mcu_stm32
tableBlockingFactor = 128
tableBlockingFactor = 64
#else
tableBlockingFactor = 256
#endif

View File

@ -646,7 +646,14 @@ void processSerialCommand()
}
sendSerialReturnCode(SERIAL_RC_OK);
Serial.flush(); //This is safe because engine is assumed to not be running during calibration
if(valueOffset == (256*3)) { writeCalibrationPage(cmd); } //Store received values in EEPROM if this is the final chunk of calibration
//Check if this is the final chunk of calibration data
#ifdef CORE_STM32
//STM32 requires TS to send 8 x 128 bytes chunk rather than 4 x 256 bytes.
if(valueOffset == (64*15)) { writeCalibrationPage(cmd); } //Store received values in EEPROM if this is the final chunk of calibration
#else
if(valueOffset == (256*3)) { writeCalibrationPage(cmd); } //Store received values in EEPROM if this is the final chunk of calibration
#endif
}
else if(cmd == IAT_CALIBRATION_PAGE)
{