mirror of https://github.com/FOME-Tech/fome-fw.git
detected gear available as gppwm channel
This commit is contained in:
parent
e1a7a4cff4
commit
f29b51d490
|
@ -66,6 +66,8 @@ expected<float> readGppwmChannel(gppwm_channel_e channel) {
|
|||
return (float)engine->outputChannels.gppwmOutput[2];
|
||||
case GPPWM_GppwmOutput4:
|
||||
return (float)engine->outputChannels.gppwmOutput[3];
|
||||
case GPPWM_DetectedGear:
|
||||
return engine->module<GearDetector>()->getCurrentGear();
|
||||
}
|
||||
|
||||
return unexpected;
|
||||
|
|
|
@ -554,6 +554,7 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
GPPWM_LuaGauge1 = 22,
|
||||
GPPWM_LuaGauge2 = 23,
|
||||
GPPWM_Rpm = 24,
|
||||
GPPWM_DetectedGear = 25,
|
||||
} gppwm_channel_e;
|
||||
|
||||
typedef enum __attribute__ ((__packed__)) {
|
||||
|
|
|
@ -313,7 +313,7 @@ struct spi_pins
|
|||
Gpio sckPin;
|
||||
end_struct
|
||||
|
||||
#define gppwm_channel_e_enum "Zero", "TPS", "MAP", "CLT", "IAT", "Fuel Load", "Ignition Load", "Aux Temp 1", "Aux Temp 2", "Accel Pedal", "Battery Voltage", "VVT 1 I", "VVT 1 E", "VVT 2 I", "VVT 2 E", "Ethanol (Flex) %", "Aux Linear 1", "Aux Linear 2", "GPPWM Output 1", "GPPWM Output 2", "GPPWM Output 3", "GPPWM Output 4", "Lua Gauge 1", "Lua Gauge 2", "RPM"
|
||||
#define gppwm_channel_e_enum "Zero", "TPS", "MAP", "CLT", "IAT", "Fuel Load", "Ignition Load", "Aux Temp 1", "Aux Temp 2", "Accel Pedal", "Battery Voltage", "VVT 1 I", "VVT 1 E", "VVT 2 I", "VVT 2 E", "Ethanol (Flex) %", "Aux Linear 1", "Aux Linear 2", "GPPWM Output 1", "GPPWM Output 2", "GPPWM Output 3", "GPPWM Output 4", "Lua Gauge 1", "Lua Gauge 2", "RPM", "Gear (detected)"
|
||||
custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:4], @@gppwm_channel_e_enum@@
|
||||
|
||||
struct gppwm_channel
|
||||
|
|
Loading…
Reference in New Issue