Update the "position" status to include extra axes. Export a new
"extra_axes" value that describes the class associated with each
component of the coordinate.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Change "homing_origin" and "position" to support more than 4
components. Export a new "axis_map" value to describe the contents at
each component index.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Instead of passing arguments as parameters, pass them as a list (or
tuple). This simplifies the callers and makes it easier to pass
additional parameters.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Keep moving messages from the pending queues to the ready queues even
if it's not currently valid to transmit messages to the mcu. This
improves the statistics when debugging.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Only hold the lock in the serialqueue thread when moving messages to
the ready queue and when setting the next need_kick_clock.
Only set the need_kick_clock just prior to sleeping.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Maintain the next needed wakeup time for entries in the pending
queues. This avoids needing to walk the upcoming queues when it is
known that nothing is ready to be released.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
There's no reason to attempt to handle multiple buffer transmissions
in a single command_event() call. Handle the transmit case outside of
the command building loop.
If data is transmitted, then get a new timestamp from the pollreactor
and retry before sleeping.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Simply describe how the cmdqueue is moved between states.
This is commit d7da45e1 resubmitted with a slighly different
implementation. It is thought that the previous implementation was
causing a gcc compiliation issue on gcc v12.0-v12.4 compilers. (It
may be related to gcc bug report 107467).
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit 3f7d05dd attempted to add support for transmitting RTR and EFF
frames to stm32/can.c , but the change was incomplete.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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>
This is the only user of the i2c_write inside the init
compatibility layer, so remove it as well.
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Update functions could be called within the flush/lookahead context
If the update function internally does pause()
That would lead to the unpredictable execution of time-critical functions
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
It is not valid to pause in the klippy:ready callback, so perform the
sensor startup process in a separate reactor task.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Determine which mcu raised the shutdown from the shutdown details
report. Also, pass shutdown_clock via that details report.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move reactor debugging info from main klippy.py code to error_mcu code
for improved exception handling.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rename the event to make it a little more clear what it is intended
for. Also, check for an exception in each event handler.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Step timing is reset when stepper.set_position() is called. Detect
that case and ensure future steps after set_position start on a new
block. This simplifies the timing for users of the data.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Now that trapq_extract_old() can return upcoming moves, it's possible
for homing to cause confusing results (as these moves can end early).
Avoid this by delaying query responses until after homing completes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Batch reading of 8 samples (48 bytes) at a time from the sensor. This
reduces the number of transactions - which can notably improve
performance on i2c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>