gppwm zero option (#2557)

Co-authored-by: Matthew Kennedy <makenne@microsoft.com>
This commit is contained in:
Matthew Kennedy 2021-04-14 22:08:34 -07:00 committed by GitHub
parent 7cea9ab533
commit 15a8dab795
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -28,6 +28,8 @@ expected<float> readGppwmChannel(gppwm_channel_e channel DECLARE_ENGINE_PARAMETE
return Sensor::get(SensorType::AuxTemp1); return Sensor::get(SensorType::AuxTemp1);
case GPPWM_AuxTemp2: case GPPWM_AuxTemp2:
return Sensor::get(SensorType::AuxTemp2); return Sensor::get(SensorType::AuxTemp2);
case GPPWM_Zero:
return 0;
} }
return unexpected; return unexpected;

View File

@ -1013,6 +1013,7 @@ typedef enum __attribute__ ((__packed__)) {
GPPWM_IgnLoad = 5, GPPWM_IgnLoad = 5,
GPPWM_AuxTemp1 = 6, GPPWM_AuxTemp1 = 6,
GPPWM_AuxTemp2 = 7, GPPWM_AuxTemp2 = 7,
GPPWM_Zero = 8,
} gppwm_channel_e; } gppwm_channel_e;
typedef enum __attribute__ ((__packed__)) { typedef enum __attribute__ ((__packed__)) {

View File

@ -331,8 +331,8 @@ 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" #define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT", "Fuel Load", "Ignition Load", "Aux Temp 1", "Aux Temp 2", "Zero"
custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:2], @@gppwm_channel_e_enum@@ custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:3], @@gppwm_channel_e_enum@@
struct gppwm_channel struct gppwm_channel
output_pin_e pin;+Select a pin to use for PWM or on-off output.; output_pin_e pin;+Select a pin to use for PWM or on-off output.;