parent
e89f553d55
commit
a3d86c61f2
|
@ -451,6 +451,21 @@ void Engine::efiWatchdog() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (engine->configBurnTimer.hasElapsedSec(5) && engineConfiguration->tempBooleanForVerySpecialLogic) {
|
||||||
|
static float mostRecentSecond = 0;
|
||||||
|
|
||||||
|
float secondsNow = currentTimeMillis();
|
||||||
|
if (mostRecentSecond != 0) {
|
||||||
|
float gapInSeconds = secondsNow - mostRecentSecond;
|
||||||
|
if (gapInSeconds > 0.5) {
|
||||||
|
// float has 24 bits in the mantissa, which should allow up to 8 significant figures
|
||||||
|
// we loose precision here after about 1,000,000 seconds which is 11 days
|
||||||
|
firmwareError(WATCH_DOG_SECONDS, "gap in seconds %f %f", secondsNow, gapInSeconds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mostRecentSecond = secondsNow;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isSpinning) {
|
if (!isSpinning) {
|
||||||
if (!isRunningBenchTest() && enginePins.stopPins()) {
|
if (!isRunningBenchTest() && enginePins.stopPins()) {
|
||||||
// todo: make this a firmwareError assuming functional tests would run
|
// todo: make this a firmwareError assuming functional tests would run
|
||||||
|
|
|
@ -285,6 +285,8 @@ public:
|
||||||
*/
|
*/
|
||||||
efitick_t ignitionOnTimeNt = 0;
|
efitick_t ignitionOnTimeNt = 0;
|
||||||
|
|
||||||
|
Timer configBurnTimer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This counter is incremented every time user adjusts ECU parameters online (either via rusEfi console or other
|
* This counter is incremented every time user adjusts ECU parameters online (either via rusEfi console or other
|
||||||
* tuning software)
|
* tuning software)
|
||||||
|
|
|
@ -2135,6 +2135,8 @@ typedef enum {
|
||||||
|
|
||||||
CUSTOM_ERR_CAN_COMMUNICATION = 8900,
|
CUSTOM_ERR_CAN_COMMUNICATION = 8900,
|
||||||
|
|
||||||
|
WATCH_DOG_SECONDS = 8901,
|
||||||
|
|
||||||
CUSTOM_ERR_TRIGGER_SYNC = 9000,
|
CUSTOM_ERR_TRIGGER_SYNC = 9000,
|
||||||
CUSTOM_OBD_TRIGGER_WAVEFORM = 9001,
|
CUSTOM_OBD_TRIGGER_WAVEFORM = 9001,
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,7 @@ int eraseAndFlashCopy(flashaddr_t storageAddress, const TStorage& data) {
|
||||||
bool burnWithoutFlash = false;
|
bool burnWithoutFlash = false;
|
||||||
|
|
||||||
void writeToFlashNow(void) {
|
void writeToFlashNow(void) {
|
||||||
|
engine->configBurnTimer.reset();
|
||||||
bool isSuccess = false;
|
bool isSuccess = false;
|
||||||
|
|
||||||
if (burnWithoutFlash) {
|
if (burnWithoutFlash) {
|
||||||
|
|
Loading…
Reference in New Issue