Revert "Fix PowerBeats3 mapping"

This reverts commit 7a5baed6
This commit is contained in:
darken
2022-01-09 18:06:18 +01:00
parent 6c893ed6f3
commit 604502ae76
2 changed files with 3 additions and 11 deletions
@@ -182,7 +182,7 @@ class AppleFactory @Inject constructor(
scanResult = scanResult,
proximityMessage = pm,
)
dm == 0x1320.toUShort() -> PowerBeats3(
dm == 0x0320.toUShort() -> PowerBeats3(
identifier = identifier,
scanResult = scanResult,
proximityMessage = pm
@@ -10,9 +10,9 @@ class PowerBeats3Test : BaseAirPodsTest() {
// TODO This is handcrafted data, get actual data for tests
@Test
fun `default PowerBeats3`() = runBlockingTest {
create<PowerBeats3>("07 19 01 13 20 62 04 80 01 0F 40 0D 70 50 16 F2 40 83 16 BF 10 16 34 9B 74 84 E8") {
create<PowerBeats3>("07 19 01 03 20 62 04 80 01 0F 40 0D 70 50 16 F2 40 83 16 BF 10 16 34 9B 74 84 E8") {
rawPrefix shouldBe 0x01.toUByte()
rawDeviceModel shouldBe 0x1320.toUShort()
rawDeviceModel shouldBe 0x0320.toUShort()
rawStatus shouldBe 0x62.toUByte()
rawPodsBattery shouldBe 0x04.toUByte()
rawCaseBattery shouldBe 0x80.toUByte()
@@ -23,12 +23,4 @@ class PowerBeats3Test : BaseAirPodsTest() {
batteryHeadsetPercent shouldBe 0.4f
}
}
// PowerBeats3 unconfirmed
@Test
fun `random guy at busstop`() = runBlockingTest {
create<PowerBeats3>("07 19 01 13 20 2B 88 8F 01 00 08 E2 0E 84 37 C5 98 16 D4 B7 37 ED 23 8B 08 EA A1") {
batteryHeadsetPercent shouldBe 0.8f
}
}
}