STM32F401 has USART6 on PA12/PA11 and PC7/PC6 with alternate
function mapping AF08. This can be used, for example, to connect
to the Elegoo Neptune 3, where PA12/PA11 are wired to an RJ10 plug
going to the stock screen.
Signed-off-by: Marius Petcu <marius@petcu.me>
The Linux kernel reports a canbus message as transmitted when it gets
the echo frame back. Processing the message prior to sending the echo
frame can lead to odd looking debugging logs (as the response messages
may appear to predate the request messages). This doesn't impact the
Klipper code, but it does make analyzing logs harder. Fix by sending
the echo frame prior to processing the frame.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Don't limit the canbus_notify_tx() wakeup to cases where notify_local
is set - perform the wakeup whenever the host_status field indicates
the main task has work pending.
This fixes a small race condition where the main task could block
sending a usb echo frame, and the canbus_send() code gets called as
the usb bandwidth becomes available but before a usb wakeup
notification is sent. In that situation, the usb code may not issue a
wake event and the echo frames may be delayed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
With the introduction of "scanning" probes it has
become common for configurations to generate a large
number of points. This can overwhelm both the log and
the pty when new points are generated.
This patch limits the initial points logged to 50. In
addition points are no longer logged or pushed over
the pty when the mesh configuration changes.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
It seems the Linux kernel will consider a maximum size usb packet to
be a transaction that will continue into the next usb packet. It will
thus hold on to the traffic from the first packet until it gets the
next packet. However, if the mcu has no further data to send after
the first packet then the data could get delayed for an extended
period of time.
To avoid this, check for transmissions that could end on a maximum
sized packet and send that data in two packets instead. This avoids
this unusual corner case.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Move the definition of the usb endpoint sizes from usb_cdc.h to
usb_cdc_ep.h . This allows individual boards to override the default
endpoint sizes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Addition to the board_defs file for the BTT Octopus Max EZ, written and confirmed by discord user Nikki @winningfaith81
Signed-off-by: James Hartley <james@hartleyns.com>
The python-can v3.3.4 package requires setuptools to be an explicit
dependency when run on python v3.12, but there is no single version of
setuptools that runs on all supported versions of python. So, tie
setuptools to python versions 3.12 or later.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
It appears there was a security vulnerability in Jinja v3.1.4 . The
Klipper docs are not impacted by this vulnerability, but it's simple
enough to increment the version to avoid warnings.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
If the low-level canbus stops working then it could become impossible
to send messages to and from the canbus bridge node itself. This can
make it difficult to diagnose canbus problems.
Change the canbus bridge code to detect if message transmits become
stalled for 50+ milliseconds and go into a "discarding" state. In
this discarding state, messages destined for the canbus will be
discarded until the canbus becomes active again. In this discarding
state it will therefore be possible to transmit messages to and from
the canbus bridge node.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add support for a new get_canbus_status command to canserial.c .
Add new canbus_stats.py module that will periodically query canbus
mcus for connection status information.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>