dead showAltInfo

This commit is contained in:
Andrey 2024-06-10 19:50:47 -04:00
parent dc6419f4c2
commit 9583f6e2f1
2 changed files with 0 additions and 15 deletions

View File

@ -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))

View File

@ -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: