Browse Source

Coding standard patch of M290

Scott Lahteine 7 years ago
parent
commit
c938273bd5
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/src/gcode/motion/M290.cpp

+ 2
- 2
Marlin/src/gcode/motion/M290.cpp View File

36
   #if ENABLED(BABYSTEP_XY)
36
   #if ENABLED(BABYSTEP_XY)
37
     for (uint8_t a = X_AXIS; a <= Z_AXIS; a++)
37
     for (uint8_t a = X_AXIS; a <= Z_AXIS; a++)
38
       if (parser.seenval(axis_codes[a]) || (a == Z_AXIS && parser.seenval('S'))) {
38
       if (parser.seenval(axis_codes[a]) || (a == Z_AXIS && parser.seenval('S'))) {
39
-        float offs = constrain(parser.value_axis_units(a), -2, 2);
39
+        const float offs = constrain(parser.value_axis_units(a), -2, 2);
40
         #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
40
         #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
41
           if (a == Z_AXIS) {
41
           if (a == Z_AXIS) {
42
             zprobe_zoffset += offs;
42
             zprobe_zoffset += offs;
47
       }
47
       }
48
   #else
48
   #else
49
     if (parser.seenval('Z') || parser.seenval('S')) {
49
     if (parser.seenval('Z') || parser.seenval('S')) {
50
-      float offs = constrain(parser.value_axis_units(Z_AXIS), -2, 2);
50
+      const float offs = constrain(parser.value_axis_units(Z_AXIS), -2, 2);
51
       #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
51
       #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
52
         zprobe_zoffset += offs;
52
         zprobe_zoffset += offs;
53
         refresh_zprobe_zoffset(); // This will babystep the axis
53
         refresh_zprobe_zoffset(); // This will babystep the axis

Loading…
Cancel
Save