Skip to content

Commit

Permalink
make siglo compatible with old InfiniTime firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
mobian committed Mar 21, 2021
1 parent 48c4132 commit 9797726
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/bluetooth.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(self):
)
_, stdout, stderr = btmgmt_proc.communicate_utf8()
self.adapter_name = stdout.splitlines()[1].split(":")[0]
self.alias = None
self.scan_result = False
self.mac_address = None
super().__init__(self.adapter_name)
Expand All @@ -47,7 +48,8 @@ def set_timeout(self, timeout):
GObject.timeout_add(timeout, self.stop)

def device_discovered(self, device):
if device.alias() == "InfiniTime":
if device.alias() in ("InfiniTime", "Pinetime-JF"):
self.alias = device.alias()
self.scan_result = True
self.mac_address = device.mac_address
self.stop()
Expand Down
2 changes: 1 addition & 1 deletion src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def done_scanning(self, manager):
self.bt_spinner.set_visible(False)
if (scan_result):
self.main_info.set_text("Done Scanning...Success")
self.info_scan_pass.set_text("InfiniTime Found!\n\nAdapter Name: "+ manager.adapter_name +"\nMac Address: " + manager.get_mac_address())
self.info_scan_pass.set_text(manager.alias + " Found!\n\nAdapter Name: "+ manager.adapter_name +"\nMac Address: " + manager.get_mac_address())
self.scan_pass_box.set_visible(True)
else:
self.main_info.set_text("Done Scanning...Failed")
Expand Down

2 comments on commit 9797726

@akademsubotnik
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alexr4535 ,
My pinetime has a different alias, Y7S, could this be why I'm not able to connect with siglo?
Sincerely,
Greg

@akademsubotnik
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added Y7S to the list of aliases, and was able to connect! Woohoo!

Please sign in to comment.