diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-07-21 12:48:23 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-08-22 11:10:19 -0400 |
commit | 2fdd8a420d6e313d6261642c0505126869d017d2 (patch) | |
tree | cc362f0640faa0e06da7e955a1656712d1950549 /docs | |
parent | cf2e941aec5bbe1c992fcfde6bd91db2389e7e94 (diff) | |
download | kutter-2fdd8a420d6e313d6261642c0505126869d017d2.tar.gz kutter-2fdd8a420d6e313d6261642c0505126869d017d2.tar.xz kutter-2fdd8a420d6e313d6261642c0505126869d017d2.zip |
motion_report: Add support for dumping steps/trapq via API server
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/API_Server.md | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/docs/API_Server.md b/docs/API_Server.md index b8419a8d..77470137 100644 --- a/docs/API_Server.md +++ b/docs/API_Server.md @@ -278,6 +278,49 @@ window" interface. Parsing content from the G-Code terminal output is discouraged. Use the "objects/subscribe" endpoint to obtain updates on Klipper's state. +### motion_report/dump_stepper + +This endpoint is used to subscribe to Klipper's internal stepper +queue_step command stream for a stepper. Obtaining these low-level +motion updates may be useful for diagnostic and debugging +purposes. Using this endpoint may increase Klipper's system load. + +A request may look like: +`{"id": 123, "method":"motion_report/dump_stepper", +"params": {"name": "stepper_x", "response_template": {}}}` +and might return: +`{"id": 123, "result": {"header": ["interval", "count", "add"]}}` +and might later produce asynchronous messages such as: +`{"params": {"first_clock": 179601081, "first_time": 8.98, +"first_position": 0, "last_clock": 219686097, "last_time": 10.984, +"data": [[179601081, 1, 0], [29573, 2, -8685], [16230, 4, -1525], +[10559, 6, -160], [10000, 976, 0], [10000, 1000, 0], [10000, 1000, 0], +[10000, 1000, 0], [9855, 5, 187], [11632, 4, 1534], [20756, 2, 9442]]}}` + +The "header" field in the initial query response is used to describe +the fields found in later "data" responses. + +### motion_report/dump_trapq + +This endpoint is used to subscribe to Klipper's internal "trapezoid +motion queue". Obtaining these low-level motion updates may be useful +for diagnostic and debugging purposes. Using this endpoint may +increase Klipper's system load. + +A request may look like: +`{"id": 123, "method": "motion_report/dump_trapq", "params": +{"name": "toolhead", "response_template":{}}}` +and might return: +`{"id": 1, "result": {"header": ["time", "duration", +"start_velocity", "acceleration", "start_position", "direction"]}}` +and might later produce asynchronous messages such as: +`{"params": {"data": [[4.05, 1.0, 0.0, 0.0, [300.0, 0.0, 0.0], +[0.0, 0.0, 0.0]], [5.054, 0.001, 0.0, 3000.0, [300.0, 0.0, 0.0], +[-1.0, 0.0, 0.0]]]}}` + +The "header" field in the initial query response is used to describe +the fields found in later "data" responses. + ### pause_resume/cancel This endpoint is similar to running the "PRINT_CANCEL" G-Code command. |