auto-sync

This commit is contained in:
rusEfi 2015-04-03 18:09:51 -05:00
parent 9ca7f4e227
commit 60669b2b14
2 changed files with 6 additions and 0 deletions

View File

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

View File

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