Fix issues, make optional

This commit is contained in:
Scott Lahteine
2018-08-24 21:53:42 -05:00
parent aa80e448e2
commit 3e81745e81
13 changed files with 98 additions and 52 deletions

View File

@@ -21,13 +21,13 @@
*/
#include "../../inc/MarlinConfig.h"
#if HAS_SERVOS
#if HAS_SERVOS && ENABLED(EDITABLE_SERVO_ANGLES)
#include "../gcode.h"
#include "../../module/servo.h"
void GcodeSuite::M281() {
if (!parser.seen('P')) return;
if (!parser.seenval('P')) return;
const int servo_index = parser.value_int();
if (WITHIN(servo_index, 0, NUM_SERVOS - 1)) {
bool angle_change = false;
@@ -53,4 +53,4 @@ void GcodeSuite::M281() {
}
}
#endif
#endif // HAS_SERVOS && EDITABLE_SERVO_ANGLES