auto-sync

This commit is contained in:
rusEfi 2016-09-17 21:02:45 -04:00
parent 5d5337e306
commit e735d7402d
3 changed files with 33 additions and 4 deletions

View File

@ -27,6 +27,7 @@ static Logging *logger;
extern pin_output_mode_e DEFAULT_OUTPUT;
extern engine_pins_s enginePins;
int alternatorPidResetCounter = 0;
static SimplePwm alternatorControl;
static pid_s *altPidS = &persistentState.persistentConfiguration.engineConfiguration.alternatorControl;
@ -49,6 +50,7 @@ static msg_t AltCtrlThread(int param) {
while (true) {
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
if (shouldResetPid) {
alternatorPidResetCounter++;
altPid.reset();
}
shouldResetPid = false;
@ -94,8 +96,9 @@ static msg_t AltCtrlThread(int param) {
if (engineConfiguration->debugMode == ALTERNATOR_PID) {
tsOutputChannels.debugFloatField1 = currentAltDuty;
altPid.postState(&tsOutputChannels);
tsOutputChannels.debugIntField3 = alternatorPidResetCounter;
}
#endif
#endif /* !EFI_UNIT_TEST */
alternatorControl.setSimplePwmDutyCycle(currentAltDuty / 100);
}

View File

@ -42,7 +42,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code
; 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
page = 1
@ -1238,6 +1238,8 @@ fileVersion = { 20160702 }
entry = massAirFlowValue,"airMass", float, "%.3f"
entry = pedalPosition, "pedal", float, "%.3f"
entry = triggerErrorsCounter, "trg err",int, "%d"
entry = curIdlePosition, "idle position", float, "%.3f"
entry = pulseWidth, "fuel: pulse", float, "%.3f"
entry = baseFuel, "fuel: base", float, "%.2f"
@ -1259,22 +1261,33 @@ fileVersion = { 20160702 }
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
; DBG_TPS_ACCEL: from TPS
entry = debugFloatField1, "debug f1",float,"%.4f"
; Alternator_PID: current integration term
; DBG_TPS_ACCEL: to TPS
entry = debugFloatField2, "debug f2",float,"%.4f"
; Alternator_PID: previous error
; DBG_TPS_ACCEL: tps<>tps table value
entry = debugFloatField3, "debug f3",float,"%.4f"
; Alternator_PID: I setting
; DBG_TPS_ACCEL: extra fuel
entry = debugFloatField4, "debug f4",float,"%.4f"
; Alternator_PID: D setting
entry = debugFloatField5, "debug f5",float,"%.4f"
; Alternator_PID: P setting
entry = debugIntField1, "debug i1",int,"%d"
; Alternator_PID: offset setting
entry = debugIntField2, "debug i2",int,"%d"
; Alternator_PID: PID reset counter
entry = debugIntField3, "debug i3",int,"%d"
entry = warningCounter, "warn",int,"%d"
entry = lastErrorCode, "error",int,"%d"

View File

@ -1211,6 +1211,8 @@ fileVersion = { 20160702 }
entry = massAirFlowValue,"airMass", float, "%.3f"
entry = pedalPosition, "pedal", float, "%.3f"
entry = triggerErrorsCounter, "trg err",int, "%d"
entry = curIdlePosition, "idle position", float, "%.3f"
entry = pulseWidth, "fuel: pulse", float, "%.3f"
entry = baseFuel, "fuel: base", float, "%.2f"
@ -1232,22 +1234,33 @@ fileVersion = { 20160702 }
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
; DBG_TPS_ACCEL: from TPS
entry = debugFloatField1, "debug f1",float,"%.4f"
; Alternator_PID: current integration term
; DBG_TPS_ACCEL: to TPS
entry = debugFloatField2, "debug f2",float,"%.4f"
; Alternator_PID: previous error
; DBG_TPS_ACCEL: tps<>tps table value
entry = debugFloatField3, "debug f3",float,"%.4f"
; Alternator_PID: I setting
; DBG_TPS_ACCEL: extra fuel
entry = debugFloatField4, "debug f4",float,"%.4f"
; Alternator_PID: D setting
entry = debugFloatField5, "debug f5",float,"%.4f"
; Alternator_PID: P setting
entry = debugIntField1, "debug i1",int,"%d"
; Alternator_PID: offset setting
entry = debugIntField2, "debug i2",int,"%d"
; Alternator_PID: PID reset counter
entry = debugIntField3, "debug i3",int,"%d"
entry = warningCounter, "warn",int,"%d"
entry = lastErrorCode, "error",int,"%d"