gcode_process.c: join M250 and a stray message into M114.

Also, F is unsigned.
This commit is contained in:
Markus Hitter 2012-09-02 20:15:03 +02:00
parent d169a1fa3e
commit 47337f1213
1 changed files with 21 additions and 21 deletions

View File

@ -334,10 +334,6 @@ void process_gcode_command() {
// newline is sent from gcode_parse after we return // newline is sent from gcode_parse after we return
return; return;
} }
#ifdef DEBUG
if (DEBUG_POSITION && (debug_flags & DEBUG_POSITION))
print_queue();
#endif
} }
else if (next_target.seen_M) { else if (next_target.seen_M) {
uint8_t i; uint8_t i;
@ -574,7 +570,27 @@ void process_gcode_command() {
queue_wait(); queue_wait();
#endif #endif
update_current_position(); update_current_position();
sersendf_P(PSTR("X:%lq,Y:%lq,Z:%lq,E:%lq,F:%ld"), current_position.X, current_position.Y, current_position.Z, current_position.E, current_position.F); sersendf_P(PSTR("X:%lq,Y:%lq,Z:%lq,E:%lq,F:%lu"),
current_position.X, current_position.Y,
current_position.Z, current_position.E,
current_position.F);
#ifdef DEBUG
if (DEBUG_POSITION && (debug_flags & DEBUG_POSITION)) {
sersendf_P(PSTR(",c:%lu}\nEndpoint: X:%ld,Y:%ld,Z:%ld,E:%ld,F:%lu,c:%lu}"),
movebuffer[mb_tail].c, movebuffer[mb_tail].endpoint.X,
movebuffer[mb_tail].endpoint.Y, movebuffer[mb_tail].endpoint.Z,
movebuffer[mb_tail].endpoint.E, movebuffer[mb_tail].endpoint.F,
#ifdef ACCELERATION_REPRAP
movebuffer[mb_tail].end_c
#else
movebuffer[mb_tail].c
#endif
);
print_queue();
}
#endif /* DEBUG */
// newline is sent from gcode_parse after we return // newline is sent from gcode_parse after we return
break; break;
@ -750,22 +766,6 @@ void process_gcode_command() {
// newline is sent from gcode_parse after we return // newline is sent from gcode_parse after we return
break; break;
case 250:
//? --- M250: return current position, end position, queue ---
//? Undocumented
//? This command is only available in DEBUG builds.
update_current_position();
sersendf_P(PSTR("{X:%ld,Y:%ld,Z:%ld,E:%ld,F:%lu,c:%lu}\t{X:%ld,Y:%ld,Z:%ld,E:%ld,F:%lu,c:%lu}\t"), current_position.X, current_position.Y, current_position.Z, current_position.E, current_position.F, movebuffer[mb_tail].c, movebuffer[mb_tail].endpoint.X, movebuffer[mb_tail].endpoint.Y, movebuffer[mb_tail].endpoint.Z, movebuffer[mb_tail].endpoint.E, movebuffer[mb_tail].endpoint.F,
#ifdef ACCELERATION_REPRAP
movebuffer[mb_tail].end_c
#else
movebuffer[mb_tail].c
#endif
);
print_queue();
break;
#endif /* DEBUG */ #endif /* DEBUG */
// unknown mcode: spit an error // unknown mcode: spit an error