* M114: Get Current Position * * Report the current tool position to the host. * Since steppers are moving, the count positions are * projected by using planner calculations. * * With M114_DETAIL: * D - Report detailed information * E - Report E stepper position * * With M114_REALTIME: * R - Report real position information */
| 129 | * R - Report real position information |
| 130 | */ |
| 131 | void GcodeSuite::M114() { |
| 132 | |
| 133 | #if ENABLED(M114_DETAIL) |
| 134 | if (parser.seen_test('D')) { |
| 135 | IF_DISABLED(M114_LEGACY, planner.synchronize()); |
| 136 | report_current_position(); |
| 137 | report_current_position_detail(); |
| 138 | return; |
| 139 | } |
| 140 | #if HAS_EXTRUDERS |
| 141 | if (parser.seen_test('E')) { |
| 142 | SERIAL_ECHOLNPGM("Count E:", stepper.position(E_AXIS)); |
| 143 | return; |
| 144 | } |
| 145 | #endif |
| 146 | #endif |
| 147 | |
| 148 | TERN_(M114_REALTIME, if (parser.seen_test('R')) return report_real_position()); |
| 149 | |
| 150 | TERN_(M114_LEGACY, planner.synchronize()); |
| 151 | report_current_position_projected(); |
| 152 | |
| 153 | TERN_(FULL_REPORT_TO_HOST_FEATURE, report_current_grblstate_moving()); |
| 154 | } |
nothing calls this directly
no test coverage detected