[Nut-upsdev] about nut revision 1289

Arjen de Korte nut+devel at de-korte.org
Mon Jun 8 20:43:29 UTC 2009


Citeren Alexander Gordeev <lasaine op lvk.cs.msu.su>:

>> 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




More information about the Nut-upsdev mailing list