Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1595a06
nutdrv_qx: support USB devices that don't close their replies with a CR
zykh Jul 28, 2018
258276a
nutdrv_qx: add support for some Legrand USB devices
TaorLegrand Aug 27, 2018
8a5e87a
usbhid-ups: add Legrand subdriver
TaorLegrand Aug 27, 2018
0d1ae20
metasys: fix handling of errors/special values
TaorLegrand Aug 27, 2018
264fcb4
metasys: for bypass mode, call status_set() with "BYPASS", not "BY"
TaorLegrand Aug 27, 2018
45ef769
metasys: treat any '\0' in the serial number as a '0'
TaorLegrand Aug 27, 2018
a930788
metasys: support some newer Meta System and Legrand devices
TaorLegrand Aug 27, 2018
227e6bd
metasys: remove useless initialisation of vars
zykh Sep 5, 2018
367eae6
metasys: retrieve also battery charge and runtime
TaorLegrand Sep 5, 2018
4e67581
HCL: update support level of some Meta System devices
zykh Sep 5, 2018
632deb4
HCL: add some Legrand devices supported by nutdrv_qx
zykh Sep 5, 2018
085c700
HCL: update support level of some Meta System devices
zykh Sep 16, 2018
1c02b58
Merge remote-tracking branch 'origin/master' into issue-441+legrand_u…
Aug 18, 2021
ce6cff5
legrand hid rules update
Aug 18, 2021
a84ab1f
issue-441: rebase onto master, excluding metasys
Aug 19, 2021
ac58d55
issue-616: legrand 600 fix input voltage
Aug 19, 2021
58ab0c4
Merge branch 'master' into issue-441+legrand_updated-3
jimklimov Aug 26, 2021
a75fa8e
Merge branch 'master' into issue-441+legrand_updated-3
blecher-at Sep 8, 2021
2d36fdd
Merge branch 'master' into issue-441+legrand_updated-3
jimklimov Sep 13, 2021
7d97403
Merge branch 'master' into issue-441+legrand_updated-3
jimklimov Sep 20, 2021
ba7656d
Update legrand-hid.c
jimklimov Sep 21, 2021
67a1028
Merge branch 'master' into issue-441+legrand_updated-3
jimklimov Sep 21, 2021
59bb0c3
Merge branch 'master' into issue-441+legrand_updated-3
jimklimov Oct 4, 2021
9747b36
Merge branch 'master' into issue-441+legrand_updated-3
blecher-at Oct 19, 2021
1318f8b
Merge remote-tracking branch 'main/issue_1023_fallout_qemu' into issu…
Oct 20, 2021
7529ee7
drivers/hidparser.c
Oct 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 81 additions & 43 deletions data/driver.list.in
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,43 @@

"LDLC" "ups" "2" "UPS-1200D" "" "blazer_usb langid_fix=0x4095"

