Add the read-only battery_capacity and battery_status sysctls, decoded from byte 52 of input report 1 as in Linux hid-playstation.
Details
Details
- Reviewers
wulf
Tested on amd64 16.0-CURRENT, DualSense on USB with a full battery.
$ sysctl dev.ps5dsense.0.battery_capacity dev.ps5dsense.0.battery_status
dev.ps5dsense.0.battery_capacity: 100
dev.ps5dsense.0.battery_status: 4
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 78858 Build 75741: arc lint + arc unit
Event Timeline
| sys/dev/hid/ps5dsense.c | ||
|---|---|---|
| 321 | Move this line to ps5ds_attach(). Other looks good. | |
Comment Actions
Move status_loc to ps5ds_attach()
Recompiled and tested the module again and it works.
Comment Actions
@wulf I have a ports committer bit. Should I push to the src since I have your approval?