And here's **v14** of the RG40XX H/V LED scripts (containing code by <@805036455646724117>, <@493631241757917184>, and <@726190262132408333>).
This version adapts **LED brightness** to **screen brightness** with `led.brightness` corresponding to **100% screen brightness**.
**Fixed:** LEDs now work again when plugged to HDMI.
To install it
* drop contents of the zip file in the `system` subfolder of your userdata/share folder
* SSH into the device (I recommmend SmarTTY or PuTTY, alternatively you can use use WinSCP console, see wiki for details on SSH:
https://knulli.org/configure/ssh/)
* make the installer executable by typing: `chmod +x /userdata/system/ledservice_installer.sh`
* run installer by typing `/userdata/system/ledservice_installer.sh`
* device will reboot automatically, LEDs will be turned **on** after reboot with **default settings** (or your own if you already have some!!)
* LED service can be disabled via *System Settings* -> *Services* -> *Analog_Stick_LED*
Customize in `batocera.conf` like so:
```
led.mode=1
led.brightness=100
led.speed=15
led.colour=148 255 0
```
Allowed modes are 0-6 (**off**, solid, fast breathe, medium breathe, slow breathe, rainbow, rainbow swirl), allowed min/max values for everything else are 0/1-255. By default, `led.colour` applies to **both** sticks (RG40XX H). You can **optionally** use `led.colour.right` to override the color of the **right** stick.
Changes will be applied **automatically** once you save `batocera.conf` while the service is running.
* While **battery charges** the stick breathes green
* When **battery charge** reaches **20%-6%**, the sticks breathes yellow
* When **battery charge** reaches **5%** or less, the sticks breathes red
* When **battery charge** is above **20%**, the sticks turn back to whatever is customized in `batocera.conf`
Need to downgrade? Previous version (v13) was this:
https://discord.com/channels/1173228527 ... 8945216533