bradcagle / dbus-btbattery

20 stars 3 forks source link

make battery percent to a decimal place #13

Open Sarah-1331 opened 9 months ago

Sarah-1331 commented 9 months ago

edit your jbdbt.py

line 292            self.soc,
line 292            soc,

insert 

line 297        self.soc = round(100 * capacity_remain / capacity, 2)

this will make whole battery capicity to 1 decimal place will update so if your battery broadcasts cycle capicty (mine doesnt) it wll make your cycle capicity to 1 decimal place

bradcagle commented 9 months ago

That's odd, so your battery does not provide soc? is it always 0 or something?

Sarah-1331 commented 9 months ago

yes it reports 0% but if i calculate whole battery to remaining i get it and to a decimal place i have two bms's one test and one fitted

my fitted doesnt broadcast soc but my spare does i also kind of like the decimal place

i am trying to get the other connected temp sensor and time to go working also

i am far from your skills but i like the extra info louisvdw has now ability to control mosfet, time to go, but your bluetooth is 100% better on both my bms's