This adds a dedicated check for that case to be able to
find the root cause of a misconfiguration earlier.
Also, replace occurrences of hardcoded max tick count.
Signed-off-by: Pascal Pieper <accounts@pascalpieper.de>
This timing is also known as T1H in various datasheets. Increasing it
should improve compatibility with various revisions and clones of the
WS2812 LED.
The short version is that 800 is the timing used by Adafruit's popular
NeoPixel Arduino library, and it has no problem driving my BTT RGBW kit
LEDs, while Klipper cannot drive them properly without this patch. The
real upper limit to this value is something like 5000ns so increasing
it should not cause new compatibility problems for LEDs that currently
work.
Signed-off-by: Alistair Buxton <a.j.buxton@gmail.com>
A "dummy extruder" that is created when no "[extruder]" config section
is defined does not have a "name". Avoid reporting that empty name in
the `{printer.toolhead.extra_axes}" status report.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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>