"Legrand" "ups" "2" "Keor Multiplug" "" "nutdrv_qx"
"Legrand" "ups" "2" "Daker DK" "Serial" "nutdrv_qx"
"Legrand" "ups" "2" "Daker DK" "USB" "nutdrv_qx"
"Legrand" "ups" "2" "Daker DK Plus" "Serial" "nutdrv_qx"
"Legrand" "ups" "2" "Daker DK Plus" "USB" "nutdrv_qx"
"Legrand" "ups" "2" "Keor Line RT" "Serial" "nutdrv_qx"
"Legrand" "ups" "2" "Keor Line RT" "USB" "nutdrv_qx"
"Legrand" "ups" "2" "Keor LP" "Serial" "nutdrv_qx"
"Legrand" "ups" "2" "Keor Multiplug" "USB" "nutdrv_qx"
"Legrand" "ups" "2" "Keor S" "Serial" "nutdrv_qx"
"Legrand" "ups" "2" "Keor S" "USB" "nutdrv_qx"
"Legrand" "ups" "2" "Keor PDU" "USB" "usbhid-ups"
"Legrand" "ups" "2" "Keor SP" "USB" "usbhid-ups"
"Legrand" "ups" "2" "Keor SPX" "USB" "nutdrv_qx"
"Legrand" "ups" "4" "Megaline 1250" "Serial" "metasys"
"Legrand" "ups" "4" "Megaline 2500" "Serial" "metasys"
"Legrand" "ups" "4" "Megaline 3750" "Serial" "metasys"
"Legrand" "ups" "4" "Megaline 5000" "Serial" "metasys"
"Legrand" "ups" "4" "Megaline 5000 /2" "Serial" "metasys"
"Legrand" "ups" "4" "Megaline 6250 /2" "Serial" "metasys"
"Legrand" "ups" "4" "Megaline 7500 /2" "Serial" "metasys"
"Legrand" "ups" "4" "Megaline 8750 /2" "Serial" "metasys"
"Legrand" "ups" "4" "Megaline 10000 /2" "Serial" "metasys"
"Legrand" "ups" "2" "Niky" "Serial" "nutdrv_qx"
"Legrand" "ups" "2" "Niky" "USB" "nutdrv_qx"
"Legrand" "ups" "2" "Niky S" "Serial" "nutdrv_qx"
"Legrand" "ups" "2" "Niky S" "USB" "nutdrv_qx"
"Legrand" "ups" "4" "WHAD 800" "Serial" "metasys"
"Legrand" "ups" "4" "WHAD 1000" "Serial" "metasys"
"Legrand" "ups" "4" "WHAD 1250" "Serial" "metasys"
"Legrand" "ups" "4" "WHAD 1500" "Serial" "metasys"
"Legrand" "ups" "4" "WHAD 2000" "Serial" "metasys"
"Legrand" "ups" "4" "WHAD 2500" "Serial" "metasys"
"Legrand" "ups" "4" "WHAD CAB 1250" "Serial" "metasys"
"Legrand" "ups" "4" "WHAD CAB 2500" "Serial" "metasys"
"Legrand" "ups" "4" "WHAD HE 800" "Serial" "metasys"
"Legrand" "ups" "4" "WHAD HE 1000" "Serial" "metasys"
"Legrand" "ups" "4" "WHAD HE 1500" "Serial" "metasys"

"Lestar" "ups" "2" "MD-800E" "" "blazer_ser"

Expand All @@ -542,48 +578,50 @@
"Mecer" "ups" "2" "ME-1000-WTU" "USB" "nutdrv_qx" # http://www.comx-computers.co.za/download/mecer/ME-1000-WTU.pdf
"Mecer" "ups" "2" "ME-2000" "" "blazer_ser"

