Skip to content

Commit

Permalink
Fix read cpld_version from hex to dec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jostar Yang committed Apr 15, 2022
1 parent 243ace8 commit 5c453bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __get_cpld_version(self):
try:
cpld_path = "{}{}{}".format(SYSFS_PATH, CPLD_ADDR_MAPPING[cpld_name], '/version')
cpld_version_raw= self._api_helper.read_txt_file(cpld_path)
cpld_version[cpld_name] = "{}".format(int(cpld_version_raw,16))
cpld_version[cpld_name] = "{}".format(int(cpld_version_raw,10))
except Exception as e:
print('Get exception when read cpld')
cpld_version[cpld_name] = 'None'
Expand Down

0 comments on commit 5c453bb

Please sign in to comment.