Skip to content

Commit 9e37c67

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 e416da5 commit 9e37c67

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
@@ -252,7 +252,7 @@ void HIDPowerDevice_::end(void) {
252252

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

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

0 commit comments

Comments
 (0)