gppwm vbatt axis (#3088)
This commit is contained in:
parent
990e2d9f4c
commit
ab49f61a83
|
@ -28,6 +28,8 @@ expected<float> readGppwmChannel(gppwm_channel_e channel DECLARE_ENGINE_PARAMETE
|
||||||
return 0;
|
return 0;
|
||||||
case GPPWM_AccelPedal:
|
case GPPWM_AccelPedal:
|
||||||
return Sensor::get(SensorType::AcceleratorPedal);
|
return Sensor::get(SensorType::AcceleratorPedal);
|
||||||
|
case GPPWM_Vbatt:
|
||||||
|
return Sensor::get(SensorType::BatteryVoltage);
|
||||||
}
|
}
|
||||||
|
|
||||||
return unexpected;
|
return unexpected;
|
||||||
|
|
|
@ -1022,6 +1022,7 @@ typedef enum __attribute__ ((__packed__)) {
|
||||||
GPPWM_AuxTemp2 = 7,
|
GPPWM_AuxTemp2 = 7,
|
||||||
GPPWM_Zero = 8,
|
GPPWM_Zero = 8,
|
||||||
GPPWM_AccelPedal = 9,
|
GPPWM_AccelPedal = 9,
|
||||||
|
GPPWM_Vbatt = 10,
|
||||||
} gppwm_channel_e;
|
} gppwm_channel_e;
|
||||||
|
|
||||||
typedef enum __attribute__ ((__packed__)) {
|
typedef enum __attribute__ ((__packed__)) {
|
||||||
|
|
|
@ -336,7 +336,7 @@ struct spi_pins
|
||||||
end_struct
|
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@@
|
custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:3], @@gppwm_channel_e_enum@@
|
||||||
|
|
||||||
struct gppwm_channel
|
struct gppwm_channel
|
||||||
|
|
Loading…
Reference in New Issue