Limit/control pin state reporting option

- As a setup feature, users can compile-in input pin status reporting.
Doesn’t do anything special, just prints the binary for the port. 0’s
and 1’s indicate low and high signals on the pins. It’s a bit cryptic
right now, but it’s just a start.

- Added a max step rate check when writing step/mm and max rate
settings. Should help avoid people misdiagnosing problems associated
with going over the 30kHz step rate limit. Right now not enabled. Takes
up over 100k of flash. Need that room for other things right now.
This commit is contained in:
Sonny Jeon 2015-02-06 20:02:34 -07:00
parent a358c6de0b
commit 23c1e154aa
4 changed files with 29 additions and 2 deletions

View file

@ -200,8 +200,14 @@ uint8_t settings_store_global_setting(uint8_t parameter, float value) {
if (parameter < N_AXIS) {
// Valid axis setting found.
switch (set_idx) {
case 0: settings.steps_per_mm[parameter] = value; break;
case 1: settings.max_rate[parameter] = value; break;
case 0:
// if (value*settings.max_rate[parameter] > (MAX_STEP_RATE_HZ*60.0)) { return(STATUS_MAX_STEP_RATE_EXCEEDED); }
settings.steps_per_mm[parameter] = value;
break;
case 1:
// if (value*settings.steps_per_mm[parameter] > (MAX_STEP_RATE_HZ*60.0)) { return(STATUS_MAX_STEP_RATE_EXCEEDED); }
settings.max_rate[parameter] = value;
break;
case 2: settings.acceleration[parameter] = value*60*60; break; // Convert to mm/min^2 for grbl internal use.
case 3: settings.max_travel[parameter] = -value; break; // Store as negative for grbl internal use.
}