Comments (6)
Could be a simple flag/bitmask, because 222-94=128 (power of two). You could try it again with a different battery level, check the level, put the mic up and check the level again and subtract 128 to see if the result is the same.
from headsetcontrol.
Unplugged the headset, and spammed HeadsetControl -b
(mic up)
Battery: 222%
Failed to request battery. Error: -100: (null)
Battery: 223%
Battery: 223%
Battery: 223%
(mic down)
Battery: 95%
223-95 -> 128, will leave it unplugged for a while and report back once again.
from headsetcontrol.
(mic up)
Battery: 220%
(mic down)
Battery: 92%
220-92 -> 128, seems you are correct.
from headsetcontrol.
Then you can do something like this:
// on top of the c file
enum voidpro_battery_flags {
VOIDPRO_BATTERY_MICUP = 128
}
// then inside the function
if (data_read[4] & VOIDPRO_BATTERY_MICUP)
return data_read[4]-VOIDPRO_BATTERY_MICUP;
This will simply return the battery status. We could also pass it, however then the battery_status enum has to be updated.
from headsetcontrol.
I adjusted your code a bit and it looks good (as in working) now. See #14
from headsetcontrol.
Fixed in 5f49bd6, closing.
from headsetcontrol.
Related Issues (20)
- Add option to check if headset is connected HOT 3
- Failed to set/request sidetone. Error: -1: ioctl (SFEATURE): Broken pipe HOT 1
- Possibility to add shortcuts with the G733 battery button
- Help with setting up Corsair HS55 Wireless HOT 2
- SteelSeries Arctis 9 not displaying battery when charging HOT 6
- Add support for Logitech H390 HOT 1
- error: ignoring return value of ‘asprintf’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] HOT 2
- Add support for Logitech G435 HOT 9
- Not showing correct battery status HOT 2
- Can not execute any command without sudo privileges HOT 2
- Incorrect ChatMix help message HOT 1
- Integrate with D-Bus / Upower HOT 1
- Error during build HOT 1
- HyperX Cloud Core Wireless Support HOT 4
- Support for HyperX Cloud III (with wire) HOT 12
- Arctis 7 Pro - Battery Charge Level alway at 56%
- version 3.0.0 build failure in src/output.c with CMake HOT 3
- CORSAIR HS80 RGB Wireless Gaming Support HOT 2
- Add Volume Limiter Support HOT 5
- Add Eqalizer info to json output HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from headsetcontrol.