Skip to content

Commit 8d5667d

Browse files
committed
Remove unused ConfigVoltage report to simplify.
1 parent a0329fc commit 8d5667d

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

examples/UPS/UPS.ino

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ PresentStatus iPresentStatus = {}, iPreviousStatus = {};
2020
byte bCapacityMode = 1; // unit: 0=mAh, 1=mWh, 2=%
2121

2222
// Physical parameters
23-
const uint16_t iConfigVoltage = 1509; // centiVolt
2423
uint16_t iVoltage =1499; // centiVolt
2524
uint16_t iManufacturerDate = 0; // initialized in setup function
2625

@@ -52,7 +51,6 @@ void setup() {
5251
PowerDevice.setFeature(HID_PD_PRESENTSTATUS, &iPresentStatus, sizeof(iPresentStatus));
5352

5453
PowerDevice.setFeature(HID_PD_CAPACITYMODE, &bCapacityMode, sizeof(bCapacityMode));
55-
PowerDevice.setFeature(HID_PD_CONFIGVOLTAGE, &iConfigVoltage, sizeof(iConfigVoltage));
5654
PowerDevice.setFeature(HID_PD_VOLTAGE, &iVoltage, sizeof(iVoltage));
5755

5856
PowerDevice.setStringFeature(HID_PD_IDEVICECHEMISTRY, &bDeviceChemistry, STRING_DEVICECHEMISTRY);

src/HIDPowerDevice.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,12 @@ static const uint8_t _hidReportDescriptor[] PROGMEM = {
7878
0x27, 0xFF, 0xFF, 0x00, 0x00, // LOGICAL_MAXIMUM (65534)
7979
0xB1, 0xA3, // FEATURE (Constant, Variable, Absolute, No Wrap, Linear, No Preferred, No Null Position, Volatile, Bitfield)
8080
0x05, 0x84, // USAGE_PAGE (Power Device) ====================
81-
0x85, HID_PD_CONFIGVOLTAGE, // REPORT_ID (10)
82-
0x09, 0x40, // USAGE (ConfigVoltage)
81+
0x85, HID_PD_VOLTAGE, // REPORT_ID (11)
82+
0x09, 0x30, // USAGE (Voltage)
8383
0x15, 0x00, // LOGICAL_MINIMUM (0)
8484
0x27, 0xFF, 0xFF, 0x00, 0x00, // LOGICAL_MAXIMUM (65535)
8585
0x67, 0x21, 0xD1, 0xF0, 0x00, // UNIT (Centivolts)
8686
0x55, 0x05, // UNIT_EXPONENT (5)
87-
0xB1, 0x23, // FEATURE (Constant, Variable, Absolute, No Wrap, Linear, No Preferred, No Null Position, Nonvolatile, Bitfield)
88-
0x85, HID_PD_VOLTAGE, // REPORT_ID (11)
89-
0x09, 0x30, // USAGE (Voltage)
9087
0x81, 0xA3, // INPUT (Constant, Variable, Absolute, No Wrap, Linear, No Preferred, No Null Position, Bitfield)
9188
0x09, 0x30, // USAGE (Voltage)
9289
0xB1, 0xA3, // FEATURE (Constant, Variable, Absolute, No Wrap, Linear, No Preferred, No Null Position, Volatile, Bitfield)

src/HIDPowerDevice.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646

4747
#define HID_PD_PRESENTSTATUS 0x07 // INPUT OR FEATURE(required by Windows)
4848
#define HID_PD_MANUFACTUREDATE 0x09
49-
#define HID_PD_CONFIGVOLTAGE 0x0A // 10 FEATURE ONLY
5049
#define HID_PD_VOLTAGE 0x0B // 11 INPUT (NA) OR FEATURE(implemented)
5150
#define HID_PD_REMAININGCAPACITY 0x0C // 12 INPUT OR FEATURE(required by Windows)
5251
#define HID_PD_FULLCHRGECAPACITY 0x0E // 14 FEATURE ONLY. Last Full Charge Capacity

0 commit comments

Comments
 (0)