"Meta System" "ups" "1" "HF Line" "1..4 boards" "metasys"
"Meta System" "ups" "1" "HF Line \/2" "5..8 boards" "metasys"
"Meta System" "ups" "1" "HF Millennium 810" "" "metasys"
"Meta System" "ups" "1" "HF Millennium 820" "" "metasys"
"Meta System" "ups" "1" "HF TOP Line 910" "" "metasys"
"Meta System" "ups" "1" "HF TOP Line 920" "" "metasys"
"Meta System" "ups" "1" "HF TOP Line 930" "" "metasys"
"Meta System" "ups" "1" "HF TOP Line 940" "" "metasys"
"Meta System" "ups" "1" "HF TOP Line 950" "" "metasys"
"Meta System" "ups" "1" "HF TOP Line 960" "" "metasys"
"Meta System" "ups" "1" "HF TOP Line 970" "" "metasys"
"Meta System" "ups" "1" "HF TOP Line 980" "" "metasys"
"Meta System" "ups" "1" "ECO Network 750" "" "metasys"
"Meta System" "ups" "1" "ECO Network 1000" "" "metasys"
"Meta System" "ups" "1" "ECO Network 1050" "" "metasys"
"Meta System" "ups" "1" "ECO Network 1500" "" "metasys"
"Meta System" "ups" "1" "ECO Network 1800" "" "metasys"
"Meta System" "ups" "1" "ECO Network 2000" "" "metasys"
"Meta System" "ups" "1" "ECO Network 2100" "" "metasys"
"Meta System" "ups" "1" "ECO Network 2500" "" "metasys"
"Meta System" "ups" "1" "ECO Network 3000" "" "metasys"
"Meta System" "ups" "1" "ECO 305" "" "metasys"
"Meta System" "ups" "1" "ECO 308" "" "metasys"
"Meta System" "ups" "1" "ECO 311" "" "metasys"
"Meta System" "ups" "1" "ECO 511" "" "metasys"
"Meta System" "ups" "1" "ECO 516" "" "metasys"
"Meta System" "ups" "1" "ECO 519" "" "metasys"
"Meta System" "ups" "1" "ECO 522" "" "metasys"
"Meta System" "ups" "1" "ally HF 800" "" "metasys"
"Meta System" "ups" "1" "ally HF 1000" "" "metasys"
"Meta System" "ups" "1" "ally HF 1250" "" "metasys"
"Meta System" "ups" "1" "ally HF 1600" "" "metasys"
"Meta System" "ups" "1" "ally HF 2000" "" "metasys"
"Meta System" "ups" "1" "ally HF 2500" "" "metasys"
"Meta System" "ups" "1" "Megaline 1250" "" "metasys"
"Meta System" "ups" "1" "Megaline 2500" "" "metasys"
"Meta System" "ups" "1" "Megaline 3750" "" "metasys"
"Meta System" "ups" "1" "Megaline 5000" "" "metasys"
"Meta System" "ups" "1" "Megaline 6250" "" "metasys"
"Meta System" "ups" "1" "Megaline 7500" "" "metasys"
"Meta System" "ups" "1" "Megaline 8750" "" "metasys"
"Meta System" "ups" "1" "Megaline 10000" "" "metasys"
"Meta System" "ups" "4" "HF Line" "1..4 boards" "metasys"
"Meta System" "ups" "4" "HF Line /2" "5..8 boards" "metasys"
"Meta System" "ups" "4" "HF Millennium 810" "" "metasys"
"Meta System" "ups" "4" "HF Millennium 820" "" "metasys"
"Meta System" "ups" "4" "HF TOP Line 910" "" "metasys"
"Meta System" "ups" "4" "HF TOP Line 920" "" "metasys"
"Meta System" "ups" "4" "HF TOP Line 930" "" "metasys"
"Meta System" "ups" "4" "HF TOP Line 940" "" "metasys"
"Meta System" "ups" "4" "HF TOP Line 950" "" "metasys"
"Meta System" "ups" "4" "HF TOP Line 960" "" "metasys"
"Meta System" "ups" "4" "HF TOP Line 970" "" "metasys"
"Meta System" "ups" "4" "HF TOP Line 980" "" "metasys"
"Meta System" "ups" "4" "ECO Network 750" "" "metasys"
"Meta System" "ups" "4" "ECO Network 1000" "" "metasys"
"Meta System" "ups" "4" "ECO Network 1050" "" "metasys"
"Meta System" "ups" "4" "ECO Network 1500" "" "metasys"
"Meta System" "ups" "4" "ECO Network 1800" "" "metasys"
"Meta System" "ups" "4" "ECO Network 2000" "" "metasys"
"Meta System" "ups" "4" "ECO Network 2100" "" "metasys"
"Meta System" "ups" "4" "ECO Network 2500" "" "metasys"
"Meta System" "ups" "4" "ECO Network 3000" "" "metasys"
"Meta System" "ups" "4" "ECO 305" "" "metasys"
"Meta System" "ups" "4" "ECO 308" "" "metasys"
"Meta System" "ups" "4" "ECO 311" "" "metasys"
"Meta System" "ups" "4" "ECO 511" "" "metasys"
"Meta System" "ups" "4" "ECO 516" "" "metasys"
"Meta System" "ups" "4" "ECO 519" "" "metasys"
"Meta System" "ups" "4" "ECO 522" "" "metasys"
"Meta System" "ups" "4" "ally HF 800" "" "metasys"
"Meta System" "ups" "4" "ally HF 1000" "" "metasys"
"Meta System" "ups" "4" "ally HF 1250" "" "metasys"
"Meta System" "ups" "4" "ally HF 1600" "" "metasys"
"Meta System" "ups" "4" "ally HF 2000" "" "metasys"
"Meta System" "ups" "4" "ally HF 2500" "" "metasys"
"Meta System" "ups" "4" "Megaline 1250" "" "metasys"
"Meta System" "ups" "4" "Megaline 2500" "" "metasys"
"Meta System" "ups" "4" "Megaline 3750" "" "metasys"
"Meta System" "ups" "4" "Megaline 5000" "" "metasys"
"Meta System" "ups" "4" "Megaline 6250" "" "metasys"
"Meta System" "ups" "4" "Megaline 7500" "" "metasys"
"Meta System" "ups" "4" "Megaline 8750" "" "metasys"
"Meta System" "ups" "4" "Megaline 10000" "" "metasys"
"Meta System" "ups" "4" "DHEA 1000" "Serial" "metasys"
"Meta System" "ups" "4" "DHEA 1500" "Serial" "metasys"

