Skip to content

Edge: axis names in text mode position reports (contains patch) #489

@prof7bit

Description

@prof7bit

To whom it may concern,

I have fixed the broken position reporting when in text mode. This has been forgotten when the additional axes were added. Below is a diff against the edge branch:

diff --git a/g2core/canonical_machine.cpp b/g2core/canonical_machine.cpp
index ab26d1b8..c2db78c3 100644
--- a/g2core/canonical_machine.cpp
+++ b/g2core/canonical_machine.cpp
@@ -2525,7 +2525,7 @@ static void _print_axis_coord_flt(nvObj_t *nv, const char *format)
 
 static void _print_pos(nvObj_t *nv, const char *format, uint8_t units)
 {
-    char axes[] = {"XYZABC"};
+    char axes[] = {"XYZUVWABC"};
     uint8_t axis = _axis(nv);
     if (axis >= AXIS_A) { units = DEGREES;}
     sprintf(cs.out_buf, format, axes[axis], nv->value_flt, GET_TEXT_ITEM(msg_units, units));
@@ -2534,7 +2534,7 @@ static void _print_pos(nvObj_t *nv, const char *format, uint8_t units)
 
 static void _print_hom(nvObj_t *nv, const char *format)
 {
-    char axes[] = {"XYZABC"};
+    char axes[] = {"XYZUVWABC"};
     uint8_t axis = _axis(nv);
     sprintf(cs.out_buf, format, axes[axis], nv->value_int);
     xio_writeline(cs.out_buf);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions