live data progress
This commit is contained in:
parent
e7175f2079
commit
2016ecbe98
|
@ -193,6 +193,7 @@ entry = tps2Split, "tps2Split", float, "%.3f"
|
|||
entry = tps12Split, "tps12Split", float, "%.3f"
|
||||
entry = accPedalSplit, "accPedalSplit", float, "%.3f"
|
||||
entry = m_requested_pump, "DI: Pump Angle", float, "%.3f"
|
||||
entry = boostControlTarget, "Pump Angle", float, "%.3f"
|
||||
entry = fuel_requested_percent, "DI: fuel_requested_percent", float, "%.3f"
|
||||
entry = fuel_requested_percent_pi, "DI: fuel_requested_percent_pi", float, "%.3f"
|
||||
entry = m_I_sum_percent, "DI: m_I_sum_percent", float, "%.3f"
|
||||
|
@ -205,6 +206,9 @@ entry = launchIsLaunchCondition, "launchIsLaunchCondition", int, "%d"
|
|||
entry = launchCombinedConditions, "launchCombinedConditions", int, "%d"
|
||||
entry = launchActivatePinState, "launchActivatePinState", int, "%d"
|
||||
entry = TEMPLOG_MAP_AT_CYCLE_COUNT, "TEMPLOG_MAP_AT_CYCLE_COUNT", int, "%d"
|
||||
entry = boostControllerOutput, "boostControllerOutput", int, "%d"
|
||||
entry = boostControllerClosedLoopPart, "boostControllerClosedLoopPart", int, "%d"
|
||||
entry = boostControllerOpenLoopPart, "boostControllerOpenLoopPart", int, "%d"
|
||||
entry = TEMPLOG_MAP_AT_SPECIAL_POINT, "TEMPLOG_MAP_AT_SPECIAL_POINT", float, "%.3f"
|
||||
entry = TEMPLOG_MAP_AT_DIFF, "TEMPLOG_MAP_AT_DIFF", float, "%.3f"
|
||||
entry = vvtSyncGapRatio, "vvtSyncGapRatio", float, "%.3f"
|
||||
|
|
|
@ -193,7 +193,7 @@ tps2SplitGauge = tps2Split,"tps2Split", "%", 0.0,0.0, 0.0,0.0, 0.0,0.0, 0,0
|
|||
tps12SplitGauge = tps12Split,"tps12Split", "%", 0.0,0.0, 0.0,0.0, 0.0,0.0, 0,0
|
||||
accPedalSplitGauge = accPedalSplit,"accPedalSplit", "%", 0.0,0.0, 0.0,0.0, 0.0,0.0, 0,0
|
||||
m_requested_pumpGauge = m_requested_pump,"DI: Pump Angle", "deg", 0.0,0.0, 0.0,0.0, 0.0,0.0, 0,0
|
||||
unused16Gauge = unused16,"Pump Angle", "deg", 0.0,0.0, 0.0,0.0, 0.0,0.0, 0,0
|
||||
boostControlTargetGauge = boostControlTarget,"Pump Angle", "deg", 0.0,0.0, 0.0,0.0, 0.0,0.0, 0,0
|
||||
alignmentFill_at_338Gauge = alignmentFill_at_338,"need 4 byte alignment", "units", -20.0,100.0, -20.0,100.0, -20.0,100.0, 0,0
|
||||
fuel_requested_percentGauge = fuel_requested_percent,"DI: fuel_requested_percent", "v", 0.0,100.0, 0.0,100.0, 0.0,100.0, 0,0
|
||||
fuel_requested_percent_piGauge = fuel_requested_percent_pi,"DI: fuel_requested_percent_pi", "v", 0.0,100.0, 0.0,100.0, 0.0,100.0, 0,0
|
||||
|
@ -260,10 +260,9 @@ unusedBit_178_29Gauge = unusedBit_178_29,"unusedBit_178_29", "", -1.0,-1.0, -1.0
|
|||
unusedBit_178_30Gauge = unusedBit_178_30,"unusedBit_178_30", "", -1.0,-1.0, -1.0,-1.0, -1.0,-1.0, -1,-1
|
||||
unusedBit_178_31Gauge = unusedBit_178_31,"unusedBit_178_31", "", -1.0,-1.0, -1.0,-1.0, -1.0,-1.0, -1,-1
|
||||
TEMPLOG_MAP_AT_CYCLE_COUNTGauge = TEMPLOG_MAP_AT_CYCLE_COUNT,"TEMPLOG_MAP_AT_CYCLE_COUNT", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
unused11Gauge = unused11,"unused11", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
unused11Gauge = unused11,"unused11", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
unused11Gauge = unused11,"unused11", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
alignmentFill_at_474Gauge = alignmentFill_at_474,"need 4 byte alignment", "units", -20.0,100.0, -20.0,100.0, -20.0,100.0, 0,0
|
||||
boostControllerOutputGauge = boostControllerOutput,"boostControllerOutput", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 0,0
|
||||
boostControllerClosedLoopPartGauge = boostControllerClosedLoopPart,"boostControllerClosedLoopPart", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 0,0
|
||||
boostControllerOpenLoopPartGauge = boostControllerOpenLoopPart,"boostControllerOpenLoopPart", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 0,0
|
||||
TEMPLOG_MAP_AT_SPECIAL_POINTGauge = TEMPLOG_MAP_AT_SPECIAL_POINT,"TEMPLOG_MAP_AT_SPECIAL_POINT", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
TEMPLOG_MAP_AT_DIFFGauge = TEMPLOG_MAP_AT_DIFF,"TEMPLOG_MAP_AT_DIFF", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
vvtSyncGapRatioGauge = vvtSyncGapRatio,"vvtSyncGapRatio", "", -10000.0,10000.0, -10000.0,10000.0, -10000.0,10000.0, 3,3
|
||||
|
|
|
@ -193,7 +193,7 @@ tps2Split = scalar, S16, 328, "%", 0.01, 0
|
|||
tps12Split = scalar, S16, 330, "%", 0.01, 0
|
||||
accPedalSplit = scalar, S16, 332, "%", 0.01, 0
|
||||
m_requested_pump = scalar, S16, 334, "deg", 0.02, 0
|
||||
unused16 = scalar, S16, 336, "deg", 0.02, 0
|
||||
boostControlTarget = scalar, S16, 336, "deg", 0.03333333333333333, 0
|
||||
alignmentFill_at_338 = array, U08, 338, [2], "units", 1, 0
|
||||
fuel_requested_percent = scalar, F32, 340, "v", 1, 0
|
||||
fuel_requested_percent_pi = scalar, F32, 344, "v", 1, 0
|
||||
|
@ -260,10 +260,9 @@ unusedBit_178_29 = bits, U32, 468, [29:29]
|
|||
unusedBit_178_30 = bits, U32, 468, [30:30]
|
||||
unusedBit_178_31 = bits, U32, 468, [31:31]
|
||||
TEMPLOG_MAP_AT_CYCLE_COUNT = scalar, U08, 472, "", 1, 0
|
||||
unused11 = scalar, U08, 473, "", 1, 0
|
||||
unused11 = scalar, U08, 473, "", 1, 0
|
||||
unused11 = scalar, U08, 473, "", 1, 0
|
||||
alignmentFill_at_474 = array, U08, 474, [2], "units", 1, 0
|
||||
boostControllerOutput = scalar, U08, 473, "", 1, 0
|
||||
boostControllerClosedLoopPart = scalar, U08, 474, "", 1, 0
|
||||
boostControllerOpenLoopPart = scalar, U08, 475, "", 1, 0
|
||||
TEMPLOG_MAP_AT_SPECIAL_POINT = scalar, F32, 476, "", 1, 0
|
||||
TEMPLOG_MAP_AT_DIFF = scalar, F32, 480, "", 1, 0
|
||||
vvtSyncGapRatio = scalar, F32, 484, "", 1, 0
|
||||
|
|
|
@ -260,7 +260,7 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 0, 0
|
|||
int16_t autoscale accPedalSplit;;"%",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0
|
||||
|
||||
int16_t autoscale m_requested_pump;"DI: Pump Angle";"deg",{1/@@PACK_MULT_ANGLE@@}, 0, 0, 0, 0
|
||||
int16_t autoscale unused16;"Pump Angle";"deg",{1/@@PACK_MULT_ANGLE@@}, 0, 0, 0, 0
|
||||
int16_t autoscale boostControlTarget;"Pump Angle";"deg",{1/@@PACK_MULT_PRESSURE@@}, 0, 0, 0, 0
|
||||
float fuel_requested_percent;"DI: fuel_requested_percent";"v", 1, 0, 0, 100, 0
|
||||
float fuel_requested_percent_pi;"DI: fuel_requested_percent_pi";"v", 1, 0, 0, 100, 0
|
||||
float m_I_sum_percent;"DI: m_I_sum_percent";"v", 1, 0, 0, 100, 0
|
||||
|
@ -279,9 +279,9 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 0, 0
|
|||
bit launchActivatePinState
|
||||
|
||||
uint8_t TEMPLOG_MAP_AT_CYCLE_COUNT;;"", 1, 0, -10000, 10000, 3
|
||||
uint8_t unused11;;"", 1, 0, -10000, 10000, 3
|
||||
uint8_t unused11;;"", 1, 0, -10000, 10000, 3
|
||||
uint8_t unused11;;"", 1, 0, -10000, 10000, 3
|
||||
uint8_t boostControllerOutput;;"", 1, 0, -10000, 10000, 0
|
||||
uint8_t boostControllerClosedLoopPart;;"", 1, 0, -10000, 10000, 0
|
||||
uint8_t boostControllerOpenLoopPart;;"", 1, 0, -10000, 10000, 0
|
||||
|
||||
float autoscale TEMPLOG_MAP_AT_SPECIAL_POINT;;"", 1, 0, -10000, 10000, 3
|
||||
float autoscale TEMPLOG_MAP_AT_DIFF;;"", 1, 0, -10000, 10000, 3
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Sat Jan 01 17:12:52 EST 2022
|
||||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Sun Jan 02 00:45:34 EST 2022
|
||||
// by class com.rusefi.output.CHeaderConsumer
|
||||
// begin
|
||||
#pragma once
|
||||
|
@ -862,7 +862,7 @@ struct ts_outputs_s {
|
|||
deg
|
||||
* offset 336
|
||||
*/
|
||||
scaled_channel<int16_t, 50, 1> unused16 = (int16_t)0;
|
||||
scaled_channel<int16_t, 30, 1> boostControlTarget = (int16_t)0;
|
||||
/**
|
||||
* need 4 byte alignment
|
||||
units
|
||||
|
@ -1000,13 +1000,15 @@ struct ts_outputs_s {
|
|||
/**
|
||||
* offset 473
|
||||
*/
|
||||
uint8_t unused11 = (uint8_t)0;
|
||||
uint8_t boostControllerOutput = (uint8_t)0;
|
||||
/**
|
||||
* need 4 byte alignment
|
||||
units
|
||||
* offset 474
|
||||
*/
|
||||
uint8_t alignmentFill_at_474[2];
|
||||
uint8_t boostControllerClosedLoopPart = (uint8_t)0;
|
||||
/**
|
||||
* offset 475
|
||||
*/
|
||||
uint8_t boostControllerOpenLoopPart = (uint8_t)0;
|
||||
/**
|
||||
* offset 476
|
||||
*/
|
||||
|
@ -1188,4 +1190,4 @@ struct ts_outputs_s {
|
|||
};
|
||||
|
||||
// end
|
||||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Sat Jan 01 17:12:52 EST 2022
|
||||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) console/binary/output_channels.txt Sun Jan 02 00:45:34 EST 2022
|
||||
|
|
|
@ -52,15 +52,13 @@ expected<float> BoostController::getSetpoint() {
|
|||
float rpm = GET_RPM();
|
||||
|
||||
auto tps = Sensor::get(SensorType::DriverThrottleIntent);
|
||||
isTpsValid = tps.Valid;
|
||||
isTpsInvalid = !tps.Valid;
|
||||
|
||||
if (!isTpsValid) {
|
||||
if (isTpsInvalid) {
|
||||
return unexpected;
|
||||
}
|
||||
|
||||
if (!m_closedLoopTargetMap) {
|
||||
return unexpected;
|
||||
}
|
||||
efiAssert(OBD_PCM_Processor_Fault, m_closedLoopTargetMap != nullptr, "boost closed loop target", unexpected);
|
||||
|
||||
return m_closedLoopTargetMap->getValue(rpm, tps.Value);
|
||||
}
|
||||
|
@ -72,25 +70,21 @@ expected<percent_t> BoostController::getOpenLoop(float target) {
|
|||
float rpm = GET_RPM();
|
||||
auto tps = Sensor::get(SensorType::DriverThrottleIntent);
|
||||
|
||||
isTpsValid = tps.Valid;
|
||||
isTpsInvalid = !tps.Valid;
|
||||
|
||||
if (!isTpsValid) {
|
||||
if (isTpsInvalid) {
|
||||
return unexpected;
|
||||
}
|
||||
|
||||
if (!m_openLoopMap) {
|
||||
return unexpected;
|
||||
}
|
||||
efiAssert(OBD_PCM_Processor_Fault, m_openLoopMap != nullptr, "boost open loop", unexpected);
|
||||
|
||||
percent_t openLoop = m_openLoopMap->getValue(rpm, tps.Value);
|
||||
openLoopPart = m_openLoopMap->getValue(rpm, tps.Value);
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
if (engineConfiguration->debugMode == DBG_BOOST) {
|
||||
engine->outputChannels.debugFloatField1 = openLoop;
|
||||
}
|
||||
engine->outputChannels.boostControllerOpenLoopPart = openLoopPart;
|
||||
#endif
|
||||
|
||||
return openLoop;
|
||||
return openLoopPart;
|
||||
}
|
||||
|
||||
percent_t BoostController::getClosedLoopImpl(float target, float manifoldPressure) {
|
||||
|
@ -107,7 +101,8 @@ percent_t BoostController::getClosedLoopImpl(float target, float manifoldPressur
|
|||
}
|
||||
|
||||
// If the engine isn't running, don't correct.
|
||||
if (GET_RPM() == 0) {
|
||||
isZeroRpm = GET_RPM() == 0;
|
||||
if (isZeroRpm) {
|
||||
m_pid.reset();
|
||||
return 0;
|
||||
}
|
||||
|
@ -121,6 +116,7 @@ percent_t BoostController::getClosedLoopImpl(float target, float manifoldPressur
|
|||
}
|
||||
|
||||
closedLoopPart = m_pid.getOutput(target, manifoldPressure, SLOW_CALLBACK_PERIOD_MS / 1000.0f);
|
||||
engine->outputChannels.boostControllerClosedLoopPart = closedLoopPart;
|
||||
return closedLoopPart;
|
||||
}
|
||||
|
||||
|
@ -128,10 +124,7 @@ expected<percent_t> BoostController::getClosedLoop(float target, float manifoldP
|
|||
auto closedLoop = getClosedLoopImpl(target, manifoldPressure);
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
if (engineConfiguration->debugMode == DBG_BOOST) {
|
||||
engine->outputChannels.debugFloatField2 = closedLoop;
|
||||
engine->outputChannels.debugFloatField3 = target;
|
||||
}
|
||||
engine->outputChannels.boostControlTarget = target;
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
return closedLoop;
|
||||
|
@ -141,9 +134,7 @@ void BoostController::setOutput(expected<float> output) {
|
|||
percent_t percent = output.value_or(engineConfiguration->boostControlSafeDutyCycle);
|
||||
|
||||
#if EFI_TUNER_STUDIO
|
||||
if (engineConfiguration->debugMode == DBG_BOOST) {
|
||||
engine->outputChannels.debugFloatField3 = percent;
|
||||
}
|
||||
engine->outputChannels.boostControllerOutput = percent;
|
||||
#endif /* EFI_TUNER_STUDIO */
|
||||
|
||||
float duty = PERCENT_TO_DUTY(percent);
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
struct_no_prefix boost_control_s
|
||||
|
||||
bit isTpsValid
|
||||
bit isTpsInvalid
|
||||
bit m_shouldResetPid
|
||||
bit isBelowClosedLoopThreshold;
|
||||
bit isNotClosedLoop;
|
||||
bit isZeroRpm
|
||||
|
||||
float openLoopPart;
|
||||
float closedLoopPart;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Wed Nov 24 19:10:13 UTC 2021
|
||||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Sun Jan 02 00:55:42 EST 2022
|
||||
// by class com.rusefi.output.CHeaderConsumer
|
||||
// begin
|
||||
#pragma once
|
||||
|
@ -7,7 +7,7 @@
|
|||
struct boost_control_s {
|
||||
/**
|
||||
offset 0 bit 0 */
|
||||
bool isTpsValid : 1 {};
|
||||
bool isTpsInvalid : 1 {};
|
||||
/**
|
||||
offset 0 bit 1 */
|
||||
bool m_shouldResetPid : 1 {};
|
||||
|
@ -19,88 +19,88 @@ struct boost_control_s {
|
|||
bool isNotClosedLoop : 1 {};
|
||||
/**
|
||||
offset 0 bit 4 */
|
||||
bool unusedBit_4_4 : 1 {};
|
||||
bool isZeroRpm : 1 {};
|
||||
/**
|
||||
offset 0 bit 5 */
|
||||
bool unusedBit_4_5 : 1 {};
|
||||
bool unusedBit_5_5 : 1 {};
|
||||
/**
|
||||
offset 0 bit 6 */
|
||||
bool unusedBit_4_6 : 1 {};
|
||||
bool unusedBit_5_6 : 1 {};
|
||||
/**
|
||||
offset 0 bit 7 */
|
||||
bool unusedBit_4_7 : 1 {};
|
||||
bool unusedBit_5_7 : 1 {};
|
||||
/**
|
||||
offset 0 bit 8 */
|
||||
bool unusedBit_4_8 : 1 {};
|
||||
bool unusedBit_5_8 : 1 {};
|
||||
/**
|
||||
offset 0 bit 9 */
|
||||
bool unusedBit_4_9 : 1 {};
|
||||
bool unusedBit_5_9 : 1 {};
|
||||
/**
|
||||
offset 0 bit 10 */
|
||||
bool unusedBit_4_10 : 1 {};
|
||||
bool unusedBit_5_10 : 1 {};
|
||||
/**
|
||||
offset 0 bit 11 */
|
||||
bool unusedBit_4_11 : 1 {};
|
||||
bool unusedBit_5_11 : 1 {};
|
||||
/**
|
||||
offset 0 bit 12 */
|
||||
bool unusedBit_4_12 : 1 {};
|
||||
bool unusedBit_5_12 : 1 {};
|
||||
/**
|
||||
offset 0 bit 13 */
|
||||
bool unusedBit_4_13 : 1 {};
|
||||
bool unusedBit_5_13 : 1 {};
|
||||
/**
|
||||
offset 0 bit 14 */
|
||||
bool unusedBit_4_14 : 1 {};
|
||||
bool unusedBit_5_14 : 1 {};
|
||||
/**
|
||||
offset 0 bit 15 */
|
||||
bool unusedBit_4_15 : 1 {};
|
||||
bool unusedBit_5_15 : 1 {};
|
||||
/**
|
||||
offset 0 bit 16 */
|
||||
bool unusedBit_4_16 : 1 {};
|
||||
bool unusedBit_5_16 : 1 {};
|
||||
/**
|
||||
offset 0 bit 17 */
|
||||
bool unusedBit_4_17 : 1 {};
|
||||
bool unusedBit_5_17 : 1 {};
|
||||
/**
|
||||
offset 0 bit 18 */
|
||||
bool unusedBit_4_18 : 1 {};
|
||||
bool unusedBit_5_18 : 1 {};
|
||||
/**
|
||||
offset 0 bit 19 */
|
||||
bool unusedBit_4_19 : 1 {};
|
||||
bool unusedBit_5_19 : 1 {};
|
||||
/**
|
||||
offset 0 bit 20 */
|
||||
bool unusedBit_4_20 : 1 {};
|
||||
bool unusedBit_5_20 : 1 {};
|
||||
/**
|
||||
offset 0 bit 21 */
|
||||
bool unusedBit_4_21 : 1 {};
|
||||
bool unusedBit_5_21 : 1 {};
|
||||
/**
|
||||
offset 0 bit 22 */
|
||||
bool unusedBit_4_22 : 1 {};
|
||||
bool unusedBit_5_22 : 1 {};
|
||||
/**
|
||||
offset 0 bit 23 */
|
||||
bool unusedBit_4_23 : 1 {};
|
||||
bool unusedBit_5_23 : 1 {};
|
||||
/**
|
||||
offset 0 bit 24 */
|
||||
bool unusedBit_4_24 : 1 {};
|
||||
bool unusedBit_5_24 : 1 {};
|
||||
/**
|
||||
offset 0 bit 25 */
|
||||
bool unusedBit_4_25 : 1 {};
|
||||
bool unusedBit_5_25 : 1 {};
|
||||
/**
|
||||
offset 0 bit 26 */
|
||||
bool unusedBit_4_26 : 1 {};
|
||||
bool unusedBit_5_26 : 1 {};
|
||||
/**
|
||||
offset 0 bit 27 */
|
||||
bool unusedBit_4_27 : 1 {};
|
||||
bool unusedBit_5_27 : 1 {};
|
||||
/**
|
||||
offset 0 bit 28 */
|
||||
bool unusedBit_4_28 : 1 {};
|
||||
bool unusedBit_5_28 : 1 {};
|
||||
/**
|
||||
offset 0 bit 29 */
|
||||
bool unusedBit_4_29 : 1 {};
|
||||
bool unusedBit_5_29 : 1 {};
|
||||
/**
|
||||
offset 0 bit 30 */
|
||||
bool unusedBit_4_30 : 1 {};
|
||||
bool unusedBit_5_30 : 1 {};
|
||||
/**
|
||||
offset 0 bit 31 */
|
||||
bool unusedBit_4_31 : 1 {};
|
||||
bool unusedBit_5_31 : 1 {};
|
||||
/**
|
||||
* offset 4
|
||||
*/
|
||||
|
@ -113,4 +113,4 @@ struct boost_control_s {
|
|||
};
|
||||
|
||||
// end
|
||||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Wed Nov 24 19:10:13 UTC 2021
|
||||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Sun Jan 02 00:55:42 EST 2022
|
||||
|
|
|
@ -22,7 +22,9 @@ void FuelPumpController::onSlowCallback() {
|
|||
#endif
|
||||
}
|
||||
|
||||
void FuelPumpController::onIgnitionStateChanged(bool ignitionOn) {
|
||||
void FuelPumpController::onIgnitionStateChanged(bool ignitionOnParam) {
|
||||
// live data parser convention is asking for a field
|
||||
ignitionOn = ignitionOnParam;
|
||||
if (ignitionOn) {
|
||||
m_ignOnTimer.reset();
|
||||
}
|
||||
|
|
|
@ -2,4 +2,5 @@ struct_no_prefix fuel_pump_control_s
|
|||
bit isPrime
|
||||
bit engineTurnedRecently
|
||||
bit isPumpOn
|
||||
bit ignitionOn
|
||||
end_struct
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/fuel_pump.txt Sat Nov 20 03:34:13 UTC 2021
|
||||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/fuel_pump.txt Sun Jan 02 01:15:50 EST 2022
|
||||
// by class com.rusefi.output.CHeaderConsumer
|
||||
// begin
|
||||
#pragma once
|
||||
|
@ -16,93 +16,93 @@ struct fuel_pump_control_s {
|
|||
bool isPumpOn : 1 {};
|
||||
/**
|
||||
offset 0 bit 3 */
|
||||
bool unusedBit_3_3 : 1 {};
|
||||
bool ignitionOn : 1 {};
|
||||
/**
|
||||
offset 0 bit 4 */
|
||||
bool unusedBit_3_4 : 1 {};
|
||||
bool unusedBit_4_4 : 1 {};
|
||||
/**
|
||||
offset 0 bit 5 */
|
||||
bool unusedBit_3_5 : 1 {};
|
||||
bool unusedBit_4_5 : 1 {};
|
||||
/**
|
||||
offset 0 bit 6 */
|
||||
bool unusedBit_3_6 : 1 {};
|
||||
bool unusedBit_4_6 : 1 {};
|
||||
/**
|
||||
offset 0 bit 7 */
|
||||
bool unusedBit_3_7 : 1 {};
|
||||
bool unusedBit_4_7 : 1 {};
|
||||
/**
|
||||
offset 0 bit 8 */
|
||||
bool unusedBit_3_8 : 1 {};
|
||||
bool unusedBit_4_8 : 1 {};
|
||||
/**
|
||||
offset 0 bit 9 */
|
||||
bool unusedBit_3_9 : 1 {};
|
||||
bool unusedBit_4_9 : 1 {};
|
||||
/**
|
||||
offset 0 bit 10 */
|
||||
bool unusedBit_3_10 : 1 {};
|
||||
bool unusedBit_4_10 : 1 {};
|
||||
/**
|
||||
offset 0 bit 11 */
|
||||
bool unusedBit_3_11 : 1 {};
|
||||
bool unusedBit_4_11 : 1 {};
|
||||
/**
|
||||
offset 0 bit 12 */
|
||||
bool unusedBit_3_12 : 1 {};
|
||||
bool unusedBit_4_12 : 1 {};
|
||||
/**
|
||||
offset 0 bit 13 */
|
||||
bool unusedBit_3_13 : 1 {};
|
||||
bool unusedBit_4_13 : 1 {};
|
||||
/**
|
||||
offset 0 bit 14 */
|
||||
bool unusedBit_3_14 : 1 {};
|
||||
bool unusedBit_4_14 : 1 {};
|
||||
/**
|
||||
offset 0 bit 15 */
|
||||
bool unusedBit_3_15 : 1 {};
|
||||
bool unusedBit_4_15 : 1 {};
|
||||
/**
|
||||
offset 0 bit 16 */
|
||||
bool unusedBit_3_16 : 1 {};
|
||||
bool unusedBit_4_16 : 1 {};
|
||||
/**
|
||||
offset 0 bit 17 */
|
||||
bool unusedBit_3_17 : 1 {};
|
||||
bool unusedBit_4_17 : 1 {};
|
||||
/**
|
||||
offset 0 bit 18 */
|
||||
bool unusedBit_3_18 : 1 {};
|
||||
bool unusedBit_4_18 : 1 {};
|
||||
/**
|
||||
offset 0 bit 19 */
|
||||
bool unusedBit_3_19 : 1 {};
|
||||
bool unusedBit_4_19 : 1 {};
|
||||
/**
|
||||
offset 0 bit 20 */
|
||||
bool unusedBit_3_20 : 1 {};
|
||||
bool unusedBit_4_20 : 1 {};
|
||||
/**
|
||||
offset 0 bit 21 */
|
||||
bool unusedBit_3_21 : 1 {};
|
||||
bool unusedBit_4_21 : 1 {};
|
||||
/**
|
||||
offset 0 bit 22 */
|
||||
bool unusedBit_3_22 : 1 {};
|
||||
bool unusedBit_4_22 : 1 {};
|
||||
/**
|
||||
offset 0 bit 23 */
|
||||
bool unusedBit_3_23 : 1 {};
|
||||
bool unusedBit_4_23 : 1 {};
|
||||
/**
|
||||
offset 0 bit 24 */
|
||||
bool unusedBit_3_24 : 1 {};
|
||||
bool unusedBit_4_24 : 1 {};
|
||||
/**
|
||||
offset 0 bit 25 */
|
||||
bool unusedBit_3_25 : 1 {};
|
||||
bool unusedBit_4_25 : 1 {};
|
||||
/**
|
||||
offset 0 bit 26 */
|
||||
bool unusedBit_3_26 : 1 {};
|
||||
bool unusedBit_4_26 : 1 {};
|
||||
/**
|
||||
offset 0 bit 27 */
|
||||
bool unusedBit_3_27 : 1 {};
|
||||
bool unusedBit_4_27 : 1 {};
|
||||
/**
|
||||
offset 0 bit 28 */
|
||||
bool unusedBit_3_28 : 1 {};
|
||||
bool unusedBit_4_28 : 1 {};
|
||||
/**
|
||||
offset 0 bit 29 */
|
||||
bool unusedBit_3_29 : 1 {};
|
||||
bool unusedBit_4_29 : 1 {};
|
||||
/**
|
||||
offset 0 bit 30 */
|
||||
bool unusedBit_3_30 : 1 {};
|
||||
bool unusedBit_4_30 : 1 {};
|
||||
/**
|
||||
offset 0 bit 31 */
|
||||
bool unusedBit_3_31 : 1 {};
|
||||
bool unusedBit_4_31 : 1 {};
|
||||
/** total size 4*/
|
||||
};
|
||||
|
||||
// end
|
||||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/fuel_pump.txt Sat Nov 20 03:34:13 UTC 2021
|
||||
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/fuel_pump.txt Sun Jan 02 01:15:50 EST 2022
|
||||
|
|
|
@ -314,6 +314,8 @@ float getOutputValueByName(const char *name) {
|
|||
return engine->outputChannels.accPedalSplit;
|
||||
if (strEqualCaseInsensitive(name, "m_requested_pump"))
|
||||
return engine->outputChannels.m_requested_pump;
|
||||
if (strEqualCaseInsensitive(name, "boostControlTarget"))
|
||||
return engine->outputChannels.boostControlTarget;
|
||||
if (strEqualCaseInsensitive(name, "fuel_requested_percent"))
|
||||
return engine->outputChannels.fuel_requested_percent;
|
||||
if (strEqualCaseInsensitive(name, "fuel_requested_percent_pi"))
|
||||
|
@ -338,6 +340,12 @@ float getOutputValueByName(const char *name) {
|
|||
return engine->outputChannels.launchActivatePinState;
|
||||
if (strEqualCaseInsensitive(name, "TEMPLOG_MAP_AT_CYCLE_COUNT"))
|
||||
return engine->outputChannels.TEMPLOG_MAP_AT_CYCLE_COUNT;
|
||||
if (strEqualCaseInsensitive(name, "boostControllerOutput"))
|
||||
return engine->outputChannels.boostControllerOutput;
|
||||
if (strEqualCaseInsensitive(name, "boostControllerClosedLoopPart"))
|
||||
return engine->outputChannels.boostControllerClosedLoopPart;
|
||||
if (strEqualCaseInsensitive(name, "boostControllerOpenLoopPart"))
|
||||
return engine->outputChannels.boostControllerOpenLoopPart;
|
||||
if (strEqualCaseInsensitive(name, "TEMPLOG_MAP_AT_SPECIAL_POINT"))
|
||||
return engine->outputChannels.TEMPLOG_MAP_AT_SPECIAL_POINT;
|
||||
if (strEqualCaseInsensitive(name, "TEMPLOG_MAP_AT_DIFF"))
|
||||
|
|
|
@ -1,78 +1,78 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Wed Nov 24 19:10:13 UTC 2021
|
||||
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Sun Jan 02 00:55:42 EST 2022
|
||||
|
||||
// by class com.rusefi.output.FileJavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
||||
public class BoostControl {
|
||||
public static final Field ISTPSVALID = Field.create("ISTPSVALID", 0, FieldType.BIT, 0);
|
||||
public static final Field ISTPSINVALID = Field.create("ISTPSINVALID", 0, FieldType.BIT, 0);
|
||||
public static final Field M_SHOULDRESETPID = Field.create("M_SHOULDRESETPID", 0, FieldType.BIT, 1);
|
||||
public static final Field ISBELOWCLOSEDLOOPTHRESHOLD = Field.create("ISBELOWCLOSEDLOOPTHRESHOLD", 0, FieldType.BIT, 2);
|
||||
public static final Field ISNOTCLOSEDLOOP = Field.create("ISNOTCLOSEDLOOP", 0, FieldType.BIT, 3);
|
||||
public static final Field UNUSEDBIT_4_4 = Field.create("UNUSEDBIT_4_4", 0, FieldType.BIT, 4);
|
||||
public static final Field UNUSEDBIT_4_5 = Field.create("UNUSEDBIT_4_5", 0, FieldType.BIT, 5);
|
||||
public static final Field UNUSEDBIT_4_6 = Field.create("UNUSEDBIT_4_6", 0, FieldType.BIT, 6);
|
||||
public static final Field UNUSEDBIT_4_7 = Field.create("UNUSEDBIT_4_7", 0, FieldType.BIT, 7);
|
||||
public static final Field UNUSEDBIT_4_8 = Field.create("UNUSEDBIT_4_8", 0, FieldType.BIT, 8);
|
||||
public static final Field UNUSEDBIT_4_9 = Field.create("UNUSEDBIT_4_9", 0, FieldType.BIT, 9);
|
||||
public static final Field UNUSEDBIT_4_10 = Field.create("UNUSEDBIT_4_10", 0, FieldType.BIT, 10);
|
||||
public static final Field UNUSEDBIT_4_11 = Field.create("UNUSEDBIT_4_11", 0, FieldType.BIT, 11);
|
||||
public static final Field UNUSEDBIT_4_12 = Field.create("UNUSEDBIT_4_12", 0, FieldType.BIT, 12);
|
||||
public static final Field UNUSEDBIT_4_13 = Field.create("UNUSEDBIT_4_13", 0, FieldType.BIT, 13);
|
||||
public static final Field UNUSEDBIT_4_14 = Field.create("UNUSEDBIT_4_14", 0, FieldType.BIT, 14);
|
||||
public static final Field UNUSEDBIT_4_15 = Field.create("UNUSEDBIT_4_15", 0, FieldType.BIT, 15);
|
||||
public static final Field UNUSEDBIT_4_16 = Field.create("UNUSEDBIT_4_16", 0, FieldType.BIT, 16);
|
||||
public static final Field UNUSEDBIT_4_17 = Field.create("UNUSEDBIT_4_17", 0, FieldType.BIT, 17);
|
||||
public static final Field UNUSEDBIT_4_18 = Field.create("UNUSEDBIT_4_18", 0, FieldType.BIT, 18);
|
||||
public static final Field UNUSEDBIT_4_19 = Field.create("UNUSEDBIT_4_19", 0, FieldType.BIT, 19);
|
||||
public static final Field UNUSEDBIT_4_20 = Field.create("UNUSEDBIT_4_20", 0, FieldType.BIT, 20);
|
||||
public static final Field UNUSEDBIT_4_21 = Field.create("UNUSEDBIT_4_21", 0, FieldType.BIT, 21);
|
||||
public static final Field UNUSEDBIT_4_22 = Field.create("UNUSEDBIT_4_22", 0, FieldType.BIT, 22);
|
||||
public static final Field UNUSEDBIT_4_23 = Field.create("UNUSEDBIT_4_23", 0, FieldType.BIT, 23);
|
||||
public static final Field UNUSEDBIT_4_24 = Field.create("UNUSEDBIT_4_24", 0, FieldType.BIT, 24);
|
||||
public static final Field UNUSEDBIT_4_25 = Field.create("UNUSEDBIT_4_25", 0, FieldType.BIT, 25);
|
||||
public static final Field UNUSEDBIT_4_26 = Field.create("UNUSEDBIT_4_26", 0, FieldType.BIT, 26);
|
||||
public static final Field UNUSEDBIT_4_27 = Field.create("UNUSEDBIT_4_27", 0, FieldType.BIT, 27);
|
||||
public static final Field UNUSEDBIT_4_28 = Field.create("UNUSEDBIT_4_28", 0, FieldType.BIT, 28);
|
||||
public static final Field UNUSEDBIT_4_29 = Field.create("UNUSEDBIT_4_29", 0, FieldType.BIT, 29);
|
||||
public static final Field UNUSEDBIT_4_30 = Field.create("UNUSEDBIT_4_30", 0, FieldType.BIT, 30);
|
||||
public static final Field UNUSEDBIT_4_31 = Field.create("UNUSEDBIT_4_31", 0, FieldType.BIT, 31);
|
||||
public static final Field ISZERORPM = Field.create("ISZERORPM", 0, FieldType.BIT, 4);
|
||||
public static final Field UNUSEDBIT_5_5 = Field.create("UNUSEDBIT_5_5", 0, FieldType.BIT, 5);
|
||||
public static final Field UNUSEDBIT_5_6 = Field.create("UNUSEDBIT_5_6", 0, FieldType.BIT, 6);
|
||||
public static final Field UNUSEDBIT_5_7 = Field.create("UNUSEDBIT_5_7", 0, FieldType.BIT, 7);
|
||||
public static final Field UNUSEDBIT_5_8 = Field.create("UNUSEDBIT_5_8", 0, FieldType.BIT, 8);
|
||||
public static final Field UNUSEDBIT_5_9 = Field.create("UNUSEDBIT_5_9", 0, FieldType.BIT, 9);
|
||||
public static final Field UNUSEDBIT_5_10 = Field.create("UNUSEDBIT_5_10", 0, FieldType.BIT, 10);
|
||||
public static final Field UNUSEDBIT_5_11 = Field.create("UNUSEDBIT_5_11", 0, FieldType.BIT, 11);
|
||||
public static final Field UNUSEDBIT_5_12 = Field.create("UNUSEDBIT_5_12", 0, FieldType.BIT, 12);
|
||||
public static final Field UNUSEDBIT_5_13 = Field.create("UNUSEDBIT_5_13", 0, FieldType.BIT, 13);
|
||||
public static final Field UNUSEDBIT_5_14 = Field.create("UNUSEDBIT_5_14", 0, FieldType.BIT, 14);
|
||||
public static final Field UNUSEDBIT_5_15 = Field.create("UNUSEDBIT_5_15", 0, FieldType.BIT, 15);
|
||||
public static final Field UNUSEDBIT_5_16 = Field.create("UNUSEDBIT_5_16", 0, FieldType.BIT, 16);
|
||||
public static final Field UNUSEDBIT_5_17 = Field.create("UNUSEDBIT_5_17", 0, FieldType.BIT, 17);
|
||||
public static final Field UNUSEDBIT_5_18 = Field.create("UNUSEDBIT_5_18", 0, FieldType.BIT, 18);
|
||||
public static final Field UNUSEDBIT_5_19 = Field.create("UNUSEDBIT_5_19", 0, FieldType.BIT, 19);
|
||||
public static final Field UNUSEDBIT_5_20 = Field.create("UNUSEDBIT_5_20", 0, FieldType.BIT, 20);
|
||||
public static final Field UNUSEDBIT_5_21 = Field.create("UNUSEDBIT_5_21", 0, FieldType.BIT, 21);
|
||||
public static final Field UNUSEDBIT_5_22 = Field.create("UNUSEDBIT_5_22", 0, FieldType.BIT, 22);
|
||||
public static final Field UNUSEDBIT_5_23 = Field.create("UNUSEDBIT_5_23", 0, FieldType.BIT, 23);
|
||||
public static final Field UNUSEDBIT_5_24 = Field.create("UNUSEDBIT_5_24", 0, FieldType.BIT, 24);
|
||||
public static final Field UNUSEDBIT_5_25 = Field.create("UNUSEDBIT_5_25", 0, FieldType.BIT, 25);
|
||||
public static final Field UNUSEDBIT_5_26 = Field.create("UNUSEDBIT_5_26", 0, FieldType.BIT, 26);
|
||||
public static final Field UNUSEDBIT_5_27 = Field.create("UNUSEDBIT_5_27", 0, FieldType.BIT, 27);
|
||||
public static final Field UNUSEDBIT_5_28 = Field.create("UNUSEDBIT_5_28", 0, FieldType.BIT, 28);
|
||||
public static final Field UNUSEDBIT_5_29 = Field.create("UNUSEDBIT_5_29", 0, FieldType.BIT, 29);
|
||||
public static final Field UNUSEDBIT_5_30 = Field.create("UNUSEDBIT_5_30", 0, FieldType.BIT, 30);
|
||||
public static final Field UNUSEDBIT_5_31 = Field.create("UNUSEDBIT_5_31", 0, FieldType.BIT, 31);
|
||||
public static final Field OPENLOOPPART = Field.create("OPENLOOPPART", 4, FieldType.FLOAT);
|
||||
public static final Field CLOSEDLOOPPART = Field.create("CLOSEDLOOPPART", 8, FieldType.FLOAT);
|
||||
public static final Field[] VALUES = {
|
||||
ISTPSVALID,
|
||||
ISTPSINVALID,
|
||||
M_SHOULDRESETPID,
|
||||
ISBELOWCLOSEDLOOPTHRESHOLD,
|
||||
ISNOTCLOSEDLOOP,
|
||||
UNUSEDBIT_4_4,
|
||||
UNUSEDBIT_4_5,
|
||||
UNUSEDBIT_4_6,
|
||||
UNUSEDBIT_4_7,
|
||||
UNUSEDBIT_4_8,
|
||||
UNUSEDBIT_4_9,
|
||||
UNUSEDBIT_4_10,
|
||||
UNUSEDBIT_4_11,
|
||||
UNUSEDBIT_4_12,
|
||||
UNUSEDBIT_4_13,
|
||||
UNUSEDBIT_4_14,
|
||||
UNUSEDBIT_4_15,
|
||||
UNUSEDBIT_4_16,
|
||||
UNUSEDBIT_4_17,
|
||||
UNUSEDBIT_4_18,
|
||||
UNUSEDBIT_4_19,
|
||||
UNUSEDBIT_4_20,
|
||||
UNUSEDBIT_4_21,
|
||||
UNUSEDBIT_4_22,
|
||||
UNUSEDBIT_4_23,
|
||||
UNUSEDBIT_4_24,
|
||||
UNUSEDBIT_4_25,
|
||||
UNUSEDBIT_4_26,
|
||||
UNUSEDBIT_4_27,
|
||||
UNUSEDBIT_4_28,
|
||||
UNUSEDBIT_4_29,
|
||||
UNUSEDBIT_4_30,
|
||||
UNUSEDBIT_4_31,
|
||||
ISZERORPM,
|
||||
UNUSEDBIT_5_5,
|
||||
UNUSEDBIT_5_6,
|
||||
UNUSEDBIT_5_7,
|
||||
UNUSEDBIT_5_8,
|
||||
UNUSEDBIT_5_9,
|
||||
UNUSEDBIT_5_10,
|
||||
UNUSEDBIT_5_11,
|
||||
UNUSEDBIT_5_12,
|
||||
UNUSEDBIT_5_13,
|
||||
UNUSEDBIT_5_14,
|
||||
UNUSEDBIT_5_15,
|
||||
UNUSEDBIT_5_16,
|
||||
UNUSEDBIT_5_17,
|
||||
UNUSEDBIT_5_18,
|
||||
UNUSEDBIT_5_19,
|
||||
UNUSEDBIT_5_20,
|
||||
UNUSEDBIT_5_21,
|
||||
UNUSEDBIT_5_22,
|
||||
UNUSEDBIT_5_23,
|
||||
UNUSEDBIT_5_24,
|
||||
UNUSEDBIT_5_25,
|
||||
UNUSEDBIT_5_26,
|
||||
UNUSEDBIT_5_27,
|
||||
UNUSEDBIT_5_28,
|
||||
UNUSEDBIT_5_29,
|
||||
UNUSEDBIT_5_30,
|
||||
UNUSEDBIT_5_31,
|
||||
OPENLOOPPART,
|
||||
CLOSEDLOOPPART,
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/fuel_pump.txt Sat Nov 20 03:34:13 UTC 2021
|
||||
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/fuel_pump.txt Sun Jan 02 01:15:50 EST 2022
|
||||
|
||||
// by class com.rusefi.output.FileJavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
@ -9,67 +9,67 @@ public class FuelPump {
|
|||
public static final Field ISPRIME = Field.create("ISPRIME", 0, FieldType.BIT, 0);
|
||||
public static final Field ENGINETURNEDRECENTLY = Field.create("ENGINETURNEDRECENTLY", 0, FieldType.BIT, 1);
|
||||
public static final Field ISPUMPON = Field.create("ISPUMPON", 0, FieldType.BIT, 2);
|
||||
public static final Field UNUSEDBIT_3_3 = Field.create("UNUSEDBIT_3_3", 0, FieldType.BIT, 3);
|
||||
public static final Field UNUSEDBIT_3_4 = Field.create("UNUSEDBIT_3_4", 0, FieldType.BIT, 4);
|
||||
public static final Field UNUSEDBIT_3_5 = Field.create("UNUSEDBIT_3_5", 0, FieldType.BIT, 5);
|
||||
public static final Field UNUSEDBIT_3_6 = Field.create("UNUSEDBIT_3_6", 0, FieldType.BIT, 6);
|
||||
public static final Field UNUSEDBIT_3_7 = Field.create("UNUSEDBIT_3_7", 0, FieldType.BIT, 7);
|
||||
public static final Field UNUSEDBIT_3_8 = Field.create("UNUSEDBIT_3_8", 0, FieldType.BIT, 8);
|
||||
public static final Field UNUSEDBIT_3_9 = Field.create("UNUSEDBIT_3_9", 0, FieldType.BIT, 9);
|
||||
public static final Field UNUSEDBIT_3_10 = Field.create("UNUSEDBIT_3_10", 0, FieldType.BIT, 10);
|
||||
public static final Field UNUSEDBIT_3_11 = Field.create("UNUSEDBIT_3_11", 0, FieldType.BIT, 11);
|
||||
public static final Field UNUSEDBIT_3_12 = Field.create("UNUSEDBIT_3_12", 0, FieldType.BIT, 12);
|
||||
public static final Field UNUSEDBIT_3_13 = Field.create("UNUSEDBIT_3_13", 0, FieldType.BIT, 13);
|
||||
public static final Field UNUSEDBIT_3_14 = Field.create("UNUSEDBIT_3_14", 0, FieldType.BIT, 14);
|
||||
public static final Field UNUSEDBIT_3_15 = Field.create("UNUSEDBIT_3_15", 0, FieldType.BIT, 15);
|
||||
public static final Field UNUSEDBIT_3_16 = Field.create("UNUSEDBIT_3_16", 0, FieldType.BIT, 16);
|
||||
public static final Field UNUSEDBIT_3_17 = Field.create("UNUSEDBIT_3_17", 0, FieldType.BIT, 17);
|
||||
public static final Field UNUSEDBIT_3_18 = Field.create("UNUSEDBIT_3_18", 0, FieldType.BIT, 18);
|
||||
public static final Field UNUSEDBIT_3_19 = Field.create("UNUSEDBIT_3_19", 0, FieldType.BIT, 19);
|
||||
public static final Field UNUSEDBIT_3_20 = Field.create("UNUSEDBIT_3_20", 0, FieldType.BIT, 20);
|
||||
public static final Field UNUSEDBIT_3_21 = Field.create("UNUSEDBIT_3_21", 0, FieldType.BIT, 21);
|
||||
public static final Field UNUSEDBIT_3_22 = Field.create("UNUSEDBIT_3_22", 0, FieldType.BIT, 22);
|
||||
public static final Field UNUSEDBIT_3_23 = Field.create("UNUSEDBIT_3_23", 0, FieldType.BIT, 23);
|
||||
public static final Field UNUSEDBIT_3_24 = Field.create("UNUSEDBIT_3_24", 0, FieldType.BIT, 24);
|
||||
public static final Field UNUSEDBIT_3_25 = Field.create("UNUSEDBIT_3_25", 0, FieldType.BIT, 25);
|
||||
public static final Field UNUSEDBIT_3_26 = Field.create("UNUSEDBIT_3_26", 0, FieldType.BIT, 26);
|
||||
public static final Field UNUSEDBIT_3_27 = Field.create("UNUSEDBIT_3_27", 0, FieldType.BIT, 27);
|
||||
public static final Field UNUSEDBIT_3_28 = Field.create("UNUSEDBIT_3_28", 0, FieldType.BIT, 28);
|
||||
public static final Field UNUSEDBIT_3_29 = Field.create("UNUSEDBIT_3_29", 0, FieldType.BIT, 29);
|
||||
public static final Field UNUSEDBIT_3_30 = Field.create("UNUSEDBIT_3_30", 0, FieldType.BIT, 30);
|
||||
public static final Field UNUSEDBIT_3_31 = Field.create("UNUSEDBIT_3_31", 0, FieldType.BIT, 31);
|
||||
public static final Field IGNITIONON = Field.create("IGNITIONON", 0, FieldType.BIT, 3);
|
||||
public static final Field UNUSEDBIT_4_4 = Field.create("UNUSEDBIT_4_4", 0, FieldType.BIT, 4);
|
||||
public static final Field UNUSEDBIT_4_5 = Field.create("UNUSEDBIT_4_5", 0, FieldType.BIT, 5);
|
||||
public static final Field UNUSEDBIT_4_6 = Field.create("UNUSEDBIT_4_6", 0, FieldType.BIT, 6);
|
||||
public static final Field UNUSEDBIT_4_7 = Field.create("UNUSEDBIT_4_7", 0, FieldType.BIT, 7);
|
||||
public static final Field UNUSEDBIT_4_8 = Field.create("UNUSEDBIT_4_8", 0, FieldType.BIT, 8);
|
||||
public static final Field UNUSEDBIT_4_9 = Field.create("UNUSEDBIT_4_9", 0, FieldType.BIT, 9);
|
||||
public static final Field UNUSEDBIT_4_10 = Field.create("UNUSEDBIT_4_10", 0, FieldType.BIT, 10);
|
||||
public static final Field UNUSEDBIT_4_11 = Field.create("UNUSEDBIT_4_11", 0, FieldType.BIT, 11);
|
||||
public static final Field UNUSEDBIT_4_12 = Field.create("UNUSEDBIT_4_12", 0, FieldType.BIT, 12);
|
||||
public static final Field UNUSEDBIT_4_13 = Field.create("UNUSEDBIT_4_13", 0, FieldType.BIT, 13);
|
||||
public static final Field UNUSEDBIT_4_14 = Field.create("UNUSEDBIT_4_14", 0, FieldType.BIT, 14);
|
||||
public static final Field UNUSEDBIT_4_15 = Field.create("UNUSEDBIT_4_15", 0, FieldType.BIT, 15);
|
||||
public static final Field UNUSEDBIT_4_16 = Field.create("UNUSEDBIT_4_16", 0, FieldType.BIT, 16);
|
||||
public static final Field UNUSEDBIT_4_17 = Field.create("UNUSEDBIT_4_17", 0, FieldType.BIT, 17);
|
||||
public static final Field UNUSEDBIT_4_18 = Field.create("UNUSEDBIT_4_18", 0, FieldType.BIT, 18);
|
||||
public static final Field UNUSEDBIT_4_19 = Field.create("UNUSEDBIT_4_19", 0, FieldType.BIT, 19);
|
||||
public static final Field UNUSEDBIT_4_20 = Field.create("UNUSEDBIT_4_20", 0, FieldType.BIT, 20);
|
||||
public static final Field UNUSEDBIT_4_21 = Field.create("UNUSEDBIT_4_21", 0, FieldType.BIT, 21);
|
||||
public static final Field UNUSEDBIT_4_22 = Field.create("UNUSEDBIT_4_22", 0, FieldType.BIT, 22);
|
||||
public static final Field UNUSEDBIT_4_23 = Field.create("UNUSEDBIT_4_23", 0, FieldType.BIT, 23);
|
||||
public static final Field UNUSEDBIT_4_24 = Field.create("UNUSEDBIT_4_24", 0, FieldType.BIT, 24);
|
||||
public static final Field UNUSEDBIT_4_25 = Field.create("UNUSEDBIT_4_25", 0, FieldType.BIT, 25);
|
||||
public static final Field UNUSEDBIT_4_26 = Field.create("UNUSEDBIT_4_26", 0, FieldType.BIT, 26);
|
||||
public static final Field UNUSEDBIT_4_27 = Field.create("UNUSEDBIT_4_27", 0, FieldType.BIT, 27);
|
||||
public static final Field UNUSEDBIT_4_28 = Field.create("UNUSEDBIT_4_28", 0, FieldType.BIT, 28);
|
||||
public static final Field UNUSEDBIT_4_29 = Field.create("UNUSEDBIT_4_29", 0, FieldType.BIT, 29);
|
||||
public static final Field UNUSEDBIT_4_30 = Field.create("UNUSEDBIT_4_30", 0, FieldType.BIT, 30);
|
||||
public static final Field UNUSEDBIT_4_31 = Field.create("UNUSEDBIT_4_31", 0, FieldType.BIT, 31);
|
||||
public static final Field[] VALUES = {
|
||||
ISPRIME,
|
||||
ENGINETURNEDRECENTLY,
|
||||
ISPUMPON,
|
||||
UNUSEDBIT_3_3,
|
||||
UNUSEDBIT_3_4,
|
||||
UNUSEDBIT_3_5,
|
||||
UNUSEDBIT_3_6,
|
||||
UNUSEDBIT_3_7,
|
||||
UNUSEDBIT_3_8,
|
||||
UNUSEDBIT_3_9,
|
||||
UNUSEDBIT_3_10,
|
||||
UNUSEDBIT_3_11,
|
||||
UNUSEDBIT_3_12,
|
||||
UNUSEDBIT_3_13,
|
||||
UNUSEDBIT_3_14,
|
||||
UNUSEDBIT_3_15,
|
||||
UNUSEDBIT_3_16,
|
||||
UNUSEDBIT_3_17,
|
||||
UNUSEDBIT_3_18,
|
||||
UNUSEDBIT_3_19,
|
||||
UNUSEDBIT_3_20,
|
||||
UNUSEDBIT_3_21,
|
||||
UNUSEDBIT_3_22,
|
||||
UNUSEDBIT_3_23,
|
||||
UNUSEDBIT_3_24,
|
||||
UNUSEDBIT_3_25,
|
||||
UNUSEDBIT_3_26,
|
||||
UNUSEDBIT_3_27,
|
||||
UNUSEDBIT_3_28,
|
||||
UNUSEDBIT_3_29,
|
||||
UNUSEDBIT_3_30,
|
||||
UNUSEDBIT_3_31,
|
||||
IGNITIONON,
|
||||
UNUSEDBIT_4_4,
|
||||
UNUSEDBIT_4_5,
|
||||
UNUSEDBIT_4_6,
|
||||
UNUSEDBIT_4_7,
|
||||
UNUSEDBIT_4_8,
|
||||
UNUSEDBIT_4_9,
|
||||
UNUSEDBIT_4_10,
|
||||
UNUSEDBIT_4_11,
|
||||
UNUSEDBIT_4_12,
|
||||
UNUSEDBIT_4_13,
|
||||
UNUSEDBIT_4_14,
|
||||
UNUSEDBIT_4_15,
|
||||
UNUSEDBIT_4_16,
|
||||
UNUSEDBIT_4_17,
|
||||
UNUSEDBIT_4_18,
|
||||
UNUSEDBIT_4_19,
|
||||
UNUSEDBIT_4_20,
|
||||
UNUSEDBIT_4_21,
|
||||
UNUSEDBIT_4_22,
|
||||
UNUSEDBIT_4_23,
|
||||
UNUSEDBIT_4_24,
|
||||
UNUSEDBIT_4_25,
|
||||
UNUSEDBIT_4_26,
|
||||
UNUSEDBIT_4_27,
|
||||
UNUSEDBIT_4_28,
|
||||
UNUSEDBIT_4_29,
|
||||
UNUSEDBIT_4_30,
|
||||
UNUSEDBIT_4_31,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,7 +15,9 @@ import org.antlr.v4.runtime.tree.TerminalNode;
|
|||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Stack;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import static com.devexperts.logging.Logging.getLogging;
|
||||
|
||||
|
@ -30,13 +32,14 @@ public class CodeWalkthrough {
|
|||
private static final Color BROKEN_CODE = Color.orange;
|
||||
|
||||
static {
|
||||
log.configureDebugEnabled(true);
|
||||
log.configureDebugEnabled(false);
|
||||
}
|
||||
|
||||
private static final String CONFIG_MAGIC_PREFIX = "engineConfiguration";
|
||||
|
||||
public static ParseResult applyVariables(VariableValueSource valueSource, String sourceCode, SourceCodePainter painter, ParseTree tree) {
|
||||
Stack<BranchingState> currentState = new Stack<>();
|
||||
java.util.List<String> brokenConditions = new ArrayList<>();
|
||||
|
||||
java.util.List<TerminalNode> allTerminals = new java.util.ArrayList<>();
|
||||
|
||||
|
@ -105,6 +108,7 @@ public class CodeWalkthrough {
|
|||
log.debug("CURRENT STATE ADD " + state);
|
||||
currentState.add(branchingState);
|
||||
if (branchingState == BranchingState.BROKEN) {
|
||||
brokenConditions.add(conditionVariable);
|
||||
painter.paintBackground(BROKEN_CODE, new Range(ctx));
|
||||
} else if (branchingState == BranchingState.TRUE) {
|
||||
painter.paintBackground(Color.GREEN, new Range(ctx));
|
||||
|
@ -157,7 +161,7 @@ public class CodeWalkthrough {
|
|||
configTokens.add(token);
|
||||
}
|
||||
}
|
||||
return new ParseResult(configTokens);
|
||||
return new ParseResult(configTokens, brokenConditions);
|
||||
}
|
||||
|
||||
private static void resetState(Stack<BranchingState> currentState) {
|
||||
|
|
|
@ -6,15 +6,21 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
public class ParseResult {
|
||||
static ParseResult VOID = new ParseResult(Collections.emptyList());
|
||||
static ParseResult VOID = new ParseResult(Collections.emptyList(), Collections.emptyList());
|
||||
|
||||
private final List<Token> configTokens;
|
||||
private final List<String> brokenConditions;
|
||||
|
||||
public ParseResult(List<Token> configTokens) {
|
||||
public ParseResult(List<Token> configTokens, java.util.List<String> brokenConditions) {
|
||||
this.configTokens = configTokens;
|
||||
this.brokenConditions = brokenConditions;
|
||||
}
|
||||
|
||||
public List<Token> getConfigTokens() {
|
||||
return configTokens;
|
||||
}
|
||||
|
||||
public List<String> geBrokenConditions() {
|
||||
return brokenConditions;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
package com.rusefi.livedata;
|
||||
|
||||
import com.rusefi.CodeWalkthrough;
|
||||
import com.rusefi.config.Field;
|
||||
import com.rusefi.ui.livedata.SourceCodePainter;
|
||||
import com.rusefi.ui.livedata.VariableValueSource;
|
||||
import org.antlr.v4.runtime.tree.ParseTree;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import static com.rusefi.livedata.LiveDataParserPanel.getParseTree;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class LiveDataConventionTest {
|
||||
@Test
|
||||
@Ignore
|
||||
public void assertLiveDataConvention() throws IOException, URISyntaxException {
|
||||
for (LiveDataView view : LiveDataView.values())
|
||||
assertFile(view.getFileName(), view.getValues());
|
||||
}
|
||||
|
||||
private void assertFile(String fileName, Field[] values) throws IOException, URISyntaxException {
|
||||
VariableValueSource valueSource = name -> {
|
||||
Field f = Field.findFieldOrNull(values, "", name);
|
||||
if (f == null) {
|
||||
return null;
|
||||
}
|
||||
System.out.println("getValue");
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
String sourceCode = LiveDataParserPanel.getContent(LiveDataParserPanel.class, fileName);
|
||||
assertTrue("No content " + fileName + " size=" + sourceCode.length(), sourceCode.length() > 100);
|
||||
|
||||
ParseTree tree = getParseTree(sourceCode);
|
||||
ParseResult parseResult = CodeWalkthrough.applyVariables(valueSource, sourceCode, SourceCodePainter.VOID, tree);
|
||||
|
||||
assertTrue("Broken live data constraint in " + fileName + ": " + parseResult.geBrokenConditions(), parseResult.geBrokenConditions().isEmpty());
|
||||
|
||||
}
|
||||
}
|
|
@ -28,7 +28,7 @@ public class LiveDataParserPanelSandbox {
|
|||
byte[] state = new byte[size];
|
||||
|
||||
|
||||
Field.findFieldOrNull(values, "", BoostControl.ISTPSVALID.getName()).setValue(state, true);
|
||||
Field.findFieldOrNull(values, "", BoostControl.ISTPSINVALID.getName()).setValue(state, true);
|
||||
Field.findFieldOrNull(values, "", BoostControl.ISNOTCLOSEDLOOP.getName()).setValue(state, true);
|
||||
|
||||
LiveDocsRegistry.INSTANCE.refresh(context1 -> state
|
||||
|
|
Loading…
Reference in New Issue