[Nut-upsdev] [PATCH/RFC 1/1] APC smart driver update and new features.

rasengan rootish root at relay.ppgk.com.pl
Wed Jan 26 09:31:52 UTC 2011


25.01.2011 16:57, Arjen de Korte:
>
> Most of the patches are good to go, with the exception of the 'minbatt'
> and 'mintime'. These are generic functions that I would prefer to see
> included in the main driver core, rather than in each driver individually.
>
> We already support adding missing constants (default.battery.charge.low)
> or overriding wrong ones (override.battery.charge.low) in 'ups.conf'.
> The only thing that is missing now in the driver core are the checks
>
> battery.charge < battery.charge.low
> battery.runtime < battery.runtime.low
>
> Adding the above is trivial and would then be usable for all drivers.
> Therefor I don't think it is a good idea to do this here.
>
> Best regards, Arjen

So basically what you have in mind is putting such checks in main.c's 
loop somewhere after upsdrv_updateinfo() call, and then updating 
ups.status ?

That would also warrant adding options enabling such functionality 
(separately for charge and runtime), as not everyone might want it.

I'll redo the patches with the new approach.



More information about the Nut-upsdev mailing list