Citeren Alexander Gordeev <[email protected]>:

The reason is documented in the last few paragraphs of
docs/new-drivers.txt. The delays are there for a good reason and
removing them is just not an option.
Thanks for the note!
Maybe we can move usleep to serial.*?

Two reasons why this is a bad idea:

1) If adding a usleep() call after sending some characters is needed/allowed, depends on the UPS hardware. The 300ms is an example only, so this isn't a fixed time.

2) It would require changes to many existing drivers.

I think at the moment, merging the megatec.c and megatec_usb.c code into a new megatec_usb.c driver is the best way to deal with this. This keeps the changes limited to just one driver (with an active maintainer) instead of having to change dozens of them (many of which don't have one).

Since Carlos no longer maintains the megatec driver and the future is blazer_*, you don't have to expect many changes to it anymore. It won't make a difference to compile time either, since the megatec and megatec_usb drivers use different compiler flags anyway. Last but not least, it would also allow you to integrate the USB stuff easier, since you don't have to jump through the hoops of the ser_* functions anymore and can leave out the stuff that isn't used.

Best regards, Arjen
--
Please keep list traffic on the list


_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev

Reply via email to