live data for wastegate #3588

This commit is contained in:
rusefillc 2021-11-24 13:08:24 -05:00
parent 810abd0175
commit aa4e57ded6
5 changed files with 96 additions and 92 deletions

View File

@ -43,7 +43,8 @@ expected<float> BoostController::observePlant() const {
expected<float> BoostController::getSetpoint() { expected<float> BoostController::getSetpoint() {
// If we're in open loop only mode, disregard any target computation. // If we're in open loop only mode, disregard any target computation.
// Open loop needs to work even in case of invalid closed loop config // Open loop needs to work even in case of invalid closed loop config
if (engineConfiguration->boostType != CLOSED_LOOP) { isNotClosedLoop = engineConfiguration->boostType != CLOSED_LOOP;
if (isNotClosedLoop) {
closedLoopPart = 0; closedLoopPart = 0;
return closedLoopPart; return closedLoopPart;
} }
@ -94,7 +95,8 @@ expected<percent_t> BoostController::getOpenLoop(float target) {
percent_t BoostController::getClosedLoopImpl(float target, float manifoldPressure) { percent_t BoostController::getClosedLoopImpl(float target, float manifoldPressure) {
// If we're in open loop only mode, make no closed loop correction. // If we're in open loop only mode, make no closed loop correction.
if (engineConfiguration->boostType != CLOSED_LOOP) { isNotClosedLoop = engineConfiguration->boostType != CLOSED_LOOP;
if (isNotClosedLoop) {
return 0; return 0;
} }

View File

@ -3,6 +3,7 @@ struct_no_prefix boost_control_s
bit isTpsValid bit isTpsValid
bit m_shouldResetPid bit m_shouldResetPid
bit isBelowClosedLoopThreshold; bit isBelowClosedLoopThreshold;
bit isNotClosedLoop;
float openLoopPart; float openLoopPart;
float closedLoopPart; float closedLoopPart;

View File

@ -1,4 +1,4 @@
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Tue Nov 23 21:00:21 UTC 2021 // this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Wed Nov 24 13:04:49 EST 2021
// by class com.rusefi.output.CHeaderConsumer // by class com.rusefi.output.CHeaderConsumer
// begin // begin
#pragma once #pragma once
@ -16,91 +16,91 @@ struct boost_control_s {
bool isBelowClosedLoopThreshold : 1 {}; bool isBelowClosedLoopThreshold : 1 {};
/** /**
offset 0 bit 3 */ offset 0 bit 3 */
bool unusedBit_3_3 : 1 {}; bool isNotClosedLoop : 1 {};
/** /**
offset 0 bit 4 */ offset 0 bit 4 */
bool unusedBit_3_4 : 1 {}; bool unusedBit_4_4 : 1 {};
/** /**
offset 0 bit 5 */ offset 0 bit 5 */
bool unusedBit_3_5 : 1 {}; bool unusedBit_4_5 : 1 {};
/** /**
offset 0 bit 6 */ offset 0 bit 6 */
bool unusedBit_3_6 : 1 {}; bool unusedBit_4_6 : 1 {};
/** /**
offset 0 bit 7 */ offset 0 bit 7 */
bool unusedBit_3_7 : 1 {}; bool unusedBit_4_7 : 1 {};
/** /**
offset 0 bit 8 */ offset 0 bit 8 */
bool unusedBit_3_8 : 1 {}; bool unusedBit_4_8 : 1 {};
/** /**
offset 0 bit 9 */ offset 0 bit 9 */
bool unusedBit_3_9 : 1 {}; bool unusedBit_4_9 : 1 {};
/** /**
offset 0 bit 10 */ offset 0 bit 10 */
bool unusedBit_3_10 : 1 {}; bool unusedBit_4_10 : 1 {};
/** /**
offset 0 bit 11 */ offset 0 bit 11 */
bool unusedBit_3_11 : 1 {}; bool unusedBit_4_11 : 1 {};
/** /**
offset 0 bit 12 */ offset 0 bit 12 */
bool unusedBit_3_12 : 1 {}; bool unusedBit_4_12 : 1 {};
/** /**
offset 0 bit 13 */ offset 0 bit 13 */
bool unusedBit_3_13 : 1 {}; bool unusedBit_4_13 : 1 {};
/** /**
offset 0 bit 14 */ offset 0 bit 14 */
bool unusedBit_3_14 : 1 {}; bool unusedBit_4_14 : 1 {};
/** /**
offset 0 bit 15 */ offset 0 bit 15 */
bool unusedBit_3_15 : 1 {}; bool unusedBit_4_15 : 1 {};
/** /**
offset 0 bit 16 */ offset 0 bit 16 */
bool unusedBit_3_16 : 1 {}; bool unusedBit_4_16 : 1 {};
/** /**
offset 0 bit 17 */ offset 0 bit 17 */
bool unusedBit_3_17 : 1 {}; bool unusedBit_4_17 : 1 {};
/** /**
offset 0 bit 18 */ offset 0 bit 18 */
bool unusedBit_3_18 : 1 {}; bool unusedBit_4_18 : 1 {};
/** /**
offset 0 bit 19 */ offset 0 bit 19 */
bool unusedBit_3_19 : 1 {}; bool unusedBit_4_19 : 1 {};
/** /**
offset 0 bit 20 */ offset 0 bit 20 */
bool unusedBit_3_20 : 1 {}; bool unusedBit_4_20 : 1 {};
/** /**
offset 0 bit 21 */ offset 0 bit 21 */
bool unusedBit_3_21 : 1 {}; bool unusedBit_4_21 : 1 {};
/** /**
offset 0 bit 22 */ offset 0 bit 22 */
bool unusedBit_3_22 : 1 {}; bool unusedBit_4_22 : 1 {};
/** /**
offset 0 bit 23 */ offset 0 bit 23 */
bool unusedBit_3_23 : 1 {}; bool unusedBit_4_23 : 1 {};
/** /**
offset 0 bit 24 */ offset 0 bit 24 */
bool unusedBit_3_24 : 1 {}; bool unusedBit_4_24 : 1 {};
/** /**
offset 0 bit 25 */ offset 0 bit 25 */
bool unusedBit_3_25 : 1 {}; bool unusedBit_4_25 : 1 {};
/** /**
offset 0 bit 26 */ offset 0 bit 26 */
bool unusedBit_3_26 : 1 {}; bool unusedBit_4_26 : 1 {};
/** /**
offset 0 bit 27 */ offset 0 bit 27 */
bool unusedBit_3_27 : 1 {}; bool unusedBit_4_27 : 1 {};
/** /**
offset 0 bit 28 */ offset 0 bit 28 */
bool unusedBit_3_28 : 1 {}; bool unusedBit_4_28 : 1 {};
/** /**
offset 0 bit 29 */ offset 0 bit 29 */
bool unusedBit_3_29 : 1 {}; bool unusedBit_4_29 : 1 {};
/** /**
offset 0 bit 30 */ offset 0 bit 30 */
bool unusedBit_3_30 : 1 {}; bool unusedBit_4_30 : 1 {};
/** /**
offset 0 bit 31 */ offset 0 bit 31 */
bool unusedBit_3_31 : 1 {}; bool unusedBit_4_31 : 1 {};
/** /**
* offset 4 * offset 4
*/ */
@ -113,4 +113,4 @@ struct boost_control_s {
}; };
// end // end
// this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Tue Nov 23 21:00:21 UTC 2021 // this section was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Wed Nov 24 13:04:49 EST 2021

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated; package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Tue Nov 23 21:00:21 UTC 2021 // this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/actuators/boost_control.txt Wed Nov 24 13:04:49 EST 2021
// by class com.rusefi.output.FileJavaFieldsConsumer // by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*; import com.rusefi.config.*;
@ -9,70 +9,70 @@ public class BoostControl {
public static final Field ISTPSVALID = Field.create("ISTPSVALID", 0, FieldType.BIT, 0); public static final Field ISTPSVALID = Field.create("ISTPSVALID", 0, FieldType.BIT, 0);
public static final Field M_SHOULDRESETPID = Field.create("M_SHOULDRESETPID", 0, FieldType.BIT, 1); 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 ISBELOWCLOSEDLOOPTHRESHOLD = Field.create("ISBELOWCLOSEDLOOPTHRESHOLD", 0, FieldType.BIT, 2);
public static final Field UNUSEDBIT_3_3 = Field.create("UNUSEDBIT_3_3", 0, FieldType.BIT, 3); public static final Field ISNOTCLOSEDLOOP = Field.create("ISNOTCLOSEDLOOP", 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_4_4 = Field.create("UNUSEDBIT_4_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_4_5 = Field.create("UNUSEDBIT_4_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_4_6 = Field.create("UNUSEDBIT_4_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_4_7 = Field.create("UNUSEDBIT_4_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_4_8 = Field.create("UNUSEDBIT_4_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_4_9 = Field.create("UNUSEDBIT_4_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_4_10 = Field.create("UNUSEDBIT_4_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_4_11 = Field.create("UNUSEDBIT_4_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_4_12 = Field.create("UNUSEDBIT_4_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_4_13 = Field.create("UNUSEDBIT_4_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_4_14 = Field.create("UNUSEDBIT_4_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_4_15 = Field.create("UNUSEDBIT_4_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_4_16 = Field.create("UNUSEDBIT_4_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_4_17 = Field.create("UNUSEDBIT_4_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_4_18 = Field.create("UNUSEDBIT_4_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_4_19 = Field.create("UNUSEDBIT_4_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_4_20 = Field.create("UNUSEDBIT_4_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_4_21 = Field.create("UNUSEDBIT_4_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_4_22 = Field.create("UNUSEDBIT_4_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_4_23 = Field.create("UNUSEDBIT_4_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_4_24 = Field.create("UNUSEDBIT_4_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_4_25 = Field.create("UNUSEDBIT_4_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_4_26 = Field.create("UNUSEDBIT_4_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_4_27 = Field.create("UNUSEDBIT_4_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_4_28 = Field.create("UNUSEDBIT_4_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_4_29 = Field.create("UNUSEDBIT_4_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_4_30 = Field.create("UNUSEDBIT_4_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 UNUSEDBIT_4_31 = Field.create("UNUSEDBIT_4_31", 0, FieldType.BIT, 31);
public static final Field OPENLOOPPART = Field.create("OPENLOOPPART", 4, FieldType.FLOAT); 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 CLOSEDLOOPPART = Field.create("CLOSEDLOOPPART", 8, FieldType.FLOAT);
public static final Field[] VALUES = { public static final Field[] VALUES = {
ISTPSVALID, ISTPSVALID,
M_SHOULDRESETPID, M_SHOULDRESETPID,
ISBELOWCLOSEDLOOPTHRESHOLD, ISBELOWCLOSEDLOOPTHRESHOLD,
UNUSEDBIT_3_3, ISNOTCLOSEDLOOP,
UNUSEDBIT_3_4, UNUSEDBIT_4_4,
UNUSEDBIT_3_5, UNUSEDBIT_4_5,
UNUSEDBIT_3_6, UNUSEDBIT_4_6,
UNUSEDBIT_3_7, UNUSEDBIT_4_7,
UNUSEDBIT_3_8, UNUSEDBIT_4_8,
UNUSEDBIT_3_9, UNUSEDBIT_4_9,
UNUSEDBIT_3_10, UNUSEDBIT_4_10,
UNUSEDBIT_3_11, UNUSEDBIT_4_11,
UNUSEDBIT_3_12, UNUSEDBIT_4_12,
UNUSEDBIT_3_13, UNUSEDBIT_4_13,
UNUSEDBIT_3_14, UNUSEDBIT_4_14,
UNUSEDBIT_3_15, UNUSEDBIT_4_15,
UNUSEDBIT_3_16, UNUSEDBIT_4_16,
UNUSEDBIT_3_17, UNUSEDBIT_4_17,
UNUSEDBIT_3_18, UNUSEDBIT_4_18,
UNUSEDBIT_3_19, UNUSEDBIT_4_19,
UNUSEDBIT_3_20, UNUSEDBIT_4_20,
UNUSEDBIT_3_21, UNUSEDBIT_4_21,
UNUSEDBIT_3_22, UNUSEDBIT_4_22,
UNUSEDBIT_3_23, UNUSEDBIT_4_23,
UNUSEDBIT_3_24, UNUSEDBIT_4_24,
UNUSEDBIT_3_25, UNUSEDBIT_4_25,
UNUSEDBIT_3_26, UNUSEDBIT_4_26,
UNUSEDBIT_3_27, UNUSEDBIT_4_27,
UNUSEDBIT_3_28, UNUSEDBIT_4_28,
UNUSEDBIT_3_29, UNUSEDBIT_4_29,
UNUSEDBIT_3_30, UNUSEDBIT_4_30,
UNUSEDBIT_3_31, UNUSEDBIT_4_31,
OPENLOOPPART, OPENLOOPPART,
CLOSEDLOOPPART, CLOSEDLOOPPART,
}; };

View File

@ -9,6 +9,7 @@ public enum LiveDataView {
FUEL_PUMP(live_data_e.LDS_FUEL_PUMP, FuelPump.VALUES, "fuel_pump.cpp"), FUEL_PUMP(live_data_e.LDS_FUEL_PUMP, FuelPump.VALUES, "fuel_pump.cpp"),
MAIN_RELAY(live_data_e.LDS_MAIN_RELAY, MainRelay.VALUES, "main_relay.cpp"), MAIN_RELAY(live_data_e.LDS_MAIN_RELAY, MainRelay.VALUES, "main_relay.cpp"),
TPS_ACCEL(live_data_e.LDS_TPS_ACCEL, TpsAccelState.VALUES, "accel_enrichment.cpp"), TPS_ACCEL(live_data_e.LDS_TPS_ACCEL, TpsAccelState.VALUES, "accel_enrichment.cpp"),
BOOST_CONTROL(live_data_e.LDS_BOOST_CONTROL, BoostControl.VALUES, "boost_control.cpp"),
; ;
private final live_data_e liveDataE; private final live_data_e liveDataE;