more gppwm options (#4585)
* more gppwm options * fix ui * gppwm list size
This commit is contained in:
parent
efb232223f
commit
87649b9f72
|
@ -8,6 +8,8 @@
|
|||
|
||||
expected<float> readGppwmChannel(gppwm_channel_e channel) {
|
||||
switch (channel) {
|
||||
case GPPWM_Zero:
|
||||
return 0;
|
||||
case GPPWM_Tps:
|
||||
return Sensor::get(SensorType::Tps1);
|
||||
case GPPWM_Map:
|
||||
|
@ -24,12 +26,24 @@ expected<float> readGppwmChannel(gppwm_channel_e channel) {
|
|||
return Sensor::get(SensorType::AuxTemp1);
|
||||
case GPPWM_AuxTemp2:
|
||||
return Sensor::get(SensorType::AuxTemp2);
|
||||
case GPPWM_Zero:
|
||||
return 0;
|
||||
case GPPWM_AccelPedal:
|
||||
return Sensor::get(SensorType::AcceleratorPedal);
|
||||
case GPPWM_Vbatt:
|
||||
return Sensor::get(SensorType::BatteryVoltage);
|
||||
case GPPWM_VVT_1I:
|
||||
return engine->triggerCentral.getVVTPosition(/*bankIndex*/0, /*camIndex*/0);
|
||||
case GPPWM_VVT_1E:
|
||||
return engine->triggerCentral.getVVTPosition(/*bankIndex*/0, /*camIndex*/1);
|
||||
case GPPWM_VVT_2I:
|
||||
return engine->triggerCentral.getVVTPosition(/*bankIndex*/1, /*camIndex*/0);
|
||||
case GPPWM_VVT_2E:
|
||||
return engine->triggerCentral.getVVTPosition(/*bankIndex*/1, /*camIndex*/1);
|
||||
case GPPWM_EthanolPercent:
|
||||
return Sensor::get(SensorType::FuelEthanolPercent);
|
||||
case GPPWM_AuxLinear1:
|
||||
return Sensor::get(SensorType::AuxLinear1);
|
||||
case GPPWM_AuxLinear2:
|
||||
return Sensor::get(SensorType::AuxLinear2);
|
||||
}
|
||||
|
||||
return unexpected;
|
||||
|
|
|
@ -529,17 +529,24 @@ typedef enum __attribute__ ((__packed__)) {
|
|||
} antiLagActivationMode_e;
|
||||
|
||||
typedef enum __attribute__ ((__packed__)) {
|
||||
GPPWM_Tps = 0,
|
||||
GPPWM_Map = 1,
|
||||
GPPWM_Clt = 2,
|
||||
GPPWM_Iat = 3,
|
||||
GPPWM_FuelLoad = 4,
|
||||
GPPWM_IgnLoad = 5,
|
||||
GPPWM_AuxTemp1 = 6,
|
||||
GPPWM_AuxTemp2 = 7,
|
||||
GPPWM_Zero = 8,
|
||||
GPPWM_Zero = 0,
|
||||
GPPWM_Tps = 1,
|
||||
GPPWM_Map = 2,
|
||||
GPPWM_Clt = 3,
|
||||
GPPWM_Iat = 4,
|
||||
GPPWM_FuelLoad = 5,
|
||||
GPPWM_IgnLoad = 6,
|
||||
GPPWM_AuxTemp1 = 7,
|
||||
GPPWM_AuxTemp2 = 8,
|
||||
GPPWM_AccelPedal = 9,
|
||||
GPPWM_Vbatt = 10,
|
||||
GPPWM_VVT_1I = 11,
|
||||
GPPWM_VVT_1E = 12,
|
||||
GPPWM_VVT_2I = 13,
|
||||
GPPWM_VVT_2E = 14,
|
||||
GPPWM_EthanolPercent = 15,
|
||||
GPPWM_AuxLinear1 = 16,
|
||||
GPPWM_AuxLinear2 = 17,
|
||||
} gppwm_channel_e;
|
||||
|
||||
typedef enum __attribute__ ((__packed__)) {
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
! Any time an incompatible change is made to the configuration format stored in flash,
|
||||
! update this string to the current date! It is required to also update TS_SIGNATURE above
|
||||
! when this happens.
|
||||
#define FLASH_DATA_VERSION 10014
|
||||
#define FLASH_DATA_VERSION 10015
|
||||
|
||||
! this offset is part of console compatibility mechanism, please DO NOT change this offset
|
||||
#define TS_FILE_VERSION_OFFSET 124
|
||||
|
@ -347,8 +347,8 @@ struct spi_pins
|
|||
end_struct
|
||||
|
||||
|
||||
#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@@
|
||||
#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"
|
||||
custom gppwm_channel_e 1 bits, U08, @OFFSET@, [0:4], @@gppwm_channel_e_enum@@
|
||||
|
||||
struct gppwm_channel
|
||||
output_pin_e pin;+Select a pin to use for PWM or on-off output.;
|
||||
|
|
|
@ -189,10 +189,10 @@ enable2ndByteCanID = false
|
|||
egoCorrectionForVeAnalyze = { 100 + fuelPidCorrection1 }
|
||||
|
||||
; 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 : ((gppwm1_loadAxis == 3) ? intake : ((gppwm1_loadAxis == 4) ? fuelingLoad : ignitionLoad))))}
|
||||
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 : ((gppwm3_loadAxis == 3) ? intake : ((gppwm3_loadAxis == 4) ? fuelingLoad : ignitionLoad))))}
|
||||
gppwm4_load = {(gppwm4_loadAxis == 0) ? TPSValue : ((gppwm4_loadAxis == 1) ? MAPValue : ((gppwm4_loadAxis == 2) ? coolant : ((gppwm4_loadAxis == 3) ? intake : ((gppwm4_loadAxis == 4) ? fuelingLoad : ignitionLoad))))}
|
||||
gppwm1_load = {(gppwm1_loadAxis == 0) ? 0 : (gppwm1_loadAxis == 1) ? TPSValue : (gppwm1_loadAxis == 2) ? MAPValue : (gppwm1_loadAxis == 3) ? coolant : (gppwm1_loadAxis == 4) ? intake : (gppwm1_loadAxis == 5) ? fuelingLoad : (gppwm1_loadAxis == 6) ? ignitionLoad : (gppwm1_loadAxis == 7) ? auxTemp1 : (gppwm1_loadAxis == 8) ? auxTemp2 : (gppwm1_loadAxis == 9) ? throttlePedalPosition : (gppwm1_loadAxis == 10) ? VBatt : (gppwm1_loadAxis == 11) ? vvtPositionB1I : (gppwm1_loadAxis == 12) ? vvtPositionB1E : (gppwm1_loadAxis == 13) ? vvtPositionB2I : (gppwm1_loadAxis == 14) ? vvtPositionB2E : (gppwm1_loadAxis == 15) ? flexPercent : (gppwm1_loadAxis == 16) ? auxLinear1 : (gppwm1_loadAxis == 17) ? auxLinear2 : 0}
|
||||
gppwm2_load = {(gppwm2_loadAxis == 0) ? 0 : (gppwm2_loadAxis == 1) ? TPSValue : (gppwm2_loadAxis == 2) ? MAPValue : (gppwm2_loadAxis == 3) ? coolant : (gppwm2_loadAxis == 4) ? intake : (gppwm2_loadAxis == 5) ? fuelingLoad : (gppwm2_loadAxis == 6) ? ignitionLoad : (gppwm2_loadAxis == 7) ? auxTemp1 : (gppwm2_loadAxis == 8) ? auxTemp2 : (gppwm2_loadAxis == 9) ? throttlePedalPosition : (gppwm2_loadAxis == 10) ? VBatt : (gppwm2_loadAxis == 11) ? vvtPositionB1I : (gppwm2_loadAxis == 12) ? vvtPositionB1E : (gppwm2_loadAxis == 13) ? vvtPositionB2I : (gppwm2_loadAxis == 14) ? vvtPositionB2E : (gppwm2_loadAxis == 15) ? flexPercent : (gppwm2_loadAxis == 16) ? auxLinear1 : (gppwm2_loadAxis == 17) ? auxLinear2 : 0}
|
||||
gppwm3_load = {(gppwm3_loadAxis == 0) ? 0 : (gppwm3_loadAxis == 1) ? TPSValue : (gppwm3_loadAxis == 2) ? MAPValue : (gppwm3_loadAxis == 3) ? coolant : (gppwm3_loadAxis == 4) ? intake : (gppwm3_loadAxis == 5) ? fuelingLoad : (gppwm3_loadAxis == 6) ? ignitionLoad : (gppwm3_loadAxis == 7) ? auxTemp1 : (gppwm3_loadAxis == 8) ? auxTemp2 : (gppwm3_loadAxis == 9) ? throttlePedalPosition : (gppwm3_loadAxis == 10) ? VBatt : (gppwm3_loadAxis == 11) ? vvtPositionB1I : (gppwm3_loadAxis == 12) ? vvtPositionB1E : (gppwm3_loadAxis == 13) ? vvtPositionB2I : (gppwm3_loadAxis == 14) ? vvtPositionB2E : (gppwm3_loadAxis == 15) ? flexPercent : (gppwm3_loadAxis == 16) ? auxLinear1 : (gppwm3_loadAxis == 17) ? auxLinear2 : 0}
|
||||
gppwm4_load = {(gppwm4_loadAxis == 0) ? 0 : (gppwm4_loadAxis == 1) ? TPSValue : (gppwm4_loadAxis == 2) ? MAPValue : (gppwm4_loadAxis == 3) ? coolant : (gppwm4_loadAxis == 4) ? intake : (gppwm4_loadAxis == 5) ? fuelingLoad : (gppwm4_loadAxis == 6) ? ignitionLoad : (gppwm4_loadAxis == 7) ? auxTemp1 : (gppwm4_loadAxis == 8) ? auxTemp2 : (gppwm4_loadAxis == 9) ? throttlePedalPosition : (gppwm4_loadAxis == 10) ? VBatt : (gppwm4_loadAxis == 11) ? vvtPositionB1I : (gppwm4_loadAxis == 12) ? vvtPositionB1E : (gppwm4_loadAxis == 13) ? vvtPositionB2I : (gppwm4_loadAxis == 14) ? vvtPositionB2E : (gppwm4_loadAxis == 15) ? flexPercent : (gppwm4_loadAxis == 16) ? auxLinear1 : (gppwm4_loadAxis == 17) ? auxLinear2 : 0}
|
||||
|
||||
[PcVariables]
|
||||
tuneCrcPcVariable = continuousChannelValue, tuneCrc16
|
||||
|
|
Loading…
Reference in New Issue