From 3e32a8f634cb5f5c2ea8e69130d716acfcd82665 Mon Sep 17 00:00:00 2001 From: Michael Moon Date: Sun, 1 May 2011 17:17:56 +1000 Subject: [PATCH] allow M114 to report negative positions correctly --- gcode_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcode_process.c b/gcode_process.c index 45cb5dd..098a978 100644 --- a/gcode_process.c +++ b/gcode_process.c @@ -393,7 +393,7 @@ void process_gcode_command() { // M113- extruder PWM // M114- report XYZEF to host case 114: - sersendf_P(PSTR("X:%lq,Y:%lq,Z:%lq,E:%lq,F:%ld"), current_position.X * UM_PER_STEP_X, current_position.Y * UM_PER_STEP_Y, current_position.Z * UM_PER_STEP_Z, current_position.E * UM_PER_STEP_E, current_position.F); + sersendf_P(PSTR("X:%lq,Y:%lq,Z:%lq,E:%lq,F:%ld"), current_position.X * ((int32_t) UM_PER_STEP_X), current_position.Y * ((int32_t) UM_PER_STEP_Y), current_position.Z * ((int32_t) UM_PER_STEP_Z), current_position.E * ((int32_t) UM_PER_STEP_E), current_position.F); // newline is sent from gcode_parse after we return break; // M115- capabilities string