Closed Florin9doi closed 6 days ago
@Florin9doi Thank you for this 🙏🏻
It helped me use my scale.
I did notice that the impedance readings were not coming through. I took a look at core/bluetooth/BluetoothOKOK.java
and see that the code appears incomplete. My scale uses the fallback conditional branch which does not extract impedance.
Ive started building out a processing module for OKOK compatible scales but Im not sure 100% which calculations to be using. Kind of guessing, trying to reverse engineer the app, and also looking at how the other scales calculate their data. My work is forked off your PR since my scale is one of the ones with no name.
I don't have examples of the other type of OKOK scales. Ill try my best to update the code in a way that helps everyone who uses these scales.
If anyone has example payloads I could use them to test my work
Thanks for your PR, yeah some scales has no Bluetooth names. Might be problem if we have different vendors using scales with no Bluetooth names.
Could you explain why you using TextUtils.isEmpty instead of name.isEmpty()? If there is no specific reason I would change it to name.isEmpty() to make the code more consistent.
TextUtils.isEmpty
is used to check also for null in a single operation, instead of name==null || name.isEmpty
Thanks for your quick reply and your explanation, I have just merged your PR into the master branch. Thanks again! :1st_place_medal:
I am sorry I had to revert it as it appears that of course every Bluetooth address appears now as the nameless scale. We need to figure out how to filter these out. Unfortunately I cannot reopen this PR again :( My fault sorry.
I created a new PR https://github.com/oliexdev/openScale/pull/1088 for reopen this PR
Closes #950