Skip to content

Commit d99f866

Browse files
committed
Merge branch 'main' of github.com:piksel/pytouch-cube
2 parents e01e855 + d93dbef commit d99f866

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

gui/log_console.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def __init__(self, parent: Optional[QWidget]):
1111
self.setReadOnly(True)
1212
font = QFont('Fira')
1313
font.setStyleHint(QFont.Monospace, QFont.PreferDefault)
14-
font.setFamilies(['Fira', 'Source Code Pro', 'Monaco', 'Consolas', 'Monospaced', 'Courier'])
14+
if hasattr(font, 'setFamilies'):
15+
font.setFamilies(['Fira', 'Source Code Pro', 'Monaco', 'Consolas', 'Monospaced', 'Courier'])
1516
self.setFont(font)
1617

1718
logging.root.addHandler(LogConsoleHandler(self))
@@ -60,4 +61,4 @@ def __init__(self, log_console: LogConsole):
6061

6162
def emit(self, record: logging.LogRecord):
6263
self.log_console.insertPlainText(record.getMessage() + "\n")
63-
self.log_console.ensureCursorVisible()
64+
self.log_console.ensureCursorVisible()

gui/printer_select.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
class PrinterSelect(QComboBox):
1313
def __init__(self, parent: QWidget):
1414
super().__init__(parent)
15-
self.setPlaceholderText('Select Bluetooth Device...')
15+
#self.setPlaceholderText('Select Bluetooth Device...')
1616
self.setModel(PrinterDevicesModel(self))
1717

1818
@asyncSlot()
1919
async def update(self) -> None:
2020
self.clear()
21-
if is_win:
22-
candidate = await self.update_win()
23-
else:
24-
candidate = await self.update_devfs()
21+
# if is_win:
22+
candidate = await self.update_win()
23+
# else:
24+
# candidate = await self.update_devfs()
2525

2626
#if candidate is not None:
2727
index = self.findText('PT-P3', Qt.MatchContains)
@@ -59,8 +59,8 @@ async def update_devfs(self) -> Optional[str]:
5959
# printer_select.setExpanded(dev_index, True)
6060
# model_proxy.setFilterWildcard('tty*')
6161

62-
for p in QDir('/dev').entryList(['tty*'], QDir.System, QDir.Name):
63-
if p.startswith('tty.'):
62+
for p in QDir('/dev').entryList(['tty*', 'rfcomm*'], QDir.System, QDir.Name):
63+
if p.startswith('tty.') or p.startswith('rfcomm'):
6464
device = '/dev/' + p
6565

6666
self.addItem(device, device)

printables/text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ def __init__(self, text='', font_string=None, margins: Margins = None):
2424
if font_string is None:
2525
font = QFont()
2626
font.setStyleHint(QFont.Helvetica)
27-
font.setFamily('Helvetica Neue')
27+
if hasattr(font, 'setFamily'):
28+
font.setFamily('Helvetica Neue')
2829

2930
# font.Helvetica
30-
log.debug(f'Default font: {font.family()} {font.families()}, {font.toString()}')
3131
font.setPixelSize(USABLE_HEIGHT)
3232
self.font_string = font.toString()
3333
else:

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pyserial~=3.4
44
packbits~=0.6
55
pypng
66
appdirs~=1.4.4
7-
pyyaml~=5.3.1
7+
pyyaml~=5.4.0
88
qrcode~=6.1
99
qasync~=0.13.0
1010
setuptools~=41.2.0

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -865,9 +865,9 @@ lodash.map@^4.5.1:
865865
integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=
866866

867867
lodash@^4.17.12, lodash@^4.17.19, lodash@^4.17.20:
868-
version "4.17.20"
869-
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
870-
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
868+
version "4.17.21"
869+
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
870+
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
871871

872872
longest@^2.0.1:
873873
version "2.0.1"

0 commit comments

Comments
 (0)