[WebHID] Unit exponent of -8 is incorrectly interpreted as +8

#571496929 Filed 2026-10-08 P3 / S3 Blink>USB (WebHID)

Live check

Connect the device

Every exponent should read -8. A read of +8 means the browser still has the bug.

Flash instructions

Adafruit Feather nRF52840 Sense

  1. Enter bootloader: double-tap the RESET button. The board mounts as FEATHERBOOT / FTHRSNSBOOT (USB 239a:0087).
  2. Copy the UF2: download feather_unit_exp.uf2 below and drop it onto the boot drive. The board flashes (red LED double-blink) and reboots by itself.
  3. Verify enumeration: the board comes back as 239a:8087 "Feather nRF52840 Sense" with one vendor HID collection.
  4. Linux permissions: Chrome needs read/write on the hidraw node. If open() fails with NotAllowedError, add a udev rule:
    SUBSYSTEM=="hidraw", ATTRS{idVendor}=="239a", MODE="0666"
    then sudo udevadm control --reload-rules and replug.
  5. Run the check above. Buggy browsers show +8, fixed browsers show -8.

Downloads

⬇ feather_unit_exp.uf2 ⬇ feather_unit_exp.ino (source) Issue