Add updater for CAN variables in this months firmware
This commit is contained in:
parent
7e5fb7bb5c
commit
24f34eccbe
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
void doUpdates()
|
void doUpdates()
|
||||||
{
|
{
|
||||||
#define CURRENT_DATA_VERSION 3
|
#define CURRENT_DATA_VERSION 4
|
||||||
|
|
||||||
//May 2017 firmware introduced a -40 offset on the ignition table. Update that table to +40
|
//May 2017 firmware introduced a -40 offset on the ignition table. Update that table to +40
|
||||||
if(EEPROM.read(EEPROM_DATA_VERSION) == 2)
|
if(EEPROM.read(EEPROM_DATA_VERSION) == 2)
|
||||||
|
@ -23,6 +23,16 @@ void doUpdates()
|
||||||
writeConfig();
|
writeConfig();
|
||||||
EEPROM.write(EEPROM_DATA_VERSION, 3);
|
EEPROM.write(EEPROM_DATA_VERSION, 3);
|
||||||
}
|
}
|
||||||
|
//June 2017 required the forced addition of some CAN values to avoid weird errors
|
||||||
|
if(EEPROM.read(EEPROM_DATA_VERSION) == 3)
|
||||||
|
{
|
||||||
|
configPage10.speeduino_tsCanId = 0;
|
||||||
|
configPage10.true_address = 256;
|
||||||
|
configPage10.realtime_base_address = 336;
|
||||||
|
|
||||||
|
writeConfig();
|
||||||
|
EEPROM.write(EEPROM_DATA_VERSION, 4);
|
||||||
|
}
|
||||||
|
|
||||||
//Final check is always for 255 and 0 (Brand new arduino)
|
//Final check is always for 255 and 0 (Brand new arduino)
|
||||||
if( (EEPROM.read(EEPROM_DATA_VERSION) == 0) || (EEPROM.read(EEPROM_DATA_VERSION) == 255) )
|
if( (EEPROM.read(EEPROM_DATA_VERSION) == 0) || (EEPROM.read(EEPROM_DATA_VERSION) == 255) )
|
||||||
|
|
Loading…
Reference in New Issue