From d3f1f82e5f65e83198b3ef0f013ed7c77dbc120d Mon Sep 17 00:00:00 2001 From: Brian Boucheron Date: Sun, 17 Jul 2011 13:35:44 -0400 Subject: [PATCH] added error message for step pulses < 3 microseconds --- settings.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/settings.c b/settings.c index a99fe25..82544d3 100644 --- a/settings.c +++ b/settings.c @@ -145,7 +145,12 @@ void settings_store_setting(int parameter, double value) { return; } settings.steps_per_mm[parameter] = value; break; - case 3: settings.pulse_microseconds = round(value); break; + case 3: + if (value < 3) { + printPgmString(PSTR("Step pulse must be >= 3 microseconds\r\n")); + return; + } + settings.pulse_microseconds = round(value); break; case 4: settings.default_feed_rate = value; break; case 5: settings.default_seek_rate = value; break; case 6: settings.mm_per_arc_segment = value; break;