auto-sync
This commit is contained in:
parent
5d5337e306
commit
e735d7402d
|
@ -27,6 +27,7 @@ static Logging *logger;
|
||||||
|
|
||||||
extern pin_output_mode_e DEFAULT_OUTPUT;
|
extern pin_output_mode_e DEFAULT_OUTPUT;
|
||||||
extern engine_pins_s enginePins;
|
extern engine_pins_s enginePins;
|
||||||
|
int alternatorPidResetCounter = 0;
|
||||||
|
|
||||||
static SimplePwm alternatorControl;
|
static SimplePwm alternatorControl;
|
||||||
static pid_s *altPidS = &persistentState.persistentConfiguration.engineConfiguration.alternatorControl;
|
static pid_s *altPidS = &persistentState.persistentConfiguration.engineConfiguration.alternatorControl;
|
||||||
|
@ -49,6 +50,7 @@ static msg_t AltCtrlThread(int param) {
|
||||||
while (true) {
|
while (true) {
|
||||||
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||||
if (shouldResetPid) {
|
if (shouldResetPid) {
|
||||||
|
alternatorPidResetCounter++;
|
||||||
altPid.reset();
|
altPid.reset();
|
||||||
}
|
}
|
||||||
shouldResetPid = false;
|
shouldResetPid = false;
|
||||||
|
@ -94,8 +96,9 @@ static msg_t AltCtrlThread(int param) {
|
||||||
if (engineConfiguration->debugMode == ALTERNATOR_PID) {
|
if (engineConfiguration->debugMode == ALTERNATOR_PID) {
|
||||||
tsOutputChannels.debugFloatField1 = currentAltDuty;
|
tsOutputChannels.debugFloatField1 = currentAltDuty;
|
||||||
altPid.postState(&tsOutputChannels);
|
altPid.postState(&tsOutputChannels);
|
||||||
|
tsOutputChannels.debugIntField3 = alternatorPidResetCounter;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* !EFI_UNIT_TEST */
|
||||||
|
|
||||||
alternatorControl.setSimplePwmDutyCycle(currentAltDuty / 100);
|
alternatorControl.setSimplePwmDutyCycle(currentAltDuty / 100);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ enable2ndByteCanID = false
|
||||||
|
|
||||||
; see PAGE_0_SIZE in C source code
|
; see PAGE_0_SIZE in C source code
|
||||||
; CONFIG_DEFINITION_START
|
; CONFIG_DEFINITION_START
|
||||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Sep 17 18:26:30 EDT 2016
|
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Sep 17 20:34:09 EDT 2016
|
||||||
|
|
||||||
pageSize = 16376
|
pageSize = 16376
|
||||||
page = 1
|
page = 1
|
||||||
|
@ -1238,6 +1238,8 @@ fileVersion = { 20160702 }
|
||||||
entry = massAirFlowValue,"airMass", float, "%.3f"
|
entry = massAirFlowValue,"airMass", float, "%.3f"
|
||||||
entry = pedalPosition, "pedal", float, "%.3f"
|
entry = pedalPosition, "pedal", float, "%.3f"
|
||||||
entry = triggerErrorsCounter, "trg err",int, "%d"
|
entry = triggerErrorsCounter, "trg err",int, "%d"
|
||||||
|
entry = curIdlePosition, "idle position", float, "%.3f"
|
||||||
|
|
||||||
|
|
||||||
entry = pulseWidth, "fuel: pulse", float, "%.3f"
|
entry = pulseWidth, "fuel: pulse", float, "%.3f"
|
||||||
entry = baseFuel, "fuel: base", float, "%.2f"
|
entry = baseFuel, "fuel: base", float, "%.2f"
|
||||||
|
@ -1259,22 +1261,33 @@ fileVersion = { 20160702 }
|
||||||
|
|
||||||
entry = sparkDwellValue, "dwell", float,"%.3f"
|
entry = sparkDwellValue, "dwell", float,"%.3f"
|
||||||
|
|
||||||
entry = debugMode, "debugMode",int,"%d"
|
; is there a way to log parameter? entry = debugMode, "debugMode",int,"%d"
|
||||||
; Alternator_PID: alternator duty cycle
|
; Alternator_PID: alternator duty cycle
|
||||||
; DBG_TPS_ACCEL: from TPS
|
; DBG_TPS_ACCEL: from TPS
|
||||||
entry = debugFloatField1, "debug f1",float,"%.4f"
|
entry = debugFloatField1, "debug f1",float,"%.4f"
|
||||||
|
|
||||||
|
; Alternator_PID: current integration term
|
||||||
; DBG_TPS_ACCEL: to TPS
|
; DBG_TPS_ACCEL: to TPS
|
||||||
entry = debugFloatField2, "debug f2",float,"%.4f"
|
entry = debugFloatField2, "debug f2",float,"%.4f"
|
||||||
|
|
||||||
|
; Alternator_PID: previous error
|
||||||
; DBG_TPS_ACCEL: tps<>tps table value
|
; DBG_TPS_ACCEL: tps<>tps table value
|
||||||
entry = debugFloatField3, "debug f3",float,"%.4f"
|
entry = debugFloatField3, "debug f3",float,"%.4f"
|
||||||
|
|
||||||
|
; Alternator_PID: I setting
|
||||||
; DBG_TPS_ACCEL: extra fuel
|
; DBG_TPS_ACCEL: extra fuel
|
||||||
entry = debugFloatField4, "debug f4",float,"%.4f"
|
entry = debugFloatField4, "debug f4",float,"%.4f"
|
||||||
|
|
||||||
|
; Alternator_PID: D setting
|
||||||
entry = debugFloatField5, "debug f5",float,"%.4f"
|
entry = debugFloatField5, "debug f5",float,"%.4f"
|
||||||
|
|
||||||
|
; Alternator_PID: P setting
|
||||||
entry = debugIntField1, "debug i1",int,"%d"
|
entry = debugIntField1, "debug i1",int,"%d"
|
||||||
|
|
||||||
|
; Alternator_PID: offset setting
|
||||||
entry = debugIntField2, "debug i2",int,"%d"
|
entry = debugIntField2, "debug i2",int,"%d"
|
||||||
|
|
||||||
|
; Alternator_PID: PID reset counter
|
||||||
entry = debugIntField3, "debug i3",int,"%d"
|
entry = debugIntField3, "debug i3",int,"%d"
|
||||||
entry = warningCounter, "warn",int,"%d"
|
entry = warningCounter, "warn",int,"%d"
|
||||||
entry = lastErrorCode, "error",int,"%d"
|
entry = lastErrorCode, "error",int,"%d"
|
||||||
|
|
|
@ -1211,6 +1211,8 @@ fileVersion = { 20160702 }
|
||||||
entry = massAirFlowValue,"airMass", float, "%.3f"
|
entry = massAirFlowValue,"airMass", float, "%.3f"
|
||||||
entry = pedalPosition, "pedal", float, "%.3f"
|
entry = pedalPosition, "pedal", float, "%.3f"
|
||||||
entry = triggerErrorsCounter, "trg err",int, "%d"
|
entry = triggerErrorsCounter, "trg err",int, "%d"
|
||||||
|
entry = curIdlePosition, "idle position", float, "%.3f"
|
||||||
|
|
||||||
|
|
||||||
entry = pulseWidth, "fuel: pulse", float, "%.3f"
|
entry = pulseWidth, "fuel: pulse", float, "%.3f"
|
||||||
entry = baseFuel, "fuel: base", float, "%.2f"
|
entry = baseFuel, "fuel: base", float, "%.2f"
|
||||||
|
@ -1232,22 +1234,33 @@ fileVersion = { 20160702 }
|
||||||
|
|
||||||
entry = sparkDwellValue, "dwell", float,"%.3f"
|
entry = sparkDwellValue, "dwell", float,"%.3f"
|
||||||
|
|
||||||
entry = debugMode, "debugMode",int,"%d"
|
; is there a way to log parameter? entry = debugMode, "debugMode",int,"%d"
|
||||||
; Alternator_PID: alternator duty cycle
|
; Alternator_PID: alternator duty cycle
|
||||||
; DBG_TPS_ACCEL: from TPS
|
; DBG_TPS_ACCEL: from TPS
|
||||||
entry = debugFloatField1, "debug f1",float,"%.4f"
|
entry = debugFloatField1, "debug f1",float,"%.4f"
|
||||||
|
|
||||||
|
; Alternator_PID: current integration term
|
||||||
; DBG_TPS_ACCEL: to TPS
|
; DBG_TPS_ACCEL: to TPS
|
||||||
entry = debugFloatField2, "debug f2",float,"%.4f"
|
entry = debugFloatField2, "debug f2",float,"%.4f"
|
||||||
|
|
||||||
|
; Alternator_PID: previous error
|
||||||
; DBG_TPS_ACCEL: tps<>tps table value
|
; DBG_TPS_ACCEL: tps<>tps table value
|
||||||
entry = debugFloatField3, "debug f3",float,"%.4f"
|
entry = debugFloatField3, "debug f3",float,"%.4f"
|
||||||
|
|
||||||
|
; Alternator_PID: I setting
|
||||||
; DBG_TPS_ACCEL: extra fuel
|
; DBG_TPS_ACCEL: extra fuel
|
||||||
entry = debugFloatField4, "debug f4",float,"%.4f"
|
entry = debugFloatField4, "debug f4",float,"%.4f"
|
||||||
|
|
||||||
|
; Alternator_PID: D setting
|
||||||
entry = debugFloatField5, "debug f5",float,"%.4f"
|
entry = debugFloatField5, "debug f5",float,"%.4f"
|
||||||
|
|
||||||
|
; Alternator_PID: P setting
|
||||||
entry = debugIntField1, "debug i1",int,"%d"
|
entry = debugIntField1, "debug i1",int,"%d"
|
||||||
|
|
||||||
|
; Alternator_PID: offset setting
|
||||||
entry = debugIntField2, "debug i2",int,"%d"
|
entry = debugIntField2, "debug i2",int,"%d"
|
||||||
|
|
||||||
|
; Alternator_PID: PID reset counter
|
||||||
entry = debugIntField3, "debug i3",int,"%d"
|
entry = debugIntField3, "debug i3",int,"%d"
|
||||||
entry = warningCounter, "warn",int,"%d"
|
entry = warningCounter, "warn",int,"%d"
|
||||||
entry = lastErrorCode, "error",int,"%d"
|
entry = lastErrorCode, "error",int,"%d"
|
||||||
|
|
Loading…
Reference in New Issue