[Olsr-dev] implementing auto-willingness based on battery info

Henning Rogge (spam-protected)
Fri May 11 08:06:53 CEST 2012


On 05/11/2012 05:15 AM, Hans-Christoph Steiner wrote:
>
> I noticed that apm.c olsrd/stable just contains function prototypes.  Has anyone tried implementing some sort of auto-willingness based on battery life and charge status?
>
> For the Linux kernel, it seems like it would be easy to implement.  You can get the data now via /sys:
>
> /sys/class/power_supply/battery/charging_enabled  (boolean)
> /sys/class/power_supply/battery/capacity  (percent)
>
> I could see something like starting with a default willingness, say 3.  Then having some simple rules:
>
> +1 connected to power/charging_enabled
> +1 battery above 90%
> -1 battery below 50%
> -1 battery below 40%
> -1 battery below 30%
> -1 battery below 20%
> -1 battery below 10%
>
> Then these rules would add.  Starting with a default willingness of 3, a device fully charged and connected to power would have a willingness of 5, with 45% battery would be 2, with 15% battery would be 0.

MPR generation in stable is broken... so I don't think there is a point 
in this. But we should keep this in mind if we get to the point fixing 
MPR caluculation.

A "power aware MPR calculation" would be a good thing.

Henning Rogge

-- 
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Neuenahrer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961,   Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de
GPG: E1C6 0914 490B 3909 D944 F80D 4487 C67C 55EC CFE0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6156 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120511/94f0626f/attachment.bin>


More information about the Olsr-dev mailing list