Files
swiftcontrol/lib/widgets
skyiea314 fa56e76a9b fix(ble): match Onelap Key faces and discover it on Android (#440)
* fix(ble): match Onelap Key faces and strip firmware padding

The settings page drew the firmware revision's trailing padding as tofu after 0.105. Device Information strings now stop at the first NUL and drop 0xFF or non-UTF-8 tails. The controller diagram uses the molded cross: circle, triangle, square, dot pad, and ONELAP.

* fix(ble): show legacy Onelap Key advertisements on Android

universal_ble's default Android scan asks only for BLE 5 extended advertisements, so a BLE 4.x Onelap Key never appears. Request legacy advertisements at low latency, and accept a later packet that is the first one to carry the controller name.

* style: keep the Onelap scan change to the discovery lines

The previous commit reformatted connection.dart. Restore the surrounding file and leave the legacy-scan and name-arrival checks.

* fix(ble): preserve valid UTF-8 prefixes

Keep the valid device-information prefix before malformed UTF-8.
Discard printable bytes after the error and cover truncated sequences
and valid replacement characters with regression tests.

* fix(ble): retain extended advertisements

Allow both legacy and extended Android advertisements while keeping
low-latency scanning. Verify the configuration at the BLE platform
boundary and remove the incorrect extended-only explanation.

* style: use English comments and test descriptions

---------

Co-authored-by: haoxiang.yang <haoxiang.yang@megatronix.co>
2026-11-06 08:38:36 +01:00
..