drivers/tripplitesu.c: add 1s delay in command_send#3273
drivers/tripplitesu.c: add 1s delay in command_send#3273jimklimov merged 3 commits intonetworkupstools:masterfrom
Conversation
|
Thanks, the proposal looks reasonable. Hard to say if the problem is "universal", given that this is a driver aimed at certain models of UPSes by one vendor, so there are just so many devices impacted by any change here in any case. I usually lean in favour of toggles, probably as a numeric value for that |
|
First of all, I apologize for the radio silence! I’ve been a bit buried lately preparing for a university exam and managing a house move at the same time. In the meantime, I’ve done some further testing and found a couple of interesting things:
|
Intermittent communication timeouts were observed when multiple commands were sent in rapid succession. Adding a 1-second delay at the beginning of command_send() ensures the hardware buffer is ready and prevents the "read timeout" errors. Signed-off-by: TomZanna <git@tomzanna.com>
|
✅ Build nut 2.8.4.4133-master completed (commit 5fd7704d70 by @jimklimov) |
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Important
This PR is currently a draft. I am looking for feedback on the best implementation strategy (see below).
Intermittent communication timeouts were observed when multiple commands were sent in rapid succession. Specifically, when running the driver manually with maximum debug verbosity, a timeout occurs consistently at the second
AVLmessage within theinit_commfunction.Adding a 1-second delay at the beginning of
do_command()ensures the hardware buffer is ready and prevents these "read timeout" errors.Should we consider making this a configurable parameter in ups.conf (e.g., command_delay)? I'd appreciate the maintainers' insight on whether this hardware quirk is universal enough to justify a global delay for this driver.