brakePedalPinInverted & throttlePedalPosition gauge improvement

This commit is contained in:
rusefi 2024-05-12 13:54:46 -04:00
parent 3b34f6b81e
commit 2e0d30a64f
3 changed files with 4 additions and 3 deletions

View File

@ -235,7 +235,7 @@ static bool getClutchUpState() {
static bool getBrakePedalState() {
if (isBrainPinValid(engineConfiguration->brakePedalPin)) {
return efiReadPin(engineConfiguration->brakePedalPin);
return engineConfiguration->brakePedalPinInverted ^ efiReadPin(engineConfiguration->brakePedalPin);
}
// todo: boolean sensors should leverage sensor framework #6342
return engine->engineState.lua.brakePedalState;

View File

@ -1192,7 +1192,7 @@ int16_t tps2Max;Full throttle#2. tpsMax value as 10 bit ADC value. Not Voltage!\
bit startRequestPinInverted,"Inverted","Normal"
bit tcu_rangeSensorPulldown
bit skipBoardCanDash
bit unusedBit_503_19
bit brakePedalPinInverted,"Inverted","Normal"
bit devBit0
bit devBit1
bit devBit2

View File

@ -1591,7 +1591,7 @@ gaugeCategory = Fueling
currentTargetAfrGauge = targetAFR,"fuel: target AFR", "", 0.65, 1.2, 0.7, 0.75, 1.1, 1.15, 3, 2
gaugeCategory = Throttle Body (incl. ETB)
pedalPositionGauge = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, "%", 0, 120, 0, 0, 100, 100, 1, 1
pedalPositionGauge = throttlePedalPosition, @@GAUGE_NAME_THROTTLE_PEDAL@@, "%", -20, 120, -10, -5, 105, 110, 1, 1
tpsADCGauge = tpsADC, "tps1 ADC", "ADC", 0, 1024, 0, 0, 0, 0, 0, 0
TPSGauge = TPSValue, "Throttle position", "%", 0, 100, 0, 0, 100, 100, 1, 1
TPS2Gauge = TPS2Value, "Throttle position #2", "%", 0, 100, 0, 0, 100, 100, 1, 1
@ -3096,6 +3096,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_
field = "Clutch Up mode", clutchUpPinMode
field = "Throttle Up switch", throttlePedalUpPin
field = "Brake Pedal", brakePedalPin
field = "Brake Pedak signal", brakePedalPinInverted
field = "Brake Pedal Mode", brakePedalPinMode
field = "Flex fuel sensor", flexSensorPin
field = "Flex Signal", flexSensorInverted