Merge pull request #1633 from mck1117/gppwm-load-axis
Add fuel/ign load as gppwm axes
This commit is contained in:
commit
f4e857bc71
|
@ -7,6 +7,7 @@
|
||||||
#include "expected.h"
|
#include "expected.h"
|
||||||
#include "sensor.h"
|
#include "sensor.h"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
|
#include "engine_math.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
|
@ -27,6 +28,10 @@ expected<float> readGppwmChannel(gppwm_channel_e channel DECLARE_ENGINE_PARAMETE
|
||||||
return Sensor::get(SensorType::Clt);
|
return Sensor::get(SensorType::Clt);
|
||||||
case GPPWM_Iat:
|
case GPPWM_Iat:
|
||||||
return Sensor::get(SensorType::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:
|
default:
|
||||||
return unexpected;
|
return unexpected;
|
||||||
}
|
}
|
||||||
|
|
|
@ -916,6 +916,10 @@ case GPPWM_Map:
|
||||||
return "GPPWM_Map";
|
return "GPPWM_Map";
|
||||||
case GPPWM_Tps:
|
case GPPWM_Tps:
|
||||||
return "GPPWM_Tps";
|
return "GPPWM_Tps";
|
||||||
|
case GPPWM_FuelLoad:
|
||||||
|
return "GPPWM_FuelLoad";
|
||||||
|
case GPPWM_IgnLoad:
|
||||||
|
return "GPPWM_IgnLoad";
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -952,6 +952,8 @@ typedef enum __attribute__ ((__packed__)) {
|
||||||
GPPWM_Map = 1,
|
GPPWM_Map = 1,
|
||||||
GPPWM_Clt = 2,
|
GPPWM_Clt = 2,
|
||||||
GPPWM_Iat = 3,
|
GPPWM_Iat = 3,
|
||||||
|
GPPWM_FuelLoad = 4,
|
||||||
|
GPPWM_IgnLoad = 5,
|
||||||
} gppwm_channel_e;
|
} gppwm_channel_e;
|
||||||
|
|
||||||
typedef enum __attribute__ ((__packed__)) {
|
typedef enum __attribute__ ((__packed__)) {
|
||||||
|
|
|
@ -289,8 +289,8 @@ struct spi_pins
|
||||||
end_struct
|
end_struct
|
||||||
|
|
||||||
|
|
||||||
#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT"
|
#define gppwm_channel_e_enum "TPS", "MAP", "CLT", "IAT", "Fuel Load", "Ignition Load", "INVALID", "INVALID"
|
||||||
custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:1], @@gppwm_channel_e_enum@@
|
custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:2], @@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.;
|
||||||
|
|
|
@ -363,10 +363,10 @@ enable2ndByteCanID = false
|
||||||
time = { timeNow }
|
time = { timeNow }
|
||||||
|
|
||||||
; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes
|
; These "synthetic" channels provide the Y-axis (load) value for gen purp PWM table's Y axes
|
||||||
gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : intake))}
|
gppwm1_load = {(gppwm1_loadAxis == 0) ? TPSValue : ((gppwm1_loadAxis == 1) ? MAPValue : ((gppwm1_loadAxis == 2) ? coolant : ((gppwm1_loadAxis == 3) ? intake : ((gppwm1_loadAxis == 4) ? fuelingLoad : ignitionLoad))))}
|
||||||
gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : intake))}
|
gppwm2_load = {(gppwm2_loadAxis == 0) ? TPSValue : ((gppwm2_loadAxis == 1) ? MAPValue : ((gppwm2_loadAxis == 2) ? coolant : ((gppwm2_loadAxis == 3) ? intake : ((gppwm2_loadAxis == 4) ? fuelingLoad : ignitionLoad))))}
|
||||||
gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : intake))}
|
gppwm3_load = {(gppwm3_loadAxis == 0) ? TPSValue : ((gppwm3_loadAxis == 1) ? MAPValue : ((gppwm3_loadAxis == 2) ? coolant : ((gppwm3_loadAxis == 3) ? intake : ((gppwm3_loadAxis == 4) ? fuelingLoad : ignitionLoad))))}
|
||||||
gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : intake))}
|
gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : ((gppwm4_loadAxis == 3) ? intake : ((gppwm4_loadAxis == 4) ? fuelingLoad : ignitionLoad))))}
|
||||||
|
|
||||||
[PcVariables]
|
[PcVariables]
|
||||||
tuneCrcPcVariable = continuousChannelValue, tuneCrc16
|
tuneCrcPcVariable = continuousChannelValue, tuneCrc16
|
||||||
|
|
Loading…
Reference in New Issue