auto-sync

This commit is contained in:
rusEfi 2016-01-21 23:02:49 -05:00
parent 7560895113
commit 95b9422774
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,6 @@
#if EFI_ALTERNATOR_CONTROL || defined(__DOXYGEN__) #if EFI_ALTERNATOR_CONTROL || defined(__DOXYGEN__)
EXTERN_ENGINE EXTERN_ENGINE
; ;
@ -39,7 +38,8 @@ static msg_t AltCtrlThread(int param) {
UNUSED(param); UNUSED(param);
chRegSetThreadName("AlternatorController"); chRegSetThreadName("AlternatorController");
while (true) { while (true) {
chThdSleepMilliseconds(engineConfiguration->alternatorDT); int dt = maxI(20, engineConfiguration->alternatorDT);
chThdSleepMilliseconds(dt);
currentAltDuty = engineConfiguration->alternatorOffset + altPid.getValue(engineConfiguration->targetVBatt, getVBatt(PASS_ENGINE_PARAMETER_F), 1); currentAltDuty = engineConfiguration->alternatorOffset + altPid.getValue(engineConfiguration->targetVBatt, getVBatt(PASS_ENGINE_PARAMETER_F), 1);
if (boardConfiguration->isVerboseAlternator) { if (boardConfiguration->isVerboseAlternator) {

View File

@ -1359,6 +1359,7 @@ fileVersion = { 20151201 }
field = "offset", alternatorOffset field = "offset", alternatorOffset
field = "P factor", alternatorControl_pFactor field = "P factor", alternatorControl_pFactor
field = "I factor", alternatorControl_iFactor field = "I factor", alternatorControl_iFactor
field = "D factor", alternatorControl_dFactor
field = "#% duty = Pterm + Iterm + Dterm + offset%" field = "#% duty = Pterm + Iterm + Dterm + offset%"
dialog = energySystems, "Battery and Alternator Settings", yAxis dialog = energySystems, "Battery and Alternator Settings", yAxis