Implausible

This commit is contained in:
Scott Lahteine 2019-09-11 02:46:52 -05:00
parent 3648bce886
commit f9992c5f33
5 changed files with 11 additions and 11 deletions

View File

@ -1091,7 +1091,7 @@
g29_verbose_level = parser.seen('V') ? parser.value_int() : 0; g29_verbose_level = parser.seen('V') ? parser.value_int() : 0;
if (!WITHIN(g29_verbose_level, 0, 4)) { if (!WITHIN(g29_verbose_level, 0, 4)) {
SERIAL_ECHOLNPGM("?(V)erbose level is implausible (0-4).\n"); SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4).\n");
err_flag = true; err_flag = true;
} }

View File

@ -349,7 +349,7 @@ G29_TYPE GcodeSuite::G29() {
verbose_level = parser.intval('V'); verbose_level = parser.intval('V');
if (!WITHIN(verbose_level, 0, 4)) { if (!WITHIN(verbose_level, 0, 4)) {
SERIAL_ECHOLNPGM("?(V)erbose level is implausible (0-4)."); SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4).");
G29_RETURN(false); G29_RETURN(false);
} }
@ -370,11 +370,11 @@ G29_TYPE GcodeSuite::G29() {
if (parser.seenval('P')) abl_grid_points_x = abl_grid_points_y = parser.value_int(); if (parser.seenval('P')) abl_grid_points_x = abl_grid_points_y = parser.value_int();
if (!WITHIN(abl_grid_points_x, 2, GRID_MAX_POINTS_X)) { if (!WITHIN(abl_grid_points_x, 2, GRID_MAX_POINTS_X)) {
SERIAL_ECHOLNPGM("?Probe points (X) is implausible (2-" STRINGIFY(GRID_MAX_POINTS_X) ")."); SERIAL_ECHOLNPGM("?Probe points (X) implausible (2-" STRINGIFY(GRID_MAX_POINTS_X) ").");
G29_RETURN(false); G29_RETURN(false);
} }
if (!WITHIN(abl_grid_points_y, 2, GRID_MAX_POINTS_Y)) { if (!WITHIN(abl_grid_points_y, 2, GRID_MAX_POINTS_Y)) {
SERIAL_ECHOLNPGM("?Probe points (Y) is implausible (2-" STRINGIFY(GRID_MAX_POINTS_Y) ")."); SERIAL_ECHOLNPGM("?Probe points (Y) implausible (2-" STRINGIFY(GRID_MAX_POINTS_Y) ").");
G29_RETURN(false); G29_RETURN(false);
} }

View File

@ -411,7 +411,7 @@ void GcodeSuite::G33() {
const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS); const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS);
if (!WITHIN(probe_points, 0, 10)) { if (!WITHIN(probe_points, 0, 10)) {
SERIAL_ECHOLNPGM("?(P)oints is implausible (0-10)."); SERIAL_ECHOLNPGM("?(P)oints implausible (0-10).");
return; return;
} }
@ -419,19 +419,19 @@ void GcodeSuite::G33() {
const float calibration_precision = parser.floatval('C', 0.0); const float calibration_precision = parser.floatval('C', 0.0);
if (calibration_precision < 0) { if (calibration_precision < 0) {
SERIAL_ECHOLNPGM("?(C)alibration precision is implausible (>=0)."); SERIAL_ECHOLNPGM("?(C)alibration precision implausible (>=0).");
return; return;
} }
const int8_t force_iterations = parser.intval('F', 0); const int8_t force_iterations = parser.intval('F', 0);
if (!WITHIN(force_iterations, 0, 30)) { if (!WITHIN(force_iterations, 0, 30)) {
SERIAL_ECHOLNPGM("?(F)orce iteration is implausible (0-30)."); SERIAL_ECHOLNPGM("?(F)orce iteration implausible (0-30).");
return; return;
} }
const int8_t verbose_level = parser.byteval('V', 1); const int8_t verbose_level = parser.byteval('V', 1);
if (!WITHIN(verbose_level, 0, 3)) { if (!WITHIN(verbose_level, 0, 3)) {
SERIAL_ECHOLNPGM("?(V)erbose level is implausible (0-3)."); SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-3).");
return; return;
} }
@ -475,7 +475,7 @@ void GcodeSuite::G33() {
const float a = RADIANS(210 + (360 / NPP) * (axis - 1)), const float a = RADIANS(210 + (360 / NPP) * (axis - 1)),
r = delta_calibration_radius; r = delta_calibration_radius;
if (!position_is_reachable(cos(a) * r, sin(a) * r)) { if (!position_is_reachable(cos(a) * r, sin(a) * r)) {
SERIAL_ECHOLNPGM("?(M665 B)ed radius is implausible."); SERIAL_ECHOLNPGM("?(M665 B)ed radius implausible.");
return; return;
} }
} }

View File

@ -59,7 +59,7 @@ void GcodeSuite::M48() {
const int8_t verbose_level = parser.byteval('V', 1); const int8_t verbose_level = parser.byteval('V', 1);
if (!WITHIN(verbose_level, 0, 4)) { if (!WITHIN(verbose_level, 0, 4)) {
SERIAL_ECHOLNPGM("?(V)erbose level is implausible (0-4)."); SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4).");
return; return;
} }

View File

@ -67,7 +67,7 @@ void GcodeSuite::M575() {
#endif #endif
} break; } break;
default: SERIAL_ECHO_MSG("?(B)aud rate is implausible."); default: SERIAL_ECHO_MSG("?(B)aud rate implausible.");
} }
} }