This reverts commit aea8d8e0a1.
This reverts commit 493271697f.
This reverts commit d7da45e152.
There are reports of a regression since making this change. Revert
for now until the root cause can be found.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support extracting moves from both the "live" trapq->moves as well as
the "history" from trapq->history storage. Now that moves are flushed
separately from the lookahead queue, there is a good chance that the
current move being processed on the mcus will still be in the active
trapq list.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit b60804bb changed the trapq head sentinel to store
print_time=-1. However, it failed to update trapq_add_move() that
relied on that value to detect the head sentinel. As a result,
numerical stability issues could lead to stepcompress errors.
Fix by changing trapq_add_move() to detect the head sentinel even with
a negative print_time.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit a89694ac changed the code to run itersolve_generate_steps()
from multiple threads simultaneously. However,
trapq_check_sentinels() can modify the shared trapq object. So,
calling it from multiple threads could introduce a race condition.
Move the call to trapq_check_sentinels() to steppersyncmgr_gen_steps()
to avoid the issue.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Implement step generation from 'struct syncemitter' instead of in the
stepcompress code. This simplifies the stepcompress code and
simplifies the overall interface.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move msg_queue allocation from stepcompress to syncemitter. With this
change the pwm_tool module does not need to allocate a stepcompress
object.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Create a new 'struct syncemitter' for each object that can generate
messages for a 'struct steppersync' and store in a regular linked
list.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a new C based mechanism for tracking all the 'struct steppersync'
instances. This simplifies memory management.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If a stepper kinematics has a "scan window" defined during its first
flush then the iterative solver may walk past the head sentinel. Set
a small negative print_time for the head sentinel to avoid this corner
case.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Remove the toolhead note_step_generation_scan_time() code and
automatically detect the itersolve scan windows that are in use.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support storing a reference to 'struct stepper_kinematics' in 'struct
stepcompress' and support globally generating steps via the
steppersync mechanism.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't implement history expiration from the main steppersync_flush()
code. Instead, have callers directly invoke
steppersync_history_expire().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* tests: Added a regression test for generic_cartesian kinematics
* kinematics: An intial implementation of generic_cartesian kinematics
* generic_cartesian: Refactored kinematics configuration API
* generic_cartesian: Use stepper instead of kinematic_stepper in configs
* generic_cartesian: Added SET_STEPPER_KINEMATICS command
* generic_cartesian: Fixed parsing of section names
* docs: Generic Caretsian kinematics documentation and config samples
* generic_cartesian: Implemented multi-mcu homing validation
* generic_cartesian: Fixed typos in docs, minor fixes
* generic_cartesian: Renamed `kinematics` option to `carriages`
* generic_cartesian: Moved kinematic_stepper.py file
* idex_modes: Internal refactoring of handling dual carriages
* stepper: Refactored the code to not store a reference to config object
* config: Updated example-generic-cartesian config
* generic_cartesian: Restricted SET_STEPPER_CARRIAGES and exported status
* idex_modes: Fixed handling stepper kinematics with input shaper enabled
* config: Updated configs and tests for SET_DUAL_CARRIAGE new params
* generic_cartesian: Avoid inheritance in the added classes
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Klipper logs an error on a failed CANbus write. Unfortunately, if the
bus becomes permanently disabled (eg, due to a user removing power to
devices on the CANbus) then it can result in the logs filling with
error messages.
Permanently disable the low-level processing of messages if CANbus
writes continually fail for at least 10 seconds. This avoids filling
the log with redundant messages.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
COPY and MIRROR mode implementation
Correctly apply input shaper params to new dual_carriage
Added SAVE_/RESTORE_IDEX_STATE commands
Documentation updates for the new IDEX modes
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
If the stepper already executed some steps with the basic
stepper_kinematics, subsequent creation of a new one for input_shaper
would result in stepcompress errors unless position and time tracking
flags are also copied over.
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
The stalled_bytes counter refers to the number of bytes that are not
yet eligible for transmission. However, the naming leads to confusion
as it could be interpretted as an inability to transmit data. Rename
to upcoming_bytes to try to avoid that confusion.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>