You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
847 B
Plaintext

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
21.01.2009: added support for 2.6.28 kernel