Imported Upstream version 2.7.4
This commit is contained in:
parent
fd413a3168
commit
c9cb2187ee
290 changed files with 7473 additions and 2607 deletions
|
|
@ -287,6 +287,8 @@ void HIDDumpTree(hid_dev_handle_t udev, usage_tables_t *utab)
|
|||
return;
|
||||
}
|
||||
|
||||
upsdebugx(1, "%i HID objects found", pDesc->nitems);
|
||||
|
||||
for (i = 0; i < pDesc->nitems; i++)
|
||||
{
|
||||
double value;
|
||||
|
|
@ -407,7 +409,7 @@ char *HIDGetIndexString(hid_dev_handle_t udev, const int Index, char *buf, size_
|
|||
if (comm_driver->get_string(udev, Index, buf, buflen) < 1)
|
||||
buf[0] = '\0';
|
||||
|
||||
return rtrim(buf, '\n');
|
||||
return str_rtrim(buf, '\n');
|
||||
}
|
||||
|
||||
/* Return pointer to indexed string from HID path (empty if not found)
|
||||
|
|
@ -429,7 +431,7 @@ char *HIDGetItemString(hid_dev_handle_t udev, const char *hidpath, char *buf, si
|
|||
*/
|
||||
int HIDSetDataValue(hid_dev_handle_t udev, HIDData_t *hiddata, double Value)
|
||||
{
|
||||
int i, r;
|
||||
int r;
|
||||
long hValue;
|
||||
|
||||
if (hiddata == NULL) {
|
||||
|
|
@ -456,9 +458,7 @@ int HIDSetDataValue(hid_dev_handle_t udev, HIDData_t *hiddata, double Value)
|
|||
}
|
||||
|
||||
/* flush the report buffer (data may have changed) */
|
||||
for (i=0; i<256; i++) {
|
||||
reportbuf->ts[i] = 0;
|
||||
}
|
||||
memset(reportbuf->ts, 0, sizeof(reportbuf->ts));
|
||||
|
||||
upsdebugx(4, "Set report succeeded");
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue