Commit Graph

11 Commits

Author SHA1 Message Date
Anjandev Momi
1123c0f072 Change license to AGPL-3.0-only 2022-03-15 08:00:00 -04:00
Peter John Hartman
0c55b68209 remove unused FLASH_LED.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-02-02 19:05:42 +01:00
Stacy Harper
ad06db432b Refact: leds usage
- Use one single sxmo_led.sh script

$ sxmo_led.sh blink red
$ sxmo_led.sh blink red blue

$ sxmo_led.sh set red 100
$ sxmo_led.sh set red 100 blue 0 green 100

This script got a simple mutex check to behave consistently while
spamed.

Blinking leds now return to initial state. Make it more easy to use
with long running leds. Plus it also solve the issue of invisible
blinking led if the color already is used.

- Free leds of sxmo lock state

The goal here is to not rely on long running leds for screen lock state.

The typical use case is when the user want to lock the screen while
playing a video. Having a blue led in the eyes really is annoying in
this kind of cases.

Another issue is when the phone is in crust, then the mixup of green
+ red give a not simple yellow. Or when we make a color to blink above
already used leds.

As sxmo now rely on an idle daemon that slowly move it to crust, having
long running leds isnt that mandatory now.

It will also make it more easy for other script to notice the user. By
example, we dont have that much merged leds now.

To avoid this, we would rely more on blinkind leds:

Move to unlock: blinking yellow
Move to lock: blinking blue
Move to off: blinking purple (blink periodically purple while in off)
Move to crust: blinking red

Additionnaly, I added a  icon in the status bar to make it more
explicit if the phone stay locked for a while

- Drop rtcwake that conflict with blinking led and are pretty useless

Signed-off-by: Stacy Harper <contact@stacyharper.net>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2022-01-15 11:30:44 +01:00
Clayton Craft
9b4d608626 core/setled: change param to percentage of max brightness
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-01-02 14:47:37 +01:00
Clayton Craft
707b82bef9 core: allow specifying flash LED path in device profile
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2022-01-02 14:44:01 +01:00
Zach DeCook
6274f1f222 shebangs: change to /bin/sh
Any sane linux system will have a posix compliant shell at /bin/sh
This change will allow us to better detect running scripts using pgrep.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2021-12-20 14:29:25 +01:00
Maxim Karasev
1e20a2223b Rename sxmo_setpineled.sh to sxmo_setled.sh, add bq-paella support
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-08-31 16:52:30 +02:00
Nihal Jere
ce3f2ea319 replace setpineled C program with a shell script
Signed-off-by: Stacy Harper <contact@stacyharper.net>
2021-08-11 22:27:28 +02:00
Maarten van Gompel
7fb7cd70f3 various indentation fixes (spaces to tabs and stripping trailing whitespace) 2020-11-20 18:10:17 +01:00
Miles Alan
049a93e5d8 Shellcheck and tabindent all scripts 2020-06-13 20:36:13 -05:00
Miles Alan
34b2c57038 Fixes related to cleaning up modem functionality; fix audio; add flash toggle 2020-05-17 18:59:47 -05:00