1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 23:30:16 +00:00

Merge pull request #8297 from thinkyhead/bf2_M118_and_others

[2.0] Fix M118, compiler warnings, etc.
This commit is contained in:
Scott Lahteine 2017-11-06 23:25:49 -06:00 committed by GitHub
commit 714d2b9bbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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

View File

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