Commit 3c77f3c
authored
* library added
* Update build.gradle
* Update build.gradle
* Update build.gradle
* adding most of the code
* Update WaterRowerBridge.java
* Update WaterRowerBridge.java
* fix logging
* Update device_filter.xml
* Refactor WaterRower USB connection initialization
Replaces auto-discovery with explicit device path search and connection for WaterRower USB devices. Updates Android and C++ bridge code to first locate the device, then connect using its path, improving reliability and error handling.
* Retry WaterRower USB device detection periodically
Android's UsbManager.getDeviceList() can return no devices at app
startup if enumeration hasn't finished yet, so the single detection
attempt at thread start silently failed forever (see debug log from
issue #3059, comment 4858695955: single "device not found" line, no
retries). Poll every 5s while not connected, broaden the vendor/product
match, and also check the USB_DEVICE_ATTACHED intent as a fallback.
* Fix WaterRower USB connection using usb-serial-for-android instead of jSerialComm
jSerialComm can't open Android's raw USB device paths (/dev/bus/usb/X/Y) since
CDC-ACM devices like the WaterRower S4/S5 USB monitor aren't exposed as kernel
tty nodes on unrooted Android, causing "Unable to create a serial port object
from the invalid port descriptor" errors reported in issue #3059.
WaterRowerBridge now opens the device via usb-serial-for-android's
CdcAcmSerialDriver (with permission handling) and hands the already-open
UsbSerialPort to SerialChannel, which bridges it to the netty-based
WaterRower transport via InputStream/OutputStream wrappers instead of
jSerialComm.
* Fix WaterRower stroke rate always reporting 0
lastStrokeRate was never assigned anywhere in WaterRowerBridge.java,
only initialized to 0. Subscribe to AverageStrokeRateSubscription
(already provided by waterrower-core) to actually populate it, so
Cadence is reported to QZ instead of staying stuck at 0 while
distance/watts/pace were updating fine.
* Fix WaterRower USB workout timer never advancing
waterrowerusb::update() never called update_metrics(), the base
bluetoothdevice function that advances the session's elapsed time,
moving time and other derived stats. Debug logs showed elapsed_s
stuck at 0 for an entire ~10 minute session while distance/calories
kept climbing in the background, which is almost certainly why the
workout looked "dead" in the app even though data was technically
being received.
Also add the missing virtual bike/rower creation and
connectedAndDiscovered() emission in update(), matching the pattern
used by other non-BLE serial rowers (e.g. csaferower), since the
WaterRower USB device previously never created a virtual device or
triggered the accessory/heart-rate-belt wiring done on first
connection.
* Fix WaterRower USB device lookup
* Fix WaterRower USB distance and watts
* Fix WaterRower USB stroke count and ANT distance
* Normalize ANT distance for WaterRower USB
* Feed ANT speed channel distance from QZ
* Skip wizard for WaterRower USB setting
* Fix ANT FE rower broadcast data
* Smooth WaterRower USB speed
* Fix WaterRower USB startup lifecycle
* Fix indentation and reorder property declarations
* Remove keepalive for iOS lockscreen
Removed keepalive setting for lockscreen on iOS.
* Update main.yml
1 parent bbee913 commit 3c77f3c
116 files changed
Lines changed: 8943 additions & 40 deletions
File tree
- src
- android
- res/xml
- src
- de/tbressler/waterrower
- discovery
- io
- codec
- msg
- interpreter
- in
- out
- transport
- utils
- log
- model
- subscriptions
- flags
- values
- workouts
- utils
- watchdog
- workout
- devices
- waterrowerusb
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| |||
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
164 | 184 | | |
165 | 185 | | |
166 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
| |||
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| 74 | + | |
| 75 | + | |
67 | 76 | | |
68 | 77 | | |
69 | 78 | | |
| |||
210 | 219 | | |
211 | 220 | | |
212 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
213 | 230 | | |
214 | 231 | | |
215 | 232 | | |
| |||
255 | 272 | | |
256 | 273 | | |
257 | 274 | | |
258 | | - | |
| 275 | + | |
259 | 276 | | |
260 | | - | |
| 277 | + | |
261 | 278 | | |
262 | 279 | | |
263 | 280 | | |
| |||
311 | 328 | | |
312 | 329 | | |
313 | 330 | | |
314 | | - | |
315 | | - | |
| 331 | + | |
316 | 332 | | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
| 333 | + | |
| 334 | + | |
323 | 335 | | |
324 | | - | |
325 | 336 | | |
326 | 337 | | |
327 | | - | |
328 | 338 | | |
329 | 339 | | |
330 | 340 | | |
| |||
367 | 377 | | |
368 | 378 | | |
369 | 379 | | |
370 | | - | |
371 | 380 | | |
372 | | - | |
373 | 381 | | |
374 | 382 | | |
375 | | - | |
376 | | - | |
| 383 | + | |
377 | 384 | | |
378 | | - | |
379 | | - | |
| 385 | + | |
380 | 386 | | |
381 | | - | |
382 | 387 | | |
383 | 388 | | |
384 | | - | |
385 | 389 | | |
386 | 390 | | |
387 | 391 | | |
| |||
439 | 443 | | |
440 | 444 | | |
441 | 445 | | |
442 | | - | |
| 446 | + | |
443 | 447 | | |
444 | 448 | | |
445 | 449 | | |
| |||
458 | 462 | | |
459 | 463 | | |
460 | 464 | | |
461 | | - | |
462 | | - | |
| 465 | + | |
| 466 | + | |
463 | 467 | | |
464 | 468 | | |
465 | 469 | | |
466 | 470 | | |
467 | | - | |
| 471 | + | |
468 | 472 | | |
469 | 473 | | |
470 | 474 | | |
| |||
482 | 486 | | |
483 | 487 | | |
484 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
485 | 496 | | |
486 | 497 | | |
487 | 498 | | |
| |||
511 | 522 | | |
512 | 523 | | |
513 | 524 | | |
514 | | - | |
| 525 | + | |
515 | 526 | | |
516 | 527 | | |
517 | 528 | | |
| |||
528 | 539 | | |
529 | 540 | | |
530 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
531 | 577 | | |
532 | 578 | | |
533 | 579 | | |
| |||
562 | 608 | | |
563 | 609 | | |
564 | 610 | | |
565 | | - | |
| 611 | + | |
566 | 612 | | |
567 | 613 | | |
568 | 614 | | |
| |||
576 | 622 | | |
577 | 623 | | |
578 | 624 | | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
579 | 632 | | |
580 | 633 | | |
581 | 634 | | |
| |||
648 | 701 | | |
649 | 702 | | |
650 | 703 | | |
651 | | - | |
| 704 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
| 254 | + | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
261 | 263 | | |
262 | 264 | | |
263 | 265 | | |
| |||
0 commit comments