File tree Expand file tree Collapse file tree
app/src/main/java/com/eried/eucplanet/ble Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,8 +41,9 @@ class BegodeAdapter @Inject constructor() : WheelAdapter {
4141
4242 override fun bleProfile (): BleProfile = BleProfile .HM10
4343
44- override fun notifyConnectingTo (deviceName : String? ) {
44+ override fun notifyConnectingTo (deviceName : String? ): DecodeResult . ModelName ? {
4545 detectedModel = deviceName?.let { BegodeModel .fromReportedName(it) }
46+ return null
4647 }
4748
4849 // Begode wheels stream telemetry unsolicited — no init handshake, no poll
Original file line number Diff line number Diff line change @@ -34,9 +34,9 @@ class CompositeWheelAdapter @Inject constructor(
3434
3535 override fun bleProfile (): BleProfile = active.bleProfile()
3636
37- override fun notifyConnectingTo (deviceName : String? ) {
37+ override fun notifyConnectingTo (deviceName : String? ): DecodeResult . ModelName ? {
3838 active = pickAdapter(deviceName)
39- active.notifyConnectingTo(deviceName)
39+ return active.notifyConnectingTo(deviceName)
4040 }
4141
4242 override fun initSequence (): List <ByteArray > = active.initSequence()
Original file line number Diff line number Diff line change @@ -45,8 +45,9 @@ class InMotionV1Adapter @Inject constructor() : WheelAdapter {
4545
4646 override fun bleProfile (): BleProfile = BleProfile .INMOTION_V1
4747
48- override fun notifyConnectingTo (deviceName : String? ) {
48+ override fun notifyConnectingTo (deviceName : String? ): DecodeResult . ModelName ? {
4949 detectedModel = deviceName?.let { InMotionV1Model .fromReportedName(it) }
50+ return null
5051 }
5152
5253 /* *
Original file line number Diff line number Diff line change @@ -33,8 +33,9 @@ class KingsongAdapter @Inject constructor() : WheelAdapter {
3333
3434 override fun bleProfile (): BleProfile = BleProfile .HM10
3535
36- override fun notifyConnectingTo (deviceName : String? ) {
36+ override fun notifyConnectingTo (deviceName : String? ): DecodeResult . ModelName ? {
3737 detectedModel = deviceName?.let { KingsongModel .fromReportedName(it) }
38+ return null
3839 }
3940
4041 override fun initSequence (): List <ByteArray > = listOf (
Original file line number Diff line number Diff line change @@ -87,14 +87,15 @@ class NinebotAdapter @Inject constructor() : WheelAdapter {
8787 * the name signals legacy explicitly we flip the protocol BEFORE the
8888 * connection manager reads [bleProfile].
8989 */
90- override fun notifyConnectingTo (deviceName : String? ) {
90+ override fun notifyConnectingTo (deviceName : String? ): DecodeResult . ModelName ? {
9191 val resolved = deviceName?.let { NinebotModel .fromReportedName(it) }
9292 detectedModel = resolved
9393 activeProtocol = resolved?.protocol ? : NinebotProtocol .Z
9494 parser = NinebotParser (activeProtocol)
9595 crypto.clearKey()
9696 settingsSnapshot = WheelSettings ()
9797 settingsCursor = 0
98+ return null
9899 }
99100
100101 /* *
Original file line number Diff line number Diff line change @@ -37,8 +37,9 @@ class VeteranAdapter @Inject constructor() : WheelAdapter {
3737
3838 override fun bleProfile (): BleProfile = BleProfile .HM10
3939
40- override fun notifyConnectingTo (deviceName : String? ) {
40+ override fun notifyConnectingTo (deviceName : String? ): DecodeResult . ModelName ? {
4141 detectedModel = deviceName?.let { VeteranModel .fromReportedName(it) }
42+ return null
4243 }
4344
4445 // Veteran streams unsolicited telemetry as soon as notifications are
You can’t perform that action at this time.
0 commit comments