From 0f895b44b1df4efd7d9cb66795266e06951c6e5b Mon Sep 17 00:00:00 2001 From: Michael Moon Date: Thu, 16 Sep 2010 22:08:56 +1000 Subject: [PATCH] use sersendf_P for M114 --- gcode.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/gcode.c b/gcode.c index c396ffb..7e3b4ea 100644 --- a/gcode.c +++ b/gcode.c @@ -13,6 +13,7 @@ #include "watchdog.h" #include "debug.h" #include "heater.h" +#include "sersendf.h" uint8_t last_field = 0; @@ -249,13 +250,11 @@ void scan_char(uint8_t c) { break; case '*': next_target.seen_checksum = 1; -// option_bitfield |= OPTION_CHECKSUM; break; // comments case ';': next_target.seen_semi_comment = 1; -// option_bitfield |= OPTION_COMMENT; break; case '(': next_target.seen_parens_comment = 1; @@ -614,17 +613,7 @@ void process_gcode_command(GCODE_COMMAND *gcmd) { // M113- extruder PWM // M114- report XYZEF to host case 114: - serial_writestr_P(PSTR("X:")); - serwrite_int32(current_position.X); - serial_writestr_P(PSTR(",Y:")); - serwrite_int32(current_position.Y); - serial_writestr_P(PSTR(",Z:")); - serwrite_int32(current_position.Z); - serial_writestr_P(PSTR(",E:")); - serwrite_int32(current_position.E); - serial_writestr_P(PSTR(",F:")); - serwrite_int32(current_position.F); - serial_writechar('\n'); + sersendf_P("X:%ld,Y:%ld,Z:%ld,E:%ld,F:%ld\n", current_position.X, current_position.Y, current_position.Z, current_position.E, current_position.F); break; // M130- heater P factor