[Nut-upsdev] about nut revision 1289

Alexander Gordeev lasaine at lvk.cs.msu.su
Wed Jun 17 23:43:27 UTC 2009

Hi Arjen,

Sorry for the delay,,,

On Tuesday 09 June 2009 00:43:29 Arjen de Korte wrote:
> Citeren Alexander Gordeev <lasaine at 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.

Well, prettifying strace ouput is good but AFAIK not necessary for the driver 
to work. So I'd actually prefer to sacrifice it but not rewrite the whole 
driver which we will throw away some time. Are there any other reasons to 
keep the delays?


More information about the Nut-upsdev mailing list