Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 03:19 PM   #1396
silvern0va
Junior Member
silvern0va began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2024
Device: Kobo Libra Colour
Quote:
Originally Posted by lumping-sugar66 View Post
If you're comfortable building NickelMenu from source, the latest master branch in the official repository has "bluetooth on/off" instructions implemented.

Code:
                  nickel_bluetooth   - one of:
                                         enable   (4.34.20097+)
                                         disable  (4.34.20097+)
                                         toggle   (4.34.20097+)
                                         check    (4.34.20097+)
                                         scan     (4.34.20097+)
Or maybe @geek1011 can make a release of NickelMenu 0.5.5
Yeah I would prefer if we could get a new release. I tried compiling it and maybe it's because I'm on Windows but it is NOT working.
silvern0va is offline   Reply With Quote
Old Yesterday, 07:30 PM   #1397
Aleron Ives
Wizard
Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.
 
Posts: 1,331
Karma: 16297052
Join Date: Sep 2022
Device: Kobo Libra 2
I've made another update to my battery statistics calculation script. Version 1.2 brings a few improvements:
  • The v_pct divisor is now calculated automatically from v_max and v_min, rather than using a hardcoded value.
  • v_now no longer displays nonsensical values like 4.8 V.

I had hoped to use bc to do proper floating-point arithmetic, but it seems that Kobo's version of BusyBox doesn't have it, so instead I've resorted to manipulating v_now, v_min, and v_max as strings, which avoids doing any actual arithmetic for the units conversion.

Remember that if you have the Libra Colour, you must replace:

/sys/class/power_supply/battery/
with
/sys/class/power_supply/bd71827_bat/

in order for the script to work. Other Kobo models may require greater changes, as some statistics may not be available.

Code:
# Battery Statistics Calculator 1.2 (2024-08-28) by Aleron Ives
#
# This script calculates battery statistics for the Kobo Libra 2.
# Check the contents of /sys/class/power_supply/ if you use a different
# model to ensure that the statistics you want to track are available.
#
# You can use NickelMenu to invoke this script like so:
# menu_item :main :Battery :cmd_output :500 :/mnt/onboard/.adds/battcalc.sh

# Gather the necessary statistics

meter=$(cat /sys/class/power_supply/battery/capacity)
v_now=$(cat /sys/class/power_supply/battery/voltage_now)
v_min=$(cat /sys/class/power_supply/battery/voltage_min)
v_max=$(cat /sys/class/power_supply/battery/voltage_max)
c_now=$(cat /sys/class/power_supply/battery/charge_now)
c_full=$(cat /sys/class/power_supply/battery/charge_full)
c_dfull=$(cat /sys/class/power_supply/battery/charge_full_design)

# Format the statistics

let c_now/=1000; let c_full/=1000; let c_dfull/=1000 # Convert to mAh
let charge=$c_now*100/$c_full     # Calculate charge percentage from mAh
let c_health=$c_full*100/$c_dfull # Calculate health percentage from mAh
let v_div=$v_max-$v_min; let v_div/=100    # Calculate charge percentage from V
let v_pct=$v_max-$v_now; let v_pct/=$v_div # "
let v_pct=100-$v_pct                       # "
v_nowr=$(echo $v_now | cut -b 2-4) # Simulate floating-point arithmetic
v_now=$(echo $v_now | cut -b 1)    # "
v_minr=$(echo $v_min | cut -b 2-3) # "
v_min=$(echo $v_min | cut -b 1)    # "
v_maxr=$(echo $v_max | cut -b 2-3) # "
v_max=$(echo $v_max | cut -b 1)    # "

# Display the results

echo Capacity: $c_now mAh / $charge% / $meter%
echo Voltage: $v_min.$v_minr V / $v_now.$v_nowr V / $v_max.$v_maxr V / $v_pct%
echo Health: $c_full mAh / $c_dfull mAh / $c_health%
If you download the attached version, remember to remove the .txt extension! The forum doesn't allow uploading text files with the .sh extension.
Attached Thumbnails
Click image for larger version

Name:	battcalc.png
Views:	13
Size:	26.4 KB
ID:	210465  
Attached Files
File Type: txt battcalc.sh.txt (1.7 KB, 4 views)

Last edited by Aleron Ives; Yesterday at 07:40 PM.
Aleron Ives is offline   Reply With Quote
Old Today, 08:17 AM   #1398
bohn
Member
bohn began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Sep 2018
Device: Libra 2
Quote:
Originally Posted by silvern0va View Post
Yeah I would prefer if we could get a new release. I tried compiling it and maybe it's because I'm on Windows but it is NOT working.
yeah, me too.
bohn is offline   Reply With Quote
Reply

Tags
kobo, launcher, ldpreload, nickel


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo eReaders and Heat PeterT Kobo Reader 13 08-02-2014 04:35 AM
kobo arc launcher not working lana loves books Kobo Tablets 8 03-21-2014 06:40 AM
Orginization on kobo ereaders crochetgeek2010 Kobo Reader 7 09-03-2013 02:13 PM
Kobo Announces eReaders Available for Purchase on Kobo.com in Canada and US markemark News 1 04-02-2013 01:46 PM
Ereaders with Integrated Dictionary poohbear_nc Which one should I buy? 4 04-08-2010 06:42 AM


All times are GMT -4. The time now is 12:27 PM.


MobileRead.com is a privately owned, operated and funded community.