direc85 / harbour-batterybuddy

Battery level alert for Sailfish OS
GNU General Public License v3.0
7 stars 8 forks source link

RFE: Add support for Jolla Tablet #48

Closed pcfe closed 1 year ago

pcfe commented 2 years ago

Hello,

it would be nice if the Jolla Tablet was supported.

On the Jolla Tablet I have the following in /sys/ when not plugged in,

[root@jolla-tablet ~]# ls -1 /sys/class/power_supply/
dollar_cove_battery
dollar_cove_charger
[root@jolla-tablet ~]# ls -1 /sys/class/power_supply/dollar_cove_battery/
capacity
charge_full
charge_full_design
charge_now
current_avg
current_now
device
health
model_name
power
present
status
subsystem
technology
temp
type
uevent
voltage_now
voltage_ocv
[root@jolla-tablet ~]# ls -1 /sys/class/power_supply/dollar_cove_charger/
cable_type
charge_control_limit
charge_control_limit_max
charge_current
charge_term_cur
charge_voltage
device
enable_charger
enable_charging
health
input_cur_limit
max_charge_current
max_charge_voltage
max_temp
min_temp
online
power
present
subsystem
type
uevent
[nemo@jolla-tablet ~]$ cd /sys/class/power_supply/dollar_cove_battery/
[nemo@jolla-tablet dollar_cove_battery]$ cat capacity 
79
[nemo@jolla-tablet dollar_cove_battery]$ cat status 
Discharging
[nemo@jolla-tablet dollar_cove_battery]$ cat present 
1
[nemo@jolla-tablet dollar_cove_battery]$ cat temp 
310
[nemo@jolla-tablet dollar_cove_battery]$ cat health 
Good
[nemo@jolla-tablet dollar_cove_battery]$ cd /sys/class/power_supply/dollar_cove_charger/
[nemo@jolla-tablet dollar_cove_charger]$ cat charge_control_limit
0
[nemo@jolla-tablet dollar_cove_charger]$ cat charge_control_limit_max 
4
[nemo@jolla-tablet dollar_cove_charger]$ cat enable_charging 
0
[nemo@jolla-tablet dollar_cove_charger]$ cat enable_charger 
0

and this when plugged in

[nemo@jolla-tablet dollar_cove_charger]$ cat charge_control_limit_max 
4
[nemo@jolla-tablet dollar_cove_charger]$ cat charge_control_limit
0
[nemo@jolla-tablet dollar_cove_charger]$ cat enable_charger 
1
[nemo@jolla-tablet dollar_cove_charger]$ cat enable_charging 
1
[nemo@jolla-tablet dollar_cove_charger]$ cat charge_current 
1800
[nemo@jolla-tablet dollar_cove_charger]$ cat charge_term_cur 
250
[nemo@jolla-tablet dollar_cove_charger]$ cat charge_voltage 
4350
[nemo@jolla-tablet dollar_cove_charger]$ cat /sys/class/power_supply/dollar_cove_battery/status 
Charging

Is there anything else needed to add support for this (granted pretty old) hardware?

pcfe

direc85 commented 2 years ago

Hi,

Sorry for the long delay, I kinda really forgot about this one until today...

Thanks for the comprehensive list of files and their contents! I think I managed to find all the necessary files. As I don't have the device on-hand, it's hard to tell if something doesn't work. Could you test it and report back to me? You can download 4.1.0-beta1 here from GitHub.

direc85 commented 2 years ago

I forgot to add the Jolla Tablet charger control file to the root service, so charger control won't work in beta1. Please download 4.1.0-beta2 instead :sweat_smile:

direc85 commented 2 years ago

4.1.0 is now released with the support, so I'm closing this. Post a new message here if it doesn't work after all.

pcfe commented 1 year ago

just to wrap this up, thanks for the code changes and not to worry about the delay. But sadly my Jolla Tablet died in the mean time (device was old and I seem to have done too many rounds of flashing for the old flash memory to survive). So I can no longer test :-(

direc85 commented 1 year ago

I'm sorry to hear that :(

carmenfdezb commented 1 year ago

Hi @direc85! I've downloaded Battery Buddy 3.17.0-1 source code and added commit 354ffcb295ec330ce4112fc4f8b34a168772cb63. I've installed in my tablet with sfos 4.2, and it works perfect :)

direc85 commented 1 year ago

Thank you for testing! Closing as fixed :partying_face: