add pedal to gppwm (#2748)

* add pedal to gppwm

* string
This commit is contained in:
Matthew Kennedy 2021-05-28 01:38:45 -06:00 committed by GitHub
parent bbf9f2d568
commit 2667810942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -30,6 +30,8 @@ expected<float> 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;

View File

@ -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__)) {

View File

@ -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