-
-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EATON HID: add missing usages and paths #2637
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Arnaud Quette <[email protected]>
Signed-off-by: Arnaud Quette <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
drivers/mge-hid.c
Outdated
/* { "device.usb.version", ST_FLAG_STRING, 20, "UPS.System.USB.iVersion", NULL, NULL, HU_FLAG_STATIC, stringid_conversion },*/ | ||
|
||
{ "device.usb.version", ST_FLAG_STRING, 20, "UPS.System.USB.iVersion", NULL, NULL, HU_FLAG_STATIC, stringid_conversion }, /* FIXME */ | ||
{ "device.usb.mode", ST_FLAG_STRING, 20, "UPS.System.USB.Mode", NULL, NULL, HU_FLAG_STATIC, stringid_conversion }, /* FIXME */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this one is useful, and not a string (1 to set in bootloader )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented
drivers/mge-hid.c
Outdated
|
||
{ "device.usb.version", ST_FLAG_STRING, 20, "UPS.System.USB.iVersion", NULL, NULL, HU_FLAG_STATIC, stringid_conversion }, /* FIXME */ | ||
{ "device.usb.mode", ST_FLAG_STRING, 20, "UPS.System.USB.Mode", NULL, NULL, HU_FLAG_STATIC, stringid_conversion }, /* FIXME */ | ||
{ "device.gateway.power.rate", ST_FLAG_STRING, 20, "UPS.System.Gateway.PowerRate", NULL, NULL, HU_FLAG_STATIC, stringid_conversion }, /* FIXME */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto above, don't think it's useful, and not a string (level of power provided by the UPS to the network card
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented
@@ -1292,7 +1294,7 @@ static hid_info_t mge_hid2nut[] = | |||
/* Refer to Note 1 (This point will need more clarification!) | |||
{ "battery.charger.status", 0, 0, "UPS.BatterySystem.Charger.PresentStatus.Used", NULL, "%.0f", HU_FLAG_QUICK_POLL, eaton_abm_enabled_legacy_info }, */ | |||
/* This data is the actual ABM status information */ | |||
{ "battery.charger.status", 0, 0, "UPS.BatterySystem.Charger.Mode", NULL, "%.0f", HU_FLAG_QUICK_POLL, eaton_abm_status_info }, | |||
{ "battery.charger.status", 0, 0, "UPS.BatterySystem.Charger.Status", NULL, "%.0f", HU_FLAG_QUICK_POLL, eaton_abm_status_info }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be tested, may be avail on some units, not others. May need both Mode and Status
Unified charger info,bitmap with :
Status on bit 0-3:
0x0: Off
0x1: Charging
0x2: Floating
0x3: On, not charging
0x4: Discharging
0x5-0xF : Reserved
Mode on bit 4-6:
0: CC
1: ABM
2-7 : Reserved
Error on bit 7:
0: Good
1: In error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also ABM table commented needs to be changes?
drivers/mge-hid.c
Outdated
@@ -1482,8 +1484,9 @@ static hid_info_t mge_hid2nut[] = | |||
{ "outlet.1.id", 0, 0, "UPS.OutletSystem.Outlet.[2].OutletID", NULL, "%.0f", HU_FLAG_STATIC, NULL }, | |||
{ "outlet.1.desc", ST_FLAG_RW | ST_FLAG_STRING, 20, "UPS.OutletSystem.Outlet.[2].OutletID", NULL, "PowerShare Outlet 1", HU_FLAG_ABSENT, NULL }, | |||
{ "outlet.1.switchable", 0, 0, "UPS.OutletSystem.Outlet.[2].PresentStatus.Switchable", NULL, "%s", HU_FLAG_STATIC, yes_no_info }, | |||
{ "outlet.1.status", 0, 0, "UPS.OutletSystem.Outlet.[2].PresentStatus.SwitchOn/Off", NULL, "%s", 0, on_off_info }, | |||
{ "outlet.1.status", 0, 0, "UPS.OutletSystem.Outlet.[1].Status", NULL, "%s", 0, on_off_info }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto, may need both.... this one provides more than just on/off
Global status of the load segment :
0 : Not powered
1 : Not protected
2 : Protected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so to leave { "outlet.2.status", 0, 0, "UPS.OutletSystem.Outlet.[3].PresentStatus.SwitchOn/Off", NULL, "%s", 0, on_off_info }, ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0,1,2 thius mean = NULL, "%.2f", 0, NULL }, or NULL, "%.0f", HU_FLAG_STATIC, NULL },
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
means a lookup function, something like:
static info_lkp_t eaton_enable_disable_info[] = {
{ 0, "not powered", NULL, NULL },
{ 1, "not protected", NULL, NULL },
{ 2, "protected", NULL, NULL },
{ 0, NULL, NULL, NULL }
};
drivers/mge-hid.c
Outdated
/* FIXME: should better use UPS.OutletSystem.Outlet.[1].Status? */ | ||
{ "outlet.1.idesignator", 0, 0, "UPS.OutletSystem.Outlet.[1].iDesignator", NULL, "%s", 0, on_off_info }, /* needs to check */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stringid_conversion (thats an iValue, so indexed string), not on_off ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
drivers/mge-hid.c
Outdated
/* 0: The outlet is not ECO controlled. / 1 : The outlet is ECO controlled. => Readonly! use some yes_no_info | ||
{ "outlet.1.ecocontrol", 0, 0, "UPS.OutletSystem.Outlet.[2].ECOControl", NULL, "%.2f", 0, NULL },*/ | ||
/* 0: The outlet is not ECO controlled. / 1 : The outlet is ECO controlled. => Readonly! use some yes_no_info */ | ||
{ "outlet.1.ecocontrol", 0, 0, "UPS.OutletSystem.Outlet.[2].ECOControl", NULL, "%.2f", 0, NULL }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nut suitable name to be found!
need a lookup function, like on_off, but for:
0 : The outlet is not ECO controlled.
1 : The outlet is ECO controlled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added function
Signed-off-by: DaRK AnGeL <[email protected]>
Ref: #2495 2nding @jimklimov comment to base of master, and include my base PR in yours |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be tested, may be avail on some units, not others. May need both Mode and Status
Unified charger info,bitmap with :
Status on bit 0-3:
0x0: Off
0x1: Charging
0x2: Floating
0x3: On, not charging
0x4: Discharging
0x5-0xF : Reserved
Mode on bit 4-6:
0: CC
1: ABM
2-7 : Reserved
Error on bit 7:
0: Good
1: In error
So this is not right table? and needs to change as you wrote above?
- Charger ABM mode | Charging | Floating | Resting | Discharging | Disabled | Disabled
- UPS.BatterySystem.Charger.Mode | 1 | 3 | 4 | 2 | 6 | 6
Signed-off-by: DaRK AnGeL <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
Found that "Editing" a PR now allows to change the target branch, so this instance is now the main one of the flock. |
@arnaudquette-eaton @jimklimov I made some changes from comments, please check when you have time |
@@ -689,6 +689,12 @@ static info_lkp_t pegasus_yes_no_info[] = { | |||
{ 0, NULL, NULL, NULL } | |||
}; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added function like yes_no
drivers/mge-hid.c
Outdated
@@ -864,17 +870,25 @@ static info_lkp_t eaton_converter_online_info[] = { | |||
{ 0, NULL, NULL, NULL } | |||
}; | |||
|
|||
static info_lkp_t eaton_outlet_status_enable_disable_info[] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added func for outlet_status
Signed-off-by: DaRK AnGeL <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
@jimklimov what is error about ?
|
Signed-off-by: DaRK AnGeL <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
becouse changed |
Signed-off-by: DaRK AnGeL <[email protected]>
ECO Control = With an efficient electrical design and the EcoControl function |
Signed-off-by: DaRK AnGeL <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
@jimklimov please check if can be merged |
Signed-off-by: DaRK AnGeL <[email protected]>
Signed-off-by: DaRK AnGeL <[email protected]>
@@ -45,6 +45,7 @@ static struct { | |||
{ "BOOST", "VOLTAGE BOOST", 1 }, | |||
{ "CAL", "CALIBRATION", 1 }, | |||
{ "BYPASS", "BYPASS", 2 }, | |||
{ "ECO", "ECO", 2 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Severity 2 seems a bit excessive here (putting ECO
in the same category as LB
) - Severity 1 instead?
Charger type
Item of charger collection, ID of charger |
Something on: |
@jimklimov Maybe we can merge this pr as it's ready for ECO, if other will take more time maybe to finish? |
…'work/2495' NOTE: ECO entries in code and docs go before the ALARM entries. Signed-off-by: Jim Klimov <[email protected]>
Adding HE/ECO mode, Bypass On/Off for Eaton USB UPS Online Models + Adding Missing usages and paths
Continue work for #2636
Fixes #2485
Ref #2495
Added: