From 60669b2b1428ed8f2280d62ac7cafafbbf6ccc26 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Fri, 3 Apr 2015 18:09:51 -0500 Subject: [PATCH] auto-sync --- firmware/controllers/settings.cpp | 2 ++ firmware/hw_layer/stepper.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 4101b06edd..55b6edb7a4 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -778,6 +778,8 @@ static void setSpiMode(int index, bool mode) { static void enableOrDisable(const char *param, bool isEnabled) { if (strEqualCaseInsensitive(param, "fastadc")) { boardConfiguration->isFastAdcEnabled = isEnabled; + } else if (strEqualCaseInsensitive(param, "stepperidle")) { + boardConfiguration->useStepperIdle = isEnabled; } else if (strEqualCaseInsensitive(param, "joystick")) { engineConfiguration->isJoystickEnabled = isEnabled; } else if (strEqualCaseInsensitive(param, "HIP9011")) { diff --git a/firmware/hw_layer/stepper.cpp b/firmware/hw_layer/stepper.cpp index f53ee62a0a..d7ec4c94f8 100644 --- a/firmware/hw_layer/stepper.cpp +++ b/firmware/hw_layer/stepper.cpp @@ -65,6 +65,10 @@ void StepperMotor::pulse() { } void StepperMotor::initialize(brain_pin_e stepPin, brain_pin_e directionPin) { + if (stepPin == GPIO_UNASSIGNED || directionPin == GPIO_UNASSIGNED) { + return; + } + stepPort = getHwPort(stepPin); this->stepPin = getHwPin(stepPin);