neo1973-germany/PyBat/trunk
Paulus a82f57c20b removed useless code
git-svn-id: http://www.neo1973-germany.de/svn@200 46df4e5c-bc4e-4628-a0fc-830ba316316d
2008-10-20 15:38:36 +00:00
..
PyBat.edc Initial import 2008-10-18 18:09:00 +00:00
PyBat.edj Initial import 2008-10-18 18:09:00 +00:00
PyBat.py removed useless code 2008-10-20 15:38:36 +00:00
README add README, small fixes in PyBat 2008-10-18 19:54:24 +00:00

PyBat is a tool to set usb in host or devices mode aund to set the charging speed.

If you want PyBat to start when usb is pluged in you have to add a rule to /etc/freesmartphone/oevents/rules.yaml.(your changes will be deleted after an upgrade!)

Example:

1. Creat file /usr/bin/pybat:
        #!/bin/sh
        export DISPLAY=:0
        python /directory/PyBat.py
        exit 0

2. add to /usr/etc/freesmartphone/oevents/rules.yaml (not working yes, so you have to add to /etc/freesmartphone/oevents/rules.yaml): 
        -
                trigger: InputEvent()
                filters:
                        - HasAttr(switch, "USB")
                        - HasAttr(event, "pressed")
                actions: Command('pybat')

TODO:
-change write to /sys/files to dbus, when available
-fix dbus