use sersendf_P for M114
This commit is contained in:
parent
256ecdca39
commit
0f895b44b1
15
gcode.c
15
gcode.c
|
|
@ -13,6 +13,7 @@
|
||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "heater.h"
|
#include "heater.h"
|
||||||
|
#include "sersendf.h"
|
||||||
|
|
||||||
uint8_t last_field = 0;
|
uint8_t last_field = 0;
|
||||||
|
|
||||||
|
|
@ -249,13 +250,11 @@ void scan_char(uint8_t c) {
|
||||||
break;
|
break;
|
||||||
case '*':
|
case '*':
|
||||||
next_target.seen_checksum = 1;
|
next_target.seen_checksum = 1;
|
||||||
// option_bitfield |= OPTION_CHECKSUM;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// comments
|
// comments
|
||||||
case ';':
|
case ';':
|
||||||
next_target.seen_semi_comment = 1;
|
next_target.seen_semi_comment = 1;
|
||||||
// option_bitfield |= OPTION_COMMENT;
|
|
||||||
break;
|
break;
|
||||||
case '(':
|
case '(':
|
||||||
next_target.seen_parens_comment = 1;
|
next_target.seen_parens_comment = 1;
|
||||||
|
|
@ -614,17 +613,7 @@ void process_gcode_command(GCODE_COMMAND *gcmd) {
|
||||||
// M113- extruder PWM
|
// M113- extruder PWM
|
||||||
// M114- report XYZEF to host
|
// M114- report XYZEF to host
|
||||||
case 114:
|
case 114:
|
||||||
serial_writestr_P(PSTR("X:"));
|
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);
|
||||||
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');
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// M130- heater P factor
|
// M130- heater P factor
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue