PL PCDU parameter update #247
@ -292,7 +292,7 @@ def pack_pl_pcdu_commands( # noqa C901: Complexity is okay here.
|
|||||||
if op_code == OpCode.UPDATE_I_UPPER_LIMIT:
|
if op_code == OpCode.UPDATE_I_UPPER_LIMIT:
|
||||||
q.add_log_cmd(Info.UPDATE_I_UPPER_LIMIT)
|
q.add_log_cmd(Info.UPDATE_I_UPPER_LIMIT)
|
||||||
print("Select device to update lower current limit for: ")
|
print("Select device to update lower current limit for: ")
|
||||||
param_id = dev_select_to_lower_i_update_param_id(dev_select_prompt(True))
|
param_id = dev_select_to_upper_i_update_param_id(dev_select_prompt(True))
|
||||||
new_param_value = float(
|
new_param_value = float(
|
||||||
input("Please specify new parameter value as a double: ")
|
input("Please specify new parameter value as a double: ")
|
||||||
)
|
)
|
||||||
@ -582,7 +582,7 @@ def dev_select_prompt(skip_ssr: bool) -> DevSelect:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
def dev_select_to_lower_i_update_param_id(dev_select: DevSelect) -> ParamId:
|
def dev_select_to_upper_i_update_param_id(dev_select: DevSelect) -> ParamId:
|
||||||
param_id = None
|
param_id = None
|
||||||
if dev_select == DevSelect.DRO:
|
if dev_select == DevSelect.DRO:
|
||||||
param_id = ParamId.DRO_I_UPPER_BOUND
|
param_id = ParamId.DRO_I_UPPER_BOUND
|
||||||
@ -592,7 +592,7 @@ def dev_select_to_lower_i_update_param_id(dev_select: DevSelect) -> ParamId:
|
|||||||
param_id = ParamId.TX_I_UPPER_BOUND
|
param_id = ParamId.TX_I_UPPER_BOUND
|
||||||
elif dev_select == DevSelect.MPA:
|
elif dev_select == DevSelect.MPA:
|
||||||
param_id = ParamId.MPA_I_UPPER_BOUND
|
param_id = ParamId.MPA_I_UPPER_BOUND
|
||||||
elif dev_select == DevSelect.MPA:
|
elif dev_select == DevSelect.HPA:
|
||||||
param_id = ParamId.HPA_I_UPPER_BOUND
|
param_id = ParamId.HPA_I_UPPER_BOUND
|
||||||
if param_id is None:
|
if param_id is None:
|
||||||
raise ValueError("invalid parameter ID")
|
raise ValueError("invalid parameter ID")
|
||||||
@ -611,7 +611,7 @@ def dev_select_to_lower_u_update_param_id(dev_select: DevSelect) -> ParamId:
|
|||||||
param_id = ParamId.TX_U_LOWER_BOUND
|
param_id = ParamId.TX_U_LOWER_BOUND
|
||||||
elif dev_select == DevSelect.MPA:
|
elif dev_select == DevSelect.MPA:
|
||||||
param_id = ParamId.MPA_U_LOWER_BOUND
|
param_id = ParamId.MPA_U_LOWER_BOUND
|
||||||
elif dev_select == DevSelect.MPA:
|
elif dev_select == DevSelect.HPA:
|
||||||
param_id = ParamId.HPA_U_LOWER_BOUND
|
param_id = ParamId.HPA_U_LOWER_BOUND
|
||||||
if param_id is None:
|
if param_id is None:
|
||||||
raise ValueError("invalid parameter ID")
|
raise ValueError("invalid parameter ID")
|
||||||
@ -630,7 +630,7 @@ def dev_select_to_upper_u_update_param_id(dev_select: DevSelect) -> ParamId:
|
|||||||
param_id = ParamId.TX_U_UPPER_BOUND
|
param_id = ParamId.TX_U_UPPER_BOUND
|
||||||
elif dev_select == DevSelect.MPA:
|
elif dev_select == DevSelect.MPA:
|
||||||
param_id = ParamId.MPA_U_UPPER_BOUND
|
param_id = ParamId.MPA_U_UPPER_BOUND
|
||||||
elif dev_select == DevSelect.MPA:
|
elif dev_select == DevSelect.HPA:
|
||||||
param_id = ParamId.HPA_U_UPPER_BOUND
|
param_id = ParamId.HPA_U_UPPER_BOUND
|
||||||
if param_id is None:
|
if param_id is None:
|
||||||
raise ValueError("invalid parameter ID")
|
raise ValueError("invalid parameter ID")
|
||||||
|
Loading…
Reference in New Issue
Block a user