Sapd / HeadsetControl

Sidetone and Battery status for Logitech G930, G533, G633, G933 SteelSeries Arctis 7/PRO 2019 and Corsair VOID (Pro) in Linux and MacOSX
GNU General Public License v3.0
1.47k stars 178 forks source link

Logitech G535: Battery reports 50% #273

Closed 19Gerhard85 closed 1 year ago

19Gerhard85 commented 1 year ago

Description

$ headsetcontrol -b
Found Logitech G535!
Battery: 50%
Success!

On which OS does the problem happen?

Linux

AXeL-dev commented 1 year ago

I'm facing the same issue, any news? @Moonlight-Angel @Sapd

battery-level

AXeL-dev commented 1 year ago

@19Gerhard85 I was able to fix the issue by reverting the changes in this commit: https://github.com/Sapd/HeadsetControl/commit/5a09dc3401afb344c4e7dc9b6bff83708426ef40.

Sapd commented 1 year ago

@19Gerhard85 I was able to fix the issue by reverting the changes in this commit: 5a09dc3.

Best way is to look up why this happens. I would suggest you adding this around 170:

printf("voltage %u - result: %d\n", voltage, spline_battery_level(battery_estimate_percentages, battery_estimate_voltages, battery_estimate_size, voltage));

Edit: There is a bug in the spline function