gppwm vbatt axis (#3088)

This commit is contained in:
Matthew Kennedy 2021-07-31 18:20:19 -07:00 committed by GitHub
parent 990e2d9f4c
commit ab49f61a83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -28,6 +28,8 @@ expected<float> readGppwmChannel(gppwm_channel_e channel DECLARE_ENGINE_PARAMETE
return 0;
case GPPWM_AccelPedal:
return Sensor::get(SensorType::AcceleratorPedal);
case GPPWM_Vbatt:
return Sensor::get(SensorType::BatteryVoltage);
}
return unexpected;

View File

@ -1022,6 +1022,7 @@ typedef enum __attribute__ ((__packed__)) {
GPPWM_AuxTemp2 = 7,
GPPWM_Zero = 8,
GPPWM_AccelPedal = 9,
GPPWM_Vbatt = 10,
} gppwm_channel_e;
typedef enum __attribute__ ((__packed__)) {

View File

@ -336,7 +336,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", "Accel Pedal"
#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT", "Fuel Load", "Ignition Load", "Aux Temp 1", "Aux Temp 2", "Zero", "Accel Pedal", "Battery Voltage"
custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:3], @@gppwm_channel_e_enum@@
struct gppwm_channel