only:alphax-2chan

clean-up
This commit is contained in:
Andrey 2024-06-23 22:25:13 -04:00
parent f74de5b28a
commit f1d16112df
3 changed files with 12 additions and 13 deletions

View File

@ -0,0 +1,5 @@
bit boardUseTachPullUp,"12v","5v"
bit boardUseTempPullUp,"With Pull Ups","Piggyback Mode"
bit boardUseCrankPullUp,"Hall","VR"
bit boardUse2stepPullDown,"With Pull Down","With Pull Up"
bit boardUseCamPullDown,"With Pull Down","With Pull Up"

View File

@ -66,12 +66,12 @@ void boardInitHardware() {
}
void boardOnConfigurationChange(engine_configuration_s * /*previousConfiguration*/) {
alphaTachPullUp.setValue(engineConfiguration->boardUseTachPullUp);
alphaTempPullUp.setValue(engineConfiguration->boardUseTempPullUp);
alphaCrankPPullUp.setValue(engineConfiguration->boardUseCrankPullUp);
alphaCrankNPullUp.setValue(engineConfiguration->boardUseCrankPullUp);
alpha2stepPullDown.setValue(engineConfiguration->boardUse2stepPullDown);
alphaCamPullDown.setValue(engineConfiguration->boardUseCamPullDown);
alphaTachPullUp.setValue(config->boardUseTachPullUp);
alphaTempPullUp.setValue(config->boardUseTempPullUp);
alphaCrankPPullUp.setValue(config->boardUseCrankPullUp);
alphaCrankNPullUp.setValue(config->boardUseCrankPullUp);
alpha2stepPullDown.setValue(config->boardUse2stepPullDown);
alphaCamPullDown.setValue(config->boardUseCamPullDown);
}
@ -132,7 +132,7 @@ void setBoardDefaultConfiguration() {
engineConfiguration->baroSensor.hwChannel = H144_IN_MAP3; // On-board MAP
}
engineConfiguration->boardUseTempPullUp = true;
config->boardUseTempPullUp = true;
engineConfiguration->fuelPumpPin = Gpio::H144_OUT_PWM2;
engineConfiguration->fanPin = Gpio::H144_OUT_PWM4;

View File

@ -574,12 +574,6 @@ static void enableOrDisable(const char *param, bool isEnabled) {
engineConfiguration->verboseKLine = isEnabled;
} else if (strEqualCaseInsensitive(param, "stepperidle")) {
engineConfiguration->useStepperIdle = isEnabled;
} else if (strEqualCaseInsensitive(param, "boardUseTempPullUp")) {
engineConfiguration->boardUseTempPullUp = isEnabled;
incrementGlobalConfigurationVersion();
} else if (strEqualCaseInsensitive(param, "boardUseTachPullUp")) {
engineConfiguration->boardUseTachPullUp = isEnabled;
incrementGlobalConfigurationVersion();
} else if (strEqualCaseInsensitive(param, "two_wire_wasted_spark")) {
engineConfiguration->twoWireBatchIgnition = isEnabled;
incrementGlobalConfigurationVersion();