dead showAltInfo
This commit is contained in:
parent
dc6419f4c2
commit
9583f6e2f1
|
@ -98,22 +98,10 @@ void AlternatorController::onFastCallback() {
|
||||||
ClosedLoopController::update();
|
ClosedLoopController::update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void showAltInfo(void) {
|
|
||||||
efiPrintf("alt=%s @%s t=%dms", boolToString(engineConfiguration->isAlternatorControlEnabled),
|
|
||||||
hwPortname(engineConfiguration->alternatorControlPin),
|
|
||||||
engineConfiguration->alternatorControl.periodMs);
|
|
||||||
efiPrintf("p=%.2f/i=%.2f/d=%.2f offset=%.2f", engineConfiguration->alternatorControl.pFactor,
|
|
||||||
0, 0, engineConfiguration->alternatorControl.offset); // todo: i & d
|
|
||||||
efiPrintf("vbatt=%.2f/duty=%.2f/target=%.2f", Sensor::getOrZero(SensorType::BatteryVoltage), currentAltDuty,
|
|
||||||
engineConfiguration->targetVBatt);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setAltPFactor(float p) {
|
void setAltPFactor(float p) {
|
||||||
engineConfiguration->alternatorControl.pFactor = p;
|
engineConfiguration->alternatorControl.pFactor = p;
|
||||||
efiPrintf("setAltPid: %.2f", p);
|
efiPrintf("setAltPid: %.2f", p);
|
||||||
engine->module<AlternatorController>()->pidReset();
|
engine->module<AlternatorController>()->pidReset();
|
||||||
showAltInfo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AlternatorController::onConfigurationChange(engine_configuration_s const * previousConfiguration) {
|
void AlternatorController::onConfigurationChange(engine_configuration_s const * previousConfiguration) {
|
||||||
|
@ -121,8 +109,6 @@ void AlternatorController::onConfigurationChange(engine_configuration_s const *
|
||||||
}
|
}
|
||||||
|
|
||||||
void initAlternatorCtrl() {
|
void initAlternatorCtrl() {
|
||||||
addConsoleAction("altinfo", showAltInfo);
|
|
||||||
|
|
||||||
engine->module<AlternatorController>()->init();
|
engine->module<AlternatorController>()->init();
|
||||||
|
|
||||||
if (!isBrainPinValid(engineConfiguration->alternatorControlPin))
|
if (!isBrainPinValid(engineConfiguration->alternatorControlPin))
|
||||||
|
|
|
@ -15,7 +15,6 @@ void initAlternatorCtrl();
|
||||||
void setAltPFactor(float p);
|
void setAltPFactor(float p);
|
||||||
void setAltIFactor(float p);
|
void setAltIFactor(float p);
|
||||||
void setAltDFactor(float p);
|
void setAltDFactor(float p);
|
||||||
void showAltInfo(void);
|
|
||||||
|
|
||||||
class AlternatorController : public EngineModule, public ClosedLoopController<float, percent_t> {
|
class AlternatorController : public EngineModule, public ClosedLoopController<float, percent_t> {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue