From ef6fe8914c039daaa0764fb577aace130cade6c8 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Thu, 12 May 2016 17:03:37 -0400 Subject: [PATCH] auto-sync --- firmware/config/engines/mazda_miata_1_6.cpp | 1 + firmware/console/status_loop.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/firmware/config/engines/mazda_miata_1_6.cpp b/firmware/config/engines/mazda_miata_1_6.cpp index ea83d0016c..578962c483 100644 --- a/firmware/config/engines/mazda_miata_1_6.cpp +++ b/firmware/config/engines/mazda_miata_1_6.cpp @@ -40,6 +40,7 @@ void setMiataNA_1_6_Configuration(DECLARE_ENGINE_PARAMETER_F) { * oil pressure line * adc4/pa4/W47 */ + //engineConfiguration->fsioAdc[0] = // warning light diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index dff284f2ba..49d554185d 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -144,6 +144,8 @@ static void reportSensorI(Logging *log, bool fileFormat, const char *caption, co EXTERN_ENGINE ; +static char buf[6]; + static void printSensors(Logging *log, bool fileFormat) { // current time, in milliseconds int nowMs = currentTimeMillis(); @@ -167,6 +169,7 @@ static void printSensors(Logging *log, bool fileFormat) { reportSensorF(log, fileFormat, "ENGINE_LOAD", "x", getEngineLoadT(), 2); + #if EFI_ANALOG_SENSORS || defined(__DOXYGEN__) if (engineConfiguration->hasMapSensor) { reportSensorF(log, fileFormat, "MAP", "kPa", getMap(), 2); @@ -210,6 +213,13 @@ static void printSensors(Logging *log, bool fileFormat) { // debugFloat(&logger, "tch", getTCharge1(tps), 2); + // todo: implement a proper loop + if (engineConfiguration->fsioAdc[0] != EFI_ADC_NONE) { + strcpy(buf, "adcX"); + reportSensorF(log, fileFormat, "adc0", "", getVoltage("fsio", engineConfiguration->fsioAdc[0]), 2); + } + + }