"MGE Office Protection Systems" "ups" "5" "Protection Center 500/675 VA" "USB" "usbhid-ups"
"MGE Office Protection Systems" "ups" "5" "Protection Station 500/650/800 VA" "USB" "usbhid-ups"
Expand Down
4 changes: 2 additions & 2 deletions drivers/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ skel_LDADD = $(LDADD_DRIVERS)
# USB
USBHID_UPS_SUBDRIVERS = apc-hid.c belkin-hid.c cps-hid.c explore-hid.c \
liebert-hid.c mge-hid.c powercom-hid.c tripplite-hid.c idowell-hid.c \
openups-hid.c powervar-hid.c delta_ups-hid.c
openups-hid.c powervar-hid.c delta_ups-hid.c legrand-hid.c
usbhid_ups_SOURCES = usbhid-ups.c libhid.c libusb.c hidparser.c \
usb-common.c $(USBHID_UPS_SUBDRIVERS)
usbhid_ups_LDADD = $(LDADD_DRIVERS) $(LIBUSB_LIBS) -lm
Expand Down Expand Up @@ -305,7 +305,7 @@ dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h bcmxcp_ser.h \
nutdrv_qx_voltronic.h nutdrv_qx_voltronic-qs.h nutdrv_qx_voltronic-qs-hex.h nutdrv_qx_zinto.h \
xppc-mib.h huawei-mib.h eaton-ats16-nmc-mib.h eaton-ats16-nm2-mib.h apc-ats-mib.h raritan-px2-mib.h eaton-ats30-mib.h \
apc-pdu-mib.h eaton-pdu-genesis2-mib.h eaton-pdu-marlin-mib.h \
eaton-pdu-pulizzi-mib.h eaton-pdu-revelation-mib.h emerson-avocent-pdu-mib.h \
eaton-pdu-pulizzi-mib.h eaton-pdu-revelation-mib.h emerson-avocent-pdu-mib.h legrand-hid.h \
hpe-pdu-mib.h powervar-hid.h delta_ups-hid.h generic_modbus.h

# Define a dummy library so that Automake builds rules for the
Expand Down
9 changes: 8 additions & 1 deletion drivers/hidparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void GetValue(const unsigned char *Buf, HIDData_t *pData, long *pValue)

int Weight, Bit;
unsigned long mask, signbit, magMax, magMin;
long value = 0;
long value = 0, range;

Bit = pData->Offset + 8; /* First byte of report is report ID */

Expand All @@ -464,6 +464,13 @@ void GetValue(const unsigned char *Buf, HIDData_t *pData, long *pValue)
}
}

range = pData->LogMax - pData->LogMin + 1;
if (range <= 0) {
/* makes no sense, give up */
*pValue = value;
return;
}

/* translate Value into a signed/unsigned value in the range
LogMin..LogMax, as appropriate. See HID spec, p.38: "If both the
Logical Minimum and Logical Maximum extents are defined as
Expand Down
Loading