Skip to content

Commit d3423f5

Browse files
committed
Change HIDPowerDevice_::sendDate to send the date as a FEATURE report instead of a INPUT report, so that it matches the ManufacturerDate parameter in the HID descriptor. This is also required in order for the date to be picked up on Windows.
1 parent 0f1b1af commit d3423f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/HIDPowerDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void HIDPowerDevice_::end(void) {
251251

252252
int HIDPowerDevice_::sendDate(uint16_t id, uint16_t year, uint8_t month, uint8_t day) {
253253
iManufacturerDate = (year - 1980)*512 + month * 32 + day; // from 4.2.6 Battery Settings in "Universal Serial Bus Usage Tables for HID Power Devices"
254-
return HID().SendReport(id, &iManufacturerDate, sizeof(iManufacturerDate));
254+
return HID().SetFeature(id, &iManufacturerDate, sizeof(iManufacturerDate));
255255
}
256256

257257
int HIDPowerDevice_::sendReport(uint16_t id, const void* bval, int len) {

0 commit comments

Comments
 (0)