Handle PLTN-ATR G700 variants in sensor interface routing#63
Conversation
Agent-Logs-Url: https://github.com/doudar/grupetto/sessions/d7909e6a-b9a0-41ce-8d0a-993fbbcbfb60 Co-authored-by: doudar <17362216+doudar@users.noreply.github.com>
This reverts commit 0330319.
There was a problem hiding this comment.
Pull request overview
Updates Peloton G700 model detection so newer PLTN-ATR*-reported devices route to the correct sensor interface at startup, preventing the mis-route crash described in the PR.
Changes:
- Added a helper function to classify G700 CrossTrainer models (
G700*andPLTN-ATR*). - Updated
IsG700CrossTrainerto use the new helper. - Added unit tests covering positive/negative model-classification cases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/src/main/java/com/spop/poverlay/util/Peloton.kt | Broadens G700 detection via a helper and updates the exported IsG700CrossTrainer flag. |
| app/src/test/java/com/spop/poverlay/util/PelotonModelDetectionTest.kt | Adds regression tests for new model-detection logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** G700 model strings include either legacy "G700" or newer "PLTN-ATR" prefixes. */ | ||
| internal fun isG700CrossTrainerModel(model: String): Boolean { |
There was a problem hiding this comment.
There are now two adjacent KDoc blocks (the existing G700 KDoc above and the new one-liner here). In Kotlin, only the KDoc immediately preceding a declaration is associated, so the earlier block becomes detached/ignored. Consider merging the new sentence into the existing KDoc (or converting one of them to a regular // comment) so documentation stays attached to the intended declaration.
|
Thanks. I can see the new lines of code and have installed the new v 0.33 but the same issue remains. It opens up but does not log stats before crashing after 10 seconds or so. |
|
Hi Find attached the log errors and the code after my AI had a go at fixing it. The APP now does not crash but moans amount sensors being asleep and then just sits there not showing any stats etc. |
On Peloton G700 hardware reported as
PLTN-ATR01, the app routes to the wrong sensor path and crashes during startup. This change broadens G700 detection soPLTN-ATR*models use the same interface path as other G700 devices.Model detection update
Peloton.ktfor G700 classification.G700strings or newerPLTN-ATRprefixes.Startup routing impact
PLTN-ATR*devices viaIsG700CrossTrainer.Regression coverage
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dl.google.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -Xmx2048m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp(dns block)If you need me to access, download, or install something from one of these locations, you can either: