I don't quite get what's going on here (from 50daef5):
|
/* HV models */ |
|
/* 230V */ |
|
case 220: |
|
case 230: |
|
case 240: |
|
switch ((long)value) |
|
{ |
|
case 200: |
|
case 208: |
|
/* line-interactive and online also support 200 / 208 V |
|
* So break on offline models */ |
|
if ((mge_type & 0xFF00) < MGE_DEFAULT) |
|
return NULL; |
|
/* FIXME: Some European models ("5130 RT 3000") also |
|
* support both HV values */ |
|
if (country_code == COUNTRY_EUROPE_208) |
|
break; |
|
case 220: |
|
case 230: |
|
case 240: |
|
break; |
|
default: |
|
return NULL; |
|
} |
|
break; |
|
|
Why break at that point on country_code? (that switch case falls through to another break)
Is the Eaton/Powerware (I suppose) "5130 RT 3000" an offline model (i.e. mge_type < MGE_DEFAULT) and the comment means that there are offline models such as that one, with country_code == COUNTRY_EUROPE_208 (but the only report we have of a "5130 RT 3000" seems to have UPS.PowerSummary.Country set to 0, i.e. COUNTRY_EUROPE), which support both HV values? (but then the country_code check should be before the mge_type check, no?)
And, if that is the case, shouldn't the same criterion be used in the check done a few lines above, when nominal voltage is 200/208 V and the checked value is 220-240 V?
Something else?
@aquette (asking you because you were the original author of the patch... and because Eaton), can you please shed some light on this?
I don't quite get what's going on here (from 50daef5):
nut/drivers/mge-hid.c
Lines 739 to 764 in 5d97d07
Why
breakat that point oncountry_code? (that switch case falls through to anotherbreak)Is the Eaton/Powerware (I suppose) "5130 RT 3000" an offline model (i.e.
mge_type < MGE_DEFAULT) and the comment means that there are offline models such as that one, withcountry_code == COUNTRY_EUROPE_208(but the only report we have of a "5130 RT 3000" seems to haveUPS.PowerSummary.Countryset to0, i.e.COUNTRY_EUROPE), which support both HV values? (but then thecountry_codecheck should be before themge_typecheck, no?)And, if that is the case, shouldn't the same criterion be used in the check done a few lines above, when nominal voltage is 200/208 V and the checked value is 220-240 V?
Something else?
@aquette (asking you because you were the original author of the patch... and because Eaton), can you please shed some light on this?