From 26678109425df87074de185af8cbee7631c51d1e Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Fri, 28 May 2021 01:38:45 -0600 Subject: [PATCH] add pedal to gppwm (#2748) * add pedal to gppwm * string --- firmware/controllers/actuators/gppwm/gppwm_channel.cpp | 2 ++ firmware/controllers/algo/rusefi_enums.h | 1 + firmware/integration/rusefi_config.txt | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/actuators/gppwm/gppwm_channel.cpp b/firmware/controllers/actuators/gppwm/gppwm_channel.cpp index d7f0458773..6023f41d12 100644 --- a/firmware/controllers/actuators/gppwm/gppwm_channel.cpp +++ b/firmware/controllers/actuators/gppwm/gppwm_channel.cpp @@ -30,6 +30,8 @@ expected readGppwmChannel(gppwm_channel_e channel DECLARE_ENGINE_PARAMETE return Sensor::get(SensorType::AuxTemp2); case GPPWM_Zero: return 0; + case GPPWM_AccelPedal: + return Sensor::get(SensorType::AcceleratorPedal); } return unexpected; diff --git a/firmware/controllers/algo/rusefi_enums.h b/firmware/controllers/algo/rusefi_enums.h index 221455a007..0926effaa5 100644 --- a/firmware/controllers/algo/rusefi_enums.h +++ b/firmware/controllers/algo/rusefi_enums.h @@ -1000,6 +1000,7 @@ typedef enum __attribute__ ((__packed__)) { GPPWM_AuxTemp1 = 6, GPPWM_AuxTemp2 = 7, GPPWM_Zero = 8, + GPPWM_AccelPedal = 9, } gppwm_channel_e; typedef enum __attribute__ ((__packed__)) { diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index a0b3160066..f6e67927d5 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -334,7 +334,7 @@ struct spi_pins end_struct -#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT", "Fuel Load", "Ignition Load", "Aux Temp 1", "Aux Temp 2", "Zero" +#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT", "Fuel Load", "Ignition Load", "Aux Temp 1", "Aux Temp 2", "Zero", "Accel Pedal" custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:3], @@gppwm_channel_e_enum@@ struct gppwm_channel