Write to EEPROM more aggressively when engine not running
This commit is contained in:
parent
738ae2ed93
commit
b7901568a0
|
@ -84,7 +84,11 @@ struct write_location {
|
|||
|
||||
bool can_write() const
|
||||
{
|
||||
return (counter<=EEPROM_MAX_WRITE_BLOCK);
|
||||
bool canWrite = false;
|
||||
if(currentStatus.RPM > 0) { canWrite = (counter <= EEPROM_MAX_WRITE_BLOCK); }
|
||||
else { canWrite = (counter <= (EEPROM_MAX_WRITE_BLOCK * 8)); } //Write to EEPROM more aggresively if the engine is not running
|
||||
|
||||
return canWrite;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -183,6 +183,6 @@ extern uint32_t deferEEPROMWritesUntil;
|
|||
#define EEPROM_CALIBRATION_IAT_OLD 3071
|
||||
#define EEPROM_CALIBRATION_CLT_OLD 3583
|
||||
|
||||
#define EEPROM_DEFER_DELAY 1500000UL //1.5 second pause after large comms before writing to EEPROM
|
||||
#define EEPROM_DEFER_DELAY 1000000UL //1.5 second pause after large comms before writing to EEPROM
|
||||
|
||||
#endif // STORAGE_H
|
||||
#endif // STORAGE_H
|
Loading…
Reference in New Issue