Speaker LED – Vision (G2)

Update (11/27 (re-download and put in place)):
-go back to g_battery and g_notifications (local)
-set battery first in handle_speaker_light_locked condition
-set colorRGB to green only for notifications

……

Update (11/27 (re-download and put in place)):
-replace g_notification with g_notify
-don’t explictly set colorRGB to a value and get it from state->color
-make g_battery a proper pointer
-re-order condition (in handle_speaker_light_checked for notifications
to be first, then nest battery underneath
-add ‘state’ to function (handle_speaker_light_locked).

……

Update (re-download and put in place):
-set colorRGB to green only when there is a notification

……

This fixes Speaker LED Notifications on CM6.1 for Vision (G2).

Behavior:
If it is plugged in, the light will stay solid (charging).  If a notification comes in with the screen off, it will blink green.  If you turn on the screen, the charging light will come on.  If you don’t acknowledge the notification, when the screen turns off it will blink green again.

When it is not plugged in, notifications will blink green only when the screen is off.

Known Issues:
-low battery will blink green instead of amber.
-if you reboot while you are under 10%, low battery state won’t trigger the LED notification. The next notification you receive, it will be triggered.
-if you plug it in below 10% and unplug, the amber led will stay lit (solid) until it is over 10%. you will not receive any notifications to the LED until it is over 10% in this state.

——

Download:
lights.vision.so

——

How-To Install:
Method 1:
adb remount
adb push lights.vision.so /system/lib/hw/
adb shell chmod 644 /system/lib/hw/lights.vision.so
adb shell reboot

Method 2:
Open a terminal
cd /sdcard
wget http://droidbasement.com/g2/system/lights.vision.so
su
mount -o remount,rw /system
cp lights.vision.so /system/lib/hw/
chmod 644 /system/lib/hw/lights.vision.so
reboot

Source:
https://github.com/pershoot/vision-lights

Leave a Reply