Browse Source

Merge pull request #8297 from thinkyhead/bf2_M118_and_others

[2.0] Fix M118, compiler warnings, etc.
Scott Lahteine 7 years ago
parent
commit
714d2b9bbc
No account linked to committer's email address

+ 2
- 0
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

@@ -630,6 +630,8 @@ void GcodeSuite::G29() {
630 630
 
631 631
       bool zig = PR_OUTER_END & 1;  // Always end at RIGHT and BACK_PROBE_BED_POSITION
632 632
 
633
+      measured_z = 0;
634
+
633 635
       // Outer loop is Y with PROBE_Y_FIRST disabled
634 636
       for (uint8_t PR_OUTER_VAR = 0; PR_OUTER_VAR < PR_OUTER_END && !isnan(measured_z); PR_OUTER_VAR++) {
635 637
 

+ 2
- 2
Marlin/src/gcode/host/M118.cpp View File

@@ -25,8 +25,8 @@
25 25
 /**
26 26
  * M118: Display a message in the host console.
27 27
  *
28
- *  A  Append '// ' for an action command, as in OctoPrint
29
- *  E  Have the host 'echo:' the text
28
+ *  A1  Append '// ' for an action command, as in OctoPrint
29
+ *  E1  Have the host 'echo:' the text
30 30
  */
31 31
 void GcodeSuite::M118() {
32 32
   if (parser.boolval('E')) SERIAL_ECHO_START();

+ 1
- 0
Marlin/src/gcode/motion/G2_G3.cpp View File

@@ -51,6 +51,7 @@ void plan_arc(
51 51
   #if ENABLED(CNC_WORKSPACE_PLANES)
52 52
     AxisEnum p_axis, q_axis, l_axis;
53 53
     switch (gcode.workspace_plane) {
54
+      default:
54 55
       case GcodeSuite::PLANE_XY: p_axis = X_AXIS; q_axis = Y_AXIS; l_axis = Z_AXIS; break;
55 56
       case GcodeSuite::PLANE_ZX: p_axis = Z_AXIS; q_axis = X_AXIS; l_axis = Y_AXIS; break;
56 57
       case GcodeSuite::PLANE_YZ: p_axis = Y_AXIS; q_axis = Z_AXIS; l_axis = X_AXIS; break;

+ 2
- 1
Marlin/src/gcode/parser.cpp View File

@@ -155,7 +155,7 @@ void GCodeParser::parse(char *p) {
155 155
   #endif
156 156
 
157 157
   // Only use string_arg for these M codes
158
-  if (letter == 'M') switch (codenum) { case 23: case 28: case 30: case 117: case 118: case 928: string_arg = p; return; default: break; }
158
+  if (letter == 'M') switch (codenum) { case 23: case 28: case 30: case 117: case 928: string_arg = p; return; default: break; }
159 159
 
160 160
   #if ENABLED(DEBUG_GCODE_PARSER)
161 161
     const bool debug = codenum == 800;
@@ -167,6 +167,7 @@ void GCodeParser::parse(char *p) {
167 167
    * Most codes ignore 'string_arg', but those that want a string will get the right pointer.
168 168
    * The following loop assigns the first "parameter" having no numeric value to 'string_arg'.
169 169
    * This allows M0/M1 with expire time to work: "M0 S5 You Win!"
170
+   * For 'M118' you must use 'E1' and 'A1' rather than just 'E' or 'A'
170 171
    */
171 172
   string_arg = NULL;
172 173
   while (char code = *p++) {                    // Get the next parameter. A NUL ends the loop

+ 2
- 2
Marlin/src/module/configuration_store.cpp View File

@@ -64,7 +64,7 @@
64 64
  *  195  M206 XYZ  home_offset                      (float x3)
65 65
  *  207  M218 XYZ  hotend_offset                    (float x3 per additional hotend)
66 66
  *
67
- * Global Leveling:
67
+ * Global Leveling:                                 4 bytes
68 68
  *  219            z_fade_height                    (float)
69 69
  *
70 70
  * MESH_BED_LEVELING:                               43 bytes
@@ -80,7 +80,7 @@
80 80
  * ABL_PLANAR:                                      36 bytes
81 81
  *  270            planner.bed_level_matrix         (matrix_3x3 = float x9)
82 82
  *
83
- * AUTO_BED_LEVELING_BILINEAR:                      47 bytes
83
+ * AUTO_BED_LEVELING_BILINEAR:                      46 bytes
84 84
  *  306            GRID_MAX_POINTS_X                (uint8_t)
85 85
  *  307            GRID_MAX_POINTS_Y                (uint8_t)
86 86
  *  308            bilinear_grid_spacing            (int x2)

Loading…
Cancel
Save