From a97994cdb668a2c95c7cde5b62eaacb84e9531d5 Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 4 May 2017 17:03:23 -0400 Subject: [PATCH] telemetry dreams --- firmware/controllers/algo/engine.cpp | 2 +- firmware/controllers/algo/engine.h | 4 ++-- firmware/controllers/settings.cpp | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index ba63937a80..0ccde37c9d 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -106,7 +106,7 @@ void Engine::reset() { sensorChartMode = SC_OFF; actualLastInjection = 0; isAlternatorControlEnabled = false; - callFromPitEndTime = 0; + callFromPitStopEndTime = 0; wallFuelCorrection = 0; /** * it's important for fixAngle() that engineCycle field never has zero diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index 3b640aa3fd..654596f378 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -278,9 +278,9 @@ public: // floatms_t callToPitEndTime; /** - * remote telemetry: if not zero, time to stop flashing 'CALL FROM PIT' light + * remote telemetry: if not zero, time to stop flashing 'CALL FROM PIT STOP' light */ - floatms_t callFromPitEndTime; + floatms_t callFromPitStopEndTime; /** * This flag indicated a big enough problem that engine control would be diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 047f0fdce6..77c5f042fe 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -438,6 +438,10 @@ static void printTemperatureInfo(void) { #endif /* EFI_ANALOG_SENSORS */ } +static void setCallFromPitStop(int durationMs) { + engine->callFromPitStopEndTime = currentTimeMillis() + durationMs; +} + static void setCrankingRpm(int value) { engineConfiguration->cranking.rpm = value; doPrintConfiguration(engine); @@ -1024,6 +1028,7 @@ static void setTpsErrorDetectionTooHigh(int v) { } command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode}, + {"call_from_pitstop", setCallFromPitStop}, {"cranking_rpm", setCrankingRpm}, {"cranking_injection_mode", setCrankingInjectionMode}, {"injection_mode", setInjectionMode},