Files
apirroneandClaude Opus 5.5 7e45a4281b pad.status carries the pad's battery, read by padd from a Nintendo pad
The board's kernel has no hid-nintendo, so a Switch pad runs on hid-generic
in its simple HID mode and nothing on the robot knew its battery. Every
subcommand reply carries it, though: byte 2 of an 0x21 report.

- padd asks the connected Nintendo pad on its hidraw node once a minute
  (subcommand 0x50, which changes nothing), and writes the level and the
  charging bit to /run/padd/pad-battery.json. With hid-nintendo present it
  reads that driver's power_supply instead and sends nothing.
- configd adds it to the connected pad in pad.status, while fresh (5 min).
  It cannot ask the pad itself: PrivateDevices leaves no hidraw in its /dev.
- robotctl pad status and robotctl monitor's pad title show it.
- A udev rule gives padd the Nintendo pads' hidraw (group padd, 0660),
  installed by hooks/postinstall on every update; xtask checks it is packaged.

API v65: Pad.battery, optional.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 15:12:19 +09:00
..
2026-11-05 11:38:32 +01:00
2026-09-10 12:09:46 +02:00