Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public enum BodyLocationProbe {
sb += "Δ vs previous capture: first capture — probe again in another position to diff"
}
} else {
sb += "\nNo payload beyond the command byte (bare stub) — no body-location data on this firmware"
sb += "\nNo payload beyond the command byte (bare stub) — this reply carried no body-location data, which is not the same as the firmware having none (see the Verdict above)"
}
return (sb, payloadHex)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ final class BodyLocationProbeTests: XCTestCase {
let (text, payHex) = BodyLocationProbe.format(frame: hexToBytes("aa0700fa24005446758858"), cmdOff: 6, isWhoop5: false, prevPayloadHex: nil)
XCTAssertTrue(text.contains("bare stub"))
XCTAssertNil(payHex)
// A bare stub is one reply, not a firmware capability. The Verdict line already calls it
// "ambiguous"; the detail line used to contradict it with "no body-location data on this
// firmware", which is the conclusion a reader would quote. Neither line may say it. (#914 class)
XCTAssertTrue(text.contains("ambiguous"), text)
XCTAssertFalse(text.contains("no body-location data on this firmware"), text)
XCTAssertTrue(text.contains("not the same as the firmware having none"), text)
}

/// Golden FULL-output lock: pins the exact byte-for-byte report so the Swift and Kotlin twins can't
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/java/com/noop/ble/WhoopBleClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ class WhoopBleClient(
sb.append("Δ vs previous capture: first capture — probe again in another position to diff")
}
} else {
sb.append("\nNo payload beyond the command byte (bare stub) — no body-location data on this firmware")
sb.append("\nNo payload beyond the command byte (bare stub) — this reply carried no body-location data, which is not the same as the firmware having none (see the Verdict above)")
}
return sb.toString() to payloadHex
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.noop.ble

import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Assert.assertFalse
import org.junit.Assert.assertTrue
import org.junit.Test

Expand Down Expand Up @@ -61,6 +62,10 @@ class BodyLocationProbeFormatTest {
@Test fun bareStubIsCalledOut() {
val (text, payHex) = WhoopBleClient.formatBodyLocationProbe(hexToBytes("aa0700fa24005446758858"), 6, false, null)
assertTrue(text.contains("bare stub"))
// Twin of the Swift assertion: a bare stub is one reply, not a firmware capability.
assertTrue(text.contains("ambiguous"))
assertFalse(text.contains("no body-location data on this firmware"))
assertTrue(text.contains("not the same as the firmware having none"))
assertNull(payHex)
}

Expand Down