I'm configuring an old Galaxy Fame to serve as sat navigator fixed on my car dashboard, aiming at using the always-up-to-date and free OpenStreetMap.
When I turn the key, the phone's usb is powered at 5V, when I turn off the car, the usb has no power. The phone is able to detect these events and I scripted some actions upon them, aiming at providing an instant-on and instant-off navigator service.
The phone remains always on, just switches to a power-save status when the car is off. The navigator app OsmAnd starts automatically at boot, but boot does not occur between a car-on / car-off cycle, because the phone remains on to detect the mentioned usb changes.
Currently, what happens when I start the car and the usb gets powered:
What happens when I turn off the car and usb loses power:
Up to this point everything is working. My problem now is that, when the car goes off and the phone enters this quasi-standby mode, the touchscreen still accepts input and, if the phone is handled or touched for whatever reason, it will stealthily react to those commands while the screen is unlit.
So I'm looking for a practical way to disable and re-enable the touchscreen and possibly some or all the physical buttons via the command line. Maybe I can unmount some kernel module?
When I turn the key, the phone's usb is powered at 5V, when I turn off the car, the usb has no power. The phone is able to detect these events and I scripted some actions upon them, aiming at providing an instant-on and instant-off navigator service.
The phone remains always on, just switches to a power-save status when the car is off. The navigator app OsmAnd starts automatically at boot, but boot does not occur between a car-on / car-off cycle, because the phone remains on to detect the mentioned usb changes.
Currently, what happens when I start the car and the usb gets powered:
- Display is lit (echo 200 >/sys/class/backlight/panel/brightness)
- Sat receiver is activated
- Cpu frequency set to max
What happens when I turn off the car and usb loses power:
- Display's backlight off
- Sat receiver goes off, along with wify and bluetooth, in case they might have been active
- Cpu frequency set to minimum
Up to this point everything is working. My problem now is that, when the car goes off and the phone enters this quasi-standby mode, the touchscreen still accepts input and, if the phone is handled or touched for whatever reason, it will stealthily react to those commands while the screen is unlit.
So I'm looking for a practical way to disable and re-enable the touchscreen and possibly some or all the physical buttons via the command line. Maybe I can unmount some kernel module?
Aucun commentaire:
Enregistrer un commentaire