Skip to content

Commit 55277d5

Browse files
author
Juergen Weigert
committed
1.17, no dev.reset per default.
1 parent c6971e8 commit 55277d5

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

sendto_silhouette.inx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575

7676
<page name='about' _gui-text='About'>
7777
<param name="about_who" type="description">inkscape-silhouette extension from https://github.com/jnweiger/inkscape-silhouette by Jürgen Weigert [juewei@fabmail.org] and contributors</param>
78-
<!-- Keep in sync with sendto_silhouette.py line 103 __version__ = ... -->
79-
<param name="about_version" type="description">Version 1.16</param>
78+
<!-- Keep in sync with sendto_silhouette.py line 78 __version__ = ... -->
79+
<param name="about_version" type="description">Version 1.17</param>
8080
</page>
8181
</param>
8282

sendto_silhouette.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@
7272
# Added misc/silhouette_move.py misc/silhouette_cut.py, misc/endless_clock.py
7373
# 2016-01-15 jw, v1.15 -- ubuntu loads the wrong usb library.
7474
# 2016-05-15 jw, v1.16 -- merged regmarks code from https://github.com/fablabnbg/inkscape-silhouette/pull/23
75+
# 2016-05-17 jw, v1.17 -- fix avoid dev.reset in Graphtec.py, fix helps with
76+
# https://github.com/fablabnbg/inkscape-silhouette/issues/10
7577

76-
__version__ = '1.16' # Keep in sync with sendto_silhouette.inx ca line 42
78+
__version__ = '1.17' # Keep in sync with sendto_silhouette.inx ca line 79
7779
__author__ = 'Juergen Weigert <juewei@fabmail.org> and contributors'
7880

7981
import sys, os, shutil, time, logging, tempfile

silhouette/Graphtec.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@
1313
# plot(bboxonly=None) is now the special case for not doing anything. False is normal plot.
1414
# 2015-06-05 Renamed cut_bbox() to find_bbox(). It does not cut anything.
1515
# 2015-06-06 refactored plot_cmds() from plot().
16+
# 2016-05-16 no reset per default, this helps usbip.
1617

1718
from __future__ import print_function
1819
import sys, time, re
1920

21+
usb_reset_needed = False # https://github.com/fablabnbg/inkscape-silhouette/issues/10
22+
2023
sys_platform = sys.platform.lower()
2124
if sys_platform.startswith('win'):
2225
import usb.core
@@ -225,14 +228,15 @@ def __init__(self, log=sys.stderr, no_device=False, progress_cb=None):
225228
print(msg, file=sys.stderr)
226229
sys.exit(0)
227230

228-
for i in range(5):
229-
try:
230-
dev.reset();
231-
break
232-
except usb.core.USBError as e:
233-
print("reset failed: ", e, file=self.log)
234-
print("retrying reset in 5 sec", file=self.log)
235-
time.sleep(5)
231+
if usb_reset_needed:
232+
for i in range(5):
233+
try:
234+
dev.reset();
235+
break
236+
except usb.core.USBError as e:
237+
print("reset failed: ", e, file=self.log)
238+
print("retrying reset in 5 sec", file=self.log)
239+
time.sleep(5)
236240

237241
dev.set_configuration()
238242
try:

0 commit comments

Comments
 (0)