Add board MKS_BASE_HEROIC (#9926)

Followup to #9008

- Don't define micro-stepping pins for boards that lack them.
- Allow setting of 128 microsteps with `M350`.
This commit is contained in:
Scott Lahteine
2018-03-03 23:14:52 -06:00
committed by GitHub
parent 649f375494
commit 6d7f4f84e2
6 changed files with 63 additions and 23 deletions

View File

@ -1591,13 +1591,18 @@ void Stepper::report_positions() {
void Stepper::microstep_mode(const uint8_t driver, const uint8_t stepping_mode) {
switch (stepping_mode) {
case 1: microstep_ms(driver, MICROSTEP1); break;
case 2: microstep_ms(driver, MICROSTEP2); break;
case 4: microstep_ms(driver, MICROSTEP4); break;
#if ENABLED(HEROIC_STEPPER_DRIVERS)
case 128: microstep_ms(driver, MICROSTEP128); break;
#else
case 2: microstep_ms(driver, MICROSTEP2); break;
case 4: microstep_ms(driver, MICROSTEP4); break;
#endif
case 8: microstep_ms(driver, MICROSTEP8); break;
case 16: microstep_ms(driver, MICROSTEP16); break;
#if MB(ALLIGATOR)
case 32: microstep_ms(driver, MICROSTEP32); break;
#endif
default: SERIAL_ERROR_START(); SERIAL_ERRORLNPGM("Microsteps unavailable"); break;
}
}