Closed oscarkcau closed 2 months ago
cool! what does the sleep=120 specify? i assume that percent=20 means itll blink the red led at 20% battery
"sleep=120" means the while loop will sleep for 120 seconds before check the battery level again. i.e. the power LED would change its states every 2 min based on the current battery level.
"percent=20 means itll blink the red led at 20% battery" Yup! but only the blue LED (power LED) will blink, as I dont want to affect the charging indicator LED
If i'm at 20% battery the red led will blink every 2 minutes?
to be clear, this WILL NOT put the device to sleep correct?
This seems like a really cool addition and i am going to explore it fully and likely add it.
The effect of this script is to add a process to check the battery level every 120 seconds, and make the BLUE LED blinks like heartbeats when battery level is lower than 20%. After the battery is charged above 20+%, the BLUE LED will turn off again.
to be clear, this WILL NOT put the device to sleep correct? YES, it only blinks the BLUE LED when the battery is low, player can choose to ignore it or charge the device or turn the device off.
P.S. I said to add the code to the beginning of .tmp_update\runtime.sh, however the new code should be inserted at the SECOND row, below the FIRST shebang line (#!/bin/sh).
Also the original line for turning off the POWER LED should be removed too:
# remove the following line
echo 0 > /sys/devices/platform/sunxi-led/leds/led1/brightness
I add the whole updated file here, you can just replace the file and try it first~! runtime.zip
Thanks! i already added it to the dev beta. Its looking like we will add it!
Going to set it at 7% and 30 second interval. Any different suggestions?
Cool! I hope this could help people from crashing the SD card due to battery run out! I just lost two hours progress on my rpg playing and realized that this indicator is definitely necessary.
Thanks so much for this! ill be sure to add you in the credits when 2.1 goes live. I left a note in the runtime.sh that names you as well.
This is my honor! I really enjoy this device and love this CFW! Thank you for maintaining this nice piece of work!!
When battery runs out during game play, files in Save folder and Roms fold may be broken as the device shutsdowns without notice. To ensure players power off the handheld before battery running out, I added a short script in .tmp_update\runtime.sh to blink the power LED as indicator of low battery warning.