Skip to content

Commit

Permalink
Update cloud_fix.py
Browse files Browse the repository at this point in the history
  • Loading branch information
azerty9971 committed Jan 27, 2025
1 parent 88c61a7 commit cbd04ac
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def _fix_unaligned_function_or_status_range(device: XTDevice):
for fix_code in fix_dict:
ls_value[fix_code] = fix_dict[fix_code]
config_item["valueDesc"] = json.dumps(ls_value)
if strat_code in device.status_range:
device.status_range[strat_code].values = config_item["valueDesc"]
if strat_code in device.function:
device.function[strat_code].values = config_item["valueDesc"]
status_pop.append(status)
for status in status_pop:
device.status_range.pop(status)
Expand Down Expand Up @@ -80,6 +84,10 @@ def _fix_unaligned_function_or_status_range(device: XTDevice):
for fix_code in fix_dict:
ls_value[fix_code] = fix_dict[fix_code]
config_item["valueDesc"] = json.dumps(ls_value)
if strat_code in device.status_range:
device.status_range[strat_code].values = config_item["valueDesc"]
if strat_code in device.function:
device.function[strat_code].values = config_item["valueDesc"]
function_pop.append(function)
for function in function_pop:
device.function.pop(function)
Expand Down

0 comments on commit cbd04ac

Please sign in to comment.