From d2e24cf2e54a347018cfd0b204ceec741e8adeda Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 6 Nov 2019 20:33:40 -0500 Subject: [PATCH] evil manual merge of https://github.com/DonaldBecker/rusefi --- firmware/console/binary/tunerstudio.cpp | 2 ++ firmware/console/eficonsole.cpp | 2 ++ firmware/controllers/trigger/decoders/trigger_honda.cpp | 7 ------- firmware/init/sensor/init_oil_pressure.cpp | 4 ++++ 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index 87be9351fa..06ea9cbcd1 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -308,6 +308,8 @@ static void handleGetStructContent(ts_channel_s *tsChannel, int structId, int si static void handleReadFileContent(ts_channel_s *tsChannel, short fileId, short offset, short length) { #if EFI_FILE_LOGGING readLogFileContent(tsChannel->crcReadBuffer, fileId, offset, length); +#else + UNUSED(tsChannel); UNUSED(fileId); UNUSED(offset); UNUSED(length); #endif /* EFI_FILE_LOGGING */ } diff --git a/firmware/console/eficonsole.cpp b/firmware/console/eficonsole.cpp index 5ec3218e6b..a002a4363b 100644 --- a/firmware/console/eficonsole.cpp +++ b/firmware/console/eficonsole.cpp @@ -166,6 +166,8 @@ void print(const char *format, ...) { va_start(ap, format); chvprintf((BaseSequentialStream*) getConsoleChannel(), format, ap); va_end(ap); +#else + UNUSED(format); #endif /* EFI_UART_ECHO_TEST_MODE */ } diff --git a/firmware/controllers/trigger/decoders/trigger_honda.cpp b/firmware/controllers/trigger/decoders/trigger_honda.cpp index 42d7987c84..8841417cd9 100644 --- a/firmware/controllers/trigger/decoders/trigger_honda.cpp +++ b/firmware/controllers/trigger/decoders/trigger_honda.cpp @@ -180,13 +180,6 @@ void configureHondaCbr600(TriggerShape *s) { addSkippedToothTriggerEvents(T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 0, 720, 0, 349); - // w = 15 - // float w = 720 / 2 / 24; - - //s->addEvent720(360 -w, T_SECONDARY, TV_RISE); - - //s->addEvent720(350 - 0.1, T_SECONDARY, TV_RISE); - s->addEvent720(350.0f, T_PRIMARY, TV_FALL); s->addEvent720(360.0f, T_PRIMARY, TV_RISE); diff --git a/firmware/init/sensor/init_oil_pressure.cpp b/firmware/init/sensor/init_oil_pressure.cpp index d8d5b5a7ba..91159ec8fb 100644 --- a/firmware/init/sensor/init_oil_pressure.cpp +++ b/firmware/init/sensor/init_oil_pressure.cpp @@ -4,7 +4,9 @@ #include "global.h" #include "functional_sensor.h" #include "linear_func.h" +#if defined(EFI_TUNER_STUDIO) #include "tunerstudio_configuration.h" +#endif EXTERN_ENGINE; @@ -31,8 +33,10 @@ void initOilPressure() { oilpSensorFunc.configure(sensorCfg->v1, val1, sensorCfg->v2, val2, /*minOutput*/ -5, greaterOutput); oilpSensor.setFunction(oilpSensorFunc); +#if defined(EFI_TUNER_STUDIO) // Tell it to report to its output channel oilpSensor.setReportingLocation(&tsOutputChannels.oilPressure); +#endif // Subscribe the sensor to the ADC AdcSubscription::SubscribeSensor(oilpSensor, channel);