Skip to content

Commit ecec5ff

Browse files
authored
Merge Carglglz/develop for upydevice 0.3.4 release
Merge develop branch for upydevice 0.3.4 release
2 parents 38da5ed + 8955dbf commit ecec5ff

18 files changed

+605
-198
lines changed

changelog.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,23 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
66

7-
## [0.3.4] Unreleased Github Repo [develop]
8-
7+
## [0.3.5] Unreleased Github Repo [develop]
8+
## [0.3.4] - 2022-03-04
9+
### Fix
10+
- `WebSocketDevice` double unwanted `super().__init__` bug.
11+
- Load time in MacOS caused by bleak/corebluetooth, only if BleDevice
12+
- Allow mdns `.local` name in WebSecureREPL, (ssl checkhostname / auth server.)
13+
- `WebSocketDevice` receive frame errors
14+
- `SerialDevice` follow command parsing errors
15+
- `BleDevice` follow command parsing errors
16+
- `is_reachable` method for `WebSocketDevice` if ip is mdns .local name
17+
- pipe option for `BleDevice` `wr_cmd` method.
18+
### Added
19+
- Indicate websocket port in ip address as `ip:port` format
20+
- Allow `password:passphrase` format for `WebSocketDevice` password that sets ssl/auth
21+
to `True` if present.
22+
- `address` property for all device types.
23+
- `flush_conn` for `BleDevice` for compatibility
924
## [0.3.3] 2021-12-16
1025
### Added
1126
- `Host Name` in `__repr__` command device info

examples/pyqt-gui/pyqt_esp32_servo_slider.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
from PyQt5.QtWidgets import QSlider, QHBoxLayout, QLabel
44
from PyQt5.QtCore import Qt
55
from upydevice import Device
6+
import os
7+
8+
os.environ['QT_MAC_WANTS_LAYER'] = '1'
69

710
_SERVO_PIN = 14
811

examples/pyqt-gui/pyqt_pyboard_interval_timer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
from PyQt5.QtMultimedia import QSound
1111
import time
1212
from datetime import timedelta
13+
import os
14+
15+
os.environ['QT_MAC_WANTS_LAYER'] = '1'
1316
# ICON_RED_LED_OFF = os.path.join(os.getcwd(), "icons/xsled-red-off.png")
1417
# ICON_RED_LED_ON = os.path.join(os.getcwd(), "icons/xsled-red-on.png")
1518
TIMER_FX = os.path.join(os.getcwd(), "sounds/beep-07a.wav")

examples/pyqt-gui/pyqt_pyboard_knob_leds_discrete.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
from PyQt5.QtWidgets import QHBoxLayout, QDial
44
from PyQt5.QtCore import Qt
55
from upydevice import Device
6+
import os
7+
8+
os.environ['QT_MAC_WANTS_LAYER'] = '1'
69

710

811
class KnobsLedpanel(QWidget):

examples/pyqt-gui/pyqt_pyboard_knobs_leds_cont.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
from PyQt5.QtWidgets import QHBoxLayout, QDial
44
from PyQt5.QtCore import Qt
55
from upydevice import Device
6+
import os
7+
8+
os.environ['QT_MAC_WANTS_LAYER'] = '1'
69

710

811
class KnobsLedpanel(QWidget):

examples/pyqt-gui/pyqt_pyboard_servo_key_controller.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
from PyQt5.QtWidgets import QHBoxLayout, QLabel
44
from PyQt5.QtCore import Qt
55
from upydevice import Device
6+
import os
7+
8+
os.environ['QT_MAC_WANTS_LAYER'] = '1'
69

710

811
class KeyController(QWidget):

examples/pyqt-gui/pyqt_pyboard_servo_slider.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
from PyQt5.QtWidgets import QSlider, QHBoxLayout, QLabel
44
from PyQt5.QtCore import Qt
55
from upydevice import Device
6+
import os
7+
8+
os.environ['QT_MAC_WANTS_LAYER'] = '1'
69

710

811
class Slider(QWidget):

examples/pyqt-gui/pyqt_pyboard_switch_toggle_led.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from PyQt5.QtCore import (QObject, QRunnable, QThreadPool, pyqtSignal,
88
pyqtSlot)
99
import time
10-
10+
os.environ['QT_MAC_WANTS_LAYER'] = '1'
1111
ICON_RED_LED_OFF = os.path.join(os.getcwd(), "icons/xsled-red-off.png")
1212
ICON_RED_LED_ON = os.path.join(os.getcwd(), "icons/xsled-red-on.png")
1313

@@ -200,7 +200,7 @@ def toggle_led():
200200
led_widget.setWindowTitle("Upydevice Button Led Toggle")
201201
led_widget.show()
202202

203-
app.exec_()
203+
sys.exit(app.exec_())
204204

205205

206206
if __name__ == "__main__":

examples/pyqt-gui/pyqt_toggle_led.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def main():
5656

5757
# SerialDevice
5858
print("Connecting to device...")
59-
mydev = Device("/dev/tty.SLAB_USBtoUART", init=True)
59+
mydev = Device("/dev/cu.usbserial-016418E3", init=True)
6060

6161
# # WebSocketDevice
6262
# mydev = Device('192.168.1.51', 'keyespw', init=True)
@@ -71,7 +71,7 @@ def main():
7171
led_widget.setWindowTitle("Upydevice Button Led Toggle")
7272
led_widget.show()
7373

74-
app.exec_()
74+
sys.exit(app.exec_())
7575

7676

7777
if __name__ == "__main__":

examples/scripts/mpy_do_this.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
def main():
66
# SerialDevice
7-
mydev = Device('/dev/tty.SLAB_USBtoUART', init=True)
7+
mydev = Device('/dev/tty.usbmodem3370377430372', init=True)
88

99
# WebSocketDevice
1010
# mydev = Device('192.168.1.73', 'keyespw', init=True)
1111

1212
# # BleDevice
1313
# mydev = Device('9998175F-9A91-4CA2-B5EA-482AFC3453B9', init=True)
1414

15-
mydev.wr_cmd('led.value(not led.value())')
16-
15+
# mydev.wr_cmd('led.value(not led.value())')
16+
mydev.wr_cmd('led.toggle()')
1717
mydev.disconnect()
1818

1919

0 commit comments

Comments
 (0)