add new options

This commit is contained in:
Matthew Kennedy 2020-07-23 02:51:08 -07:00
parent 50aad7496f
commit 5e681cac1a
3 changed files with 9 additions and 2 deletions

View File

@ -7,6 +7,7 @@
#include "expected.h"
#include "sensor.h"
#include "map.h"
#include "engine_math.h"
EXTERN_ENGINE;
@ -27,6 +28,10 @@ expected<float> readGppwmChannel(gppwm_channel_e channel DECLARE_ENGINE_PARAMETE
return Sensor::get(SensorType::Clt);
case GPPWM_Iat:
return Sensor::get(SensorType::Iat);
case GPPWM_FuelLoad:
return getFuelingLoad(PASS_ENGINE_PARAMETER_SIGNATURE);
case GPPWM_IgnLoad:
return getIgnitionLoad(PASS_ENGINE_PARAMETER_SIGNATURE);
default:
return unexpected;
}

View File

@ -952,6 +952,8 @@ typedef enum __attribute__ ((__packed__)) {
GPPWM_Map = 1,
GPPWM_Clt = 2,
GPPWM_Iat = 3,
GPPWM_FuelLoad = 4,
GPPWM_IgnLoad = 5,
} gppwm_channel_e;
typedef enum __attribute__ ((__packed__)) {

View File

@ -289,8 +289,8 @@ struct spi_pins
end_struct
#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT"
custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:1], @@gppwm_channel_e_enum@@
#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT", "Fuel Load", "Ignition Load", "INVALID", "INVALID"
custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:2], @@gppwm_channel_e_enum@@
struct gppwm_channel
output_pin_e pin;+Select a pin to use for PWM or on-off output.;