mirror of
https://github.com/pollen-robotics/microduck.git
synced 2026-11-22 05:11:50 +08:00
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>