From e76f567608e05b47129b20f59c726badb302528c Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Thu, 19 Mar 2020 16:29:56 -0700 Subject: [PATCH] Grow CAN TX stack (#1201) * grow * check mock first --- firmware/controllers/can/can.h | 2 +- firmware/controllers/sensors/tps.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/can/can.h b/firmware/controllers/can/can.h index d49705b853..261176de79 100644 --- a/firmware/controllers/can/can.h +++ b/firmware/controllers/can/can.h @@ -14,7 +14,7 @@ class Logging; void processCanRxMessage(const CANRxFrame& msg, Logging* logger); -class CanWrite final : public PeriodicController<256> { +class CanWrite final : public PeriodicController<512> { public: CanWrite(); void PeriodicTask(efitime_t nowNt) override; diff --git a/firmware/controllers/sensors/tps.cpp b/firmware/controllers/sensors/tps.cpp index b9f0426de5..9f1e799a46 100644 --- a/firmware/controllers/sensors/tps.cpp +++ b/firmware/controllers/sensors/tps.cpp @@ -217,6 +217,12 @@ percent_t getPedalPosition(DECLARE_ENGINE_PARAMETER_SIGNATURE) { if (mockPedalPosition != MOCK_UNDEFINED) { return mockPedalPosition; } + + // Don't choke without a pedal set + if (CONFIG(throttlePedalPositionAdcChannel) == EFI_ADC_NONE) { + return 0; + } + DISPLAY_TAG(PEDAL_SECTION); DISPLAY_TEXT(Analog_MCU_reads);