Skip to content

Bluetooth support fix#2

Open
mooomooo wants to merge 2 commits into
FlyingSamson:bluetooth-supportfrom
mooomooo:bluetooth-support-fix
Open

Bluetooth support fix#2
mooomooo wants to merge 2 commits into
FlyingSamson:bluetooth-supportfrom
mooomooo:bluetooth-support-fix

Conversation

@mooomooo

Copy link
Copy Markdown

Handle some DeprecationWarnings when running on Inkscape 1.0, should negligibly impact behavior.

Comment thread silhouette/Graphtec.py Outdated
print("Searching for bt devices on OSX", file=log)
# on osx a rfcomm port is created and linked automatically when the cameo is connected
# TODO add support for other machines. I would expect files like CAMEO3-... and PORTRAIT2-...
pat = re.compile("tty\.(PORTRAIT2|CAMEO3|CAMEO4)-.*")

@FlyingSamson FlyingSamson Sep 27, 2020

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Are you sure about this? Normally I would expect the old code to match a dot character (".") whereas the new code would match any character but newlines?

We probably should use a raw string here, too. However, the current branch version using PyBluez does not have this problem anyways.

Comment thread silhouette/Graphtec.py Outdated
else: # linux
print("Searching for bt devices on Linux", file=log)

pat = re.compile("tty\.(PORTRAIT2|CAMEO3|CAMEO4)-?.*")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Same as above

Comment thread silhouette/Graphtec.py
self.draw_mm_cmd(bbox['ury'], bbox['llx'])]

# potentially long command string needs extra care
self.safe_send_command(cmd_list)

@FlyingSamson FlyingSamson Sep 27, 2020

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yes I also stumbled over that one, but I think it only occurs if sending nothing to the device, no? If that were the case, this should probably be handled from the plugin itself, i.e. we should test directly when the extensions is launched, whether a object/path was currently selected.

But it probably doesn't hurt to catch it here also. Just saying.

FlyingSamson pushed a commit that referenced this pull request Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants