Minor updates to line number feature.

- Changed line number integer types from unsigned to signed int32.
G-code mandates values cannot exceed 99999. Negative values can be used
to indicate certain modes.

- Homing cycle line number changed to -1, as an indicator.

- Fixed a reporting define for the spindle states that was broken by
the last merge.
This commit is contained in:
Sonny Jeon
2014-02-19 07:48:09 -07:00
parent 9c95c1439f
commit 1fd45791a5
8 changed files with 72 additions and 70 deletions

View File

@ -262,9 +262,9 @@ void report_gcode_modes()
}
switch (gc.spindle_direction) {
case 1 : printPgmString(PSTR(" M3")); break;
case -1 : printPgmString(PSTR(" M4")); break;
case 0 : printPgmString(PSTR(" M5")); break;
case SPINDLE_ENABLE_CW : printPgmString(PSTR(" M3")); break;
case SPINDLE_ENABLE_CCW : printPgmString(PSTR(" M4")); break;
case SPINDLE_DISABLE : printPgmString(PSTR(" M5")); break;
}
switch (gc.coolant_mode) {
@ -353,9 +353,8 @@ void report_realtime_status()
#ifdef USE_LINE_NUMBERS
// Report current line number
printPgmString(PSTR(","));
printPgmString(PSTR("Ln:"));
uint32_t ln=0;
printPgmString(PSTR(",Ln:"));
int32_t ln=0;
plan_block_t * pb = plan_get_current_block();
if(pb != NULL) {
ln = pb->line_number;