Commit Graph

13 Commits

Author SHA1 Message Date
Alex Voinea
05bd1ba57f Multi-segment pause resume initial 2022-08-24 20:19:26 +03:00
Yuri D'Elia
5965572e88 Enforce full-loop handling of aborted commands
After calling planner_abort_hard() no motion command can be
scheduled until we return to the main loop since the call can
potentially be scheduled inside a nested process_command call.

Despite previous fixes, bugs keep creeping in due to nested calls not
being obvious to detect at all.

Stop allowing motion _completely_ for the entire processing loop by
default. That is, instead of aborting the current plan_buffer_line call,
abort the entire command until we can actually schedule motion safely
again.

This benefits handling of pretty much all g/m-codes, since this flag
(now "planner_aborted" for clarity) becomes a general "command aborted"
call.

This also now ensures that the flag prevents _any_ new block (including
blocks partially planned while servicing an interrupt) are scheduled
after planner_abort_hard is called.

There are only two exceptions where it's safe to resume in this context:

- Within uvlo_, where we never return to the main processing loop
- When we're intentionally scheduling a new process_command loop for a
  MK3 filament recheck (which is *bad*)

Handle those two cases as exceptions.
2022-07-25 17:30:22 +02:00
Alex Voinea
0b23ccdee9 Abort arc on planner hard stop 2022-04-29 20:38:48 +02:00
FormerLurker
bb33c76d2b Fix and simplify M214 data types and default config initialization. 2022-04-28 14:36:51 +02:00
FormerLurker
02b0307307 Code Cleanup 2022-04-28 14:36:51 +02:00
FormerLurker
623c029bfa Code cleanup to reduce program storage 2022-04-28 14:36:51 +02:00
FormerLurker
3880777691 Fix invalid bool compare. 2022-04-28 14:36:51 +02:00
FormerLurker
6fc8155cbe Add n_arc_correction and enhanced small angle sin/cos approximation. 2022-04-28 14:36:51 +02:00
FormerLurker
58d9916d54 Make suggested corrections. 2022-04-28 14:36:51 +02:00
FormerLurker
4aa5a75301 Enhance arc interpolation and add M214 for controlling arc interpolation settings. 2022-04-28 14:36:51 +02:00
Guðni Már Gilbert
eb9c8c8c20 Improve mc_arc() parameters
- Make the mc_arc() function declaration consistent with the definition
- isclockwise is supposed to be bool type, given how it is used.
2021-07-20 09:03:50 +02:00
michalprusa
a4a80b3eb7 MK2 Firmware release. 2016-05-31 14:08:04 +02:00
Josef Prusa
f8c65e39ae Reorginized the repository and added license 2016-02-21 15:02:31 +01:00