-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2442 from jimklimov/issue-2380
`mge-hid.c`: extend `mge_model_names[]` for Eaton 5SC and 5PX series
- Loading branch information
Showing
2 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* | ||
* Copyright (C) | ||
* 2003 - 2015 Arnaud Quette <[email protected]> | ||
* 2015 - 2016 Eaton / Arnaud Quette <[email protected]> | ||
* 2015 - 2024 Eaton / Arnaud Quette <[email protected]> | ||
* | ||
* Sponsored by MGE UPS SYSTEMS <http://www.mgeups.com> | ||
* | ||
|
@@ -50,7 +50,7 @@ | |
# endif | ||
#endif | ||
|
||
#define MGE_HID_VERSION "MGE HID 1.46" | ||
#define MGE_HID_VERSION "MGE HID 1.47" | ||
|
||
/* (prev. MGE Office Protection Systems, prev. MGE UPS SYSTEMS) */ | ||
/* Eaton */ | ||
|
@@ -63,18 +63,18 @@ | |
#define POWERWARE_VENDORID 0x0592 | ||
|
||
/* Hewlett Packard */ | ||
#define HP_VENDORID 0x03f0 | ||
#define HP_VENDORID 0x03f0 | ||
|
||
/* AEG */ | ||
#define AEG_VENDORID 0x2b2d | ||
#define AEG_VENDORID 0x2b2d | ||
|
||
/* Note that normally this VID is handled by Liebert/Phoenixtec HID mapping, | ||
* here it is just for for AEG PROTECT NAS devices: */ | ||
/* Phoenixtec Power Co., Ltd */ | ||
#define PHOENIXTEC 0x06da | ||
#define PHOENIXTEC 0x06da | ||
|
||
/* IBM */ | ||
#define IBM_VENDORID 0x04b3 | ||
#define IBM_VENDORID 0x04b3 | ||
|
||
#if !((defined SHUT_MODE) && SHUT_MODE) | ||
#include "usb-common.h" | ||
|
@@ -131,7 +131,7 @@ typedef enum { | |
MGE_PULSAR_M_2200, | ||
MGE_PULSAR_M_3000, | ||
MGE_PULSAR_M_3000_XL, | ||
EATON_5P = 0x500 /* Eaton 5P / 5PX series */ | ||
EATON_5P = 0x500 /* Eaton 5P / 5PX / 5SC series */ | ||
} models_type_t; | ||
|
||
/* Default to line-interactive or online (ie, not offline). | ||
|
@@ -207,14 +207,14 @@ static long round (double value) | |
static long round (LDOUBLE value) | ||
# endif | ||
{ | ||
long intpart; | ||
long intpart; | ||
|
||
intpart = (long)value; | ||
value = value - intpart; | ||
if (value >= 0.5) | ||
intpart++; | ||
intpart = (long)value; | ||
value = value - intpart; | ||
if (value >= 0.5) | ||
intpart++; | ||
|
||
return intpart; | ||
return intpart; | ||
} | ||
#endif /* HAVE_DECL_ROUND */ | ||
|
||
|
@@ -1123,6 +1123,27 @@ static models_name_t mge_model_names [] = | |
{ "Eaton 5P", "1150", EATON_5P, "5P 1150" }, | ||
{ "Eaton 5P", "1550", EATON_5P, "5P 1550" }, | ||
|
||
/* Eaton 5PX, names assumed per VA numbers in | ||
* https://www.eaton.com/gb/en-gb/catalog/backup-power-ups-surge-it-power-distribution/eaton-5px-ups-emea.html#tab-2 | ||
* and a user report in https://github.com/networkupstools/nut/issues/2380 | ||
* Fixes for actual product/model names reported via USB are welcome | ||
*/ | ||
{ "Eaton 5PX", "1500", EATON_5P, NULL }, | ||
{ "Eaton 5PX", "2200", EATON_5P, NULL }, | ||
{ "Eaton 5PX", "3000", EATON_5P, NULL }, | ||
|
||
/* Eaton 5SC, names assumed per VA numbers in | ||
* https://www.eaton.com/gb/en-gb/site-search.html.searchTerm$5sc.tabs$all.html | ||
* and a user report in https://github.com/networkupstools/nut/issues/2380 | ||
* Fixes for actual product/model names reported via USB are welcome | ||
*/ | ||
{ "Eaton 5SC", "500", EATON_5P, NULL }, | ||
{ "Eaton 5SC", "750", EATON_5P, NULL }, | ||
{ "Eaton 5SC", "1000", EATON_5P, NULL }, | ||
{ "Eaton 5SC", "1500", EATON_5P, NULL }, | ||
{ "Eaton 5SC", "2200", EATON_5P, NULL }, | ||
{ "Eaton 5SC", "3000", EATON_5P, NULL }, | ||
|
||
/* Pulsar M models */ | ||
{ "PULSAR M", "2200", MGE_PULSAR_M_2200, NULL }, | ||
{ "PULSAR M", "3000", MGE_PULSAR_M_3000, NULL }, | ||
|