From 58a8dfdb4246465b1b068054f030eda4fd7a3765 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 21 May 2017 23:17:08 -0400 Subject: [PATCH] better field name --- firmware/console/status_loop.cpp | 2 +- firmware/controllers/algo/engine.cpp | 2 +- firmware/controllers/algo/engine.h | 2 +- firmware/hw_layer/can_hw.cpp | 2 +- firmware/hw_layer/vehicle_speed.cpp | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 081a35c1aa..973543b7bd 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -757,7 +757,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_ tsOutputChannels->debugFloatField1 = getVoltage("fsio", engineConfiguration->fsioAdc[0]); } } else if (engineConfiguration->debugMode == DBG_VEHICLE_SPEED_SENSOR) { - tsOutputChannels->debugIntField1 = engine->engineState.vssDebugEventCounter; + tsOutputChannels->debugIntField1 = engine->engineState.vssEventCounter; } else if (engineConfiguration->debugMode == DBG_SD_CARD) { tsOutputChannels->debugIntField1 = engine->engineState.totalLoggedBytes; } else if (engineConfiguration->debugMode == DBG_CRANKING_DETAILS) { diff --git a/firmware/controllers/algo/engine.cpp b/firmware/controllers/algo/engine.cpp index 71a4106760..238a393b80 100644 --- a/firmware/controllers/algo/engine.cpp +++ b/firmware/controllers/algo/engine.cpp @@ -147,7 +147,7 @@ EngineState::EngineState() { lastErrorCode = 0; crankingTime = 0; timeSinceCranking = 0; - vssDebugEventCounter = 0; + vssEventCounter = 0; targetAFR = 0; tpsAccelEnrich = 0; tChargeK = 0; diff --git a/firmware/controllers/algo/engine.h b/firmware/controllers/algo/engine.h index eef965236d..e36a18818b 100644 --- a/firmware/controllers/algo/engine.h +++ b/firmware/controllers/algo/engine.h @@ -158,7 +158,7 @@ public: float currentVE; float targetAFR; - int vssDebugEventCounter; + int vssEventCounter; int totalLoggedBytes; diff --git a/firmware/hw_layer/can_hw.cpp b/firmware/hw_layer/can_hw.cpp index 66f8334eac..a79a779e20 100644 --- a/firmware/hw_layer/can_hw.cpp +++ b/firmware/hw_layer/can_hw.cpp @@ -151,7 +151,7 @@ static void canMazdaRX8(void) { commonTxInit(CAN_MAZDA_RX_STATUS_2); txmsg.data8[0] = (uint8_t)(engine->sensors.clt + 69); //temp gauge //~170 is red, ~165 last bar, 152 centre, 90 first bar, 92 second bar - txmsg.data8[1] = ((int16_t)(engine->engineState.vssDebugEventCounter*(engineConfiguration->vehicleSpeedCoef*0.277*2.58))) & 0xff; + txmsg.data8[1] = ((int16_t)(engine->engineState.vssEventCounter*(engineConfiguration->vehicleSpeedCoef*0.277*2.58))) & 0xff; txmsg.data8[2] = 0x00; // unknown txmsg.data8[3] = 0x00; //unknown txmsg.data8[4] = 0x01; //Oil Pressure (not really a gauge) diff --git a/firmware/hw_layer/vehicle_speed.cpp b/firmware/hw_layer/vehicle_speed.cpp index 813a75894a..32bad6005a 100644 --- a/firmware/hw_layer/vehicle_speed.cpp +++ b/firmware/hw_layer/vehicle_speed.cpp @@ -44,7 +44,7 @@ float getVehicleSpeed(void) { } static void vsAnaWidthCallback(void) { - engine->engineState.vssDebugEventCounter++; + engine->engineState.vssEventCounter++; efitick_t nowNt = getTimeNowNt(); vssDiff = nowNt - lastSignalTimeNt; lastSignalTimeNt = nowNt; @@ -56,7 +56,7 @@ static void speedInfo(void) { scheduleMsg(logger, "c=%f eventCounter=%d speed=%f", engineConfiguration->vehicleSpeedCoef, - engine->engineState.vssDebugEventCounter, + engine->engineState.vssEventCounter, getVehicleSpeed()); scheduleMsg(logger, "vss diff %d", vssDiff);