Skip to content

Conversation

@Stullemon
Copy link

Hi, I tried to come up with something to resolve #1190. As I pointed out there: I wasn't quite smart enough to suddenly learn Kotlin, etc. Yet, there's Anthropic's Claude (free version). So I asked what's the difference between the old Java version and the new Kotlin version. I also asked it to help me understand how the differences relate to the logging I was able to produce. I then proceeded to have it suggest a fix for it and help me build a debug build. Which it did. So I ended up testing it on my phone and - lo and behold - it worked.

What I understood kind of makes sense to me. The flow of messages was altered so it kind of revised it back to how it used to be and now it works. I couldn't test with type 2 so I cannot say if I created a regression. I am also not sure if the use of an LLM helped me comply with standards you otherwise observe. So all considered... well... I hope you can pull as is or suggest something to help me improve things to a point where you can do the pull. I would really like to continue weighing my children sometime soon. :-D

@Stullemon
Copy link
Author

Oh, one thing I also noticed is that Claude was suggesting the following change. The snippet

        if (weightKg <= 5f || weightKg >= 250f) {
            weightKg = weightKg / 10.0f

was suggested to be replaced by

        if (weightKg <= 5f || weightKg >= 250f) {
            weightKg = raw / 10.0f
            logD("QN: weight adjustment applied, new weight=$weightKg kg")

Feels wrong judging by the fact that it pretty much went unchanged during the conversion from Java to Kotlin. Just thought I'd still share. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QN-Scale and Renpho ES-CS20M Unable to Record Measurements

1 participant