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 18, 2022
1 parent bd6a649 commit 1689b4d
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 1689b4d

Please sign in to comment.