Skip to content

Commit

Permalink
Merge pull request bitcraze#484 from jonasdn/radio_uri
Browse files Browse the repository at this point in the history
Only set address from config if it's a radio uri
  • Loading branch information
krichardsson authored Mar 16, 2021
2 parents 93158ef + f363307 commit 1a936a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cfclient/ui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,9 @@ def _set_address(self):
address = 0xE7E7E7E7E7
try:
link_uri = Config().get("link_uri")
if len(link_uri) > 0:
address = int(link_uri.split('/')[-1], 16)
if link_uri.startswith("radio://"):
if len(link_uri) > 0:
address = int(link_uri.split('/')[-1], 16)
except Exception as err:
logger.warn('failed to parse address from config: %s' % str(err))
finally:
Expand Down

0 comments on commit 1a936a4

Please sign in to comment.