simple-carla 2.1.1__tar.gz → 2.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {simple_carla-2.1.1 → simple_carla-2.1.2}/PKG-INFO +1 -1
- {simple_carla-2.1.1 → simple_carla-2.1.2}/pyproject.toml +1 -1
- {simple_carla-2.1.1 → simple_carla-2.1.2}/simple_carla/__init__.py +1 -1
- {simple_carla-2.1.1 → simple_carla-2.1.2}/tests/qt_carla.py +24 -27
- {simple_carla-2.1.1 → simple_carla-2.1.2}/.gitignore +0 -0
- {simple_carla-2.1.1 → simple_carla-2.1.2}/LICENSE +0 -0
- {simple_carla-2.1.1 → simple_carla-2.1.2}/README.md +0 -0
- {simple_carla-2.1.1 → simple_carla-2.1.2}/simple_carla/plugin_dialog.py +0 -0
- {simple_carla-2.1.1 → simple_carla-2.1.2}/simple_carla/qt.py +0 -0
- {simple_carla-2.1.1 → simple_carla-2.1.2}/simple_carla/scripts/__init__.py +0 -0
- {simple_carla-2.1.1 → simple_carla-2.1.2}/simple_carla/scripts/sc_plugin_def.py +0 -0
- {simple_carla-2.1.1 → simple_carla-2.1.2}/tests/carla.py +0 -0
@@ -18,7 +18,7 @@ build-backend = "flit_core.buildapi"
|
|
18
18
|
sc-plugin-def = "simple_carla.scripts.sc_plugin_def:main"
|
19
19
|
|
20
20
|
[bumpver]
|
21
|
-
current_version = "2.1.
|
21
|
+
current_version = "2.1.2"
|
22
22
|
version_pattern = "MAJOR.MINOR.PATCH"
|
23
23
|
commit_message = "Bump version {old_version} -> {new_version}"
|
24
24
|
commit = true
|
@@ -3,10 +3,7 @@
|
|
3
3
|
# Copyright 2024 liyang <liyang@veronica>
|
4
4
|
#
|
5
5
|
import logging
|
6
|
-
from
|
7
|
-
from PyQt5.QtCore import pyqtSlot
|
8
|
-
from PyQt5.QtWidgets import QApplication
|
9
|
-
from PyQt5.QtWidgets import QMainWindow
|
6
|
+
from PyQt5.QtCore import Qt, QCoreApplication, QObject, pyqtSignal, pyqtSlot, QTimer
|
10
7
|
from simple_carla import Plugin, PatchbayPort
|
11
8
|
from simple_carla.qt import CarlaQt, QtPlugin
|
12
9
|
|
@@ -14,22 +11,24 @@ from simple_carla.qt import CarlaQt, QtPlugin
|
|
14
11
|
APPLICATION_NAME = 'qt_carla'
|
15
12
|
|
16
13
|
|
17
|
-
class TestApp(
|
14
|
+
class TestApp(QObject):
|
18
15
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
carla = CarlaQt(
|
23
|
-
|
24
|
-
|
16
|
+
sig_finished = pyqtSignal()
|
17
|
+
|
18
|
+
def run(self):
|
19
|
+
carla = CarlaQt('carla')
|
20
|
+
for src, tgt in [
|
21
|
+
(carla.sig_engine_started, self.slot_engine_started),
|
22
|
+
(carla.sig_engine_stopped, self.slot_engine_stopped)
|
23
|
+
]: src.connect(tgt, type = Qt.QueuedConnection)
|
25
24
|
if not carla.engine_init():
|
26
|
-
|
27
|
-
if
|
28
|
-
raise
|
29
|
-
raise
|
25
|
+
audio_error = carla.get_last_error()
|
26
|
+
if audio_error:
|
27
|
+
raise RuntimeError(f'Could not start carla; possible reasons:\n{audio_error}')
|
28
|
+
raise RuntimeError('Could not start carla')
|
30
29
|
|
31
30
|
@pyqtSlot(int, int, int, int, float, str)
|
32
|
-
def
|
31
|
+
def slot_engine_started(self, *_):
|
33
32
|
logging.debug('======= Engine started ======== ')
|
34
33
|
self.meter = EBUMeter()
|
35
34
|
self.meter.sig_ready.connect(self.meter_ready)
|
@@ -37,7 +36,7 @@ class TestApp(QMainWindow):
|
|
37
36
|
self.meter.add_to_carla()
|
38
37
|
|
39
38
|
@pyqtSlot()
|
40
|
-
def
|
39
|
+
def slot_engine_stopped(self):
|
41
40
|
logging.debug('======= Engine stopped ========')
|
42
41
|
|
43
42
|
@pyqtSlot(Plugin)
|
@@ -49,13 +48,11 @@ class TestApp(QMainWindow):
|
|
49
48
|
@pyqtSlot(PatchbayPort, PatchbayPort, bool)
|
50
49
|
def meter_connect(self, self_port, other_port, state):
|
51
50
|
logging.debug('Received sig_connection_change: %s to %s: %s', self_port, other_port, state)
|
52
|
-
self.
|
51
|
+
self.finish()
|
53
52
|
|
54
|
-
def
|
55
|
-
logging.debug('Closing');
|
53
|
+
def finish(self):
|
56
54
|
CarlaQt.instance.delete()
|
57
|
-
|
58
|
-
|
55
|
+
self.sig_finished.emit()
|
59
56
|
|
60
57
|
|
61
58
|
class EBUMeter(QtPlugin):
|
@@ -86,12 +83,12 @@ if __name__ == "__main__":
|
|
86
83
|
level = logging.DEBUG,
|
87
84
|
format = "[%(filename)24s:%(lineno)-4d] %(message)s"
|
88
85
|
)
|
89
|
-
app =
|
90
|
-
|
91
|
-
|
92
|
-
|
86
|
+
app = QCoreApplication([])
|
87
|
+
tester = TestApp(app)
|
88
|
+
tester.sig_finished.connect(app.quit)
|
89
|
+
QTimer.singleShot(0, tester.run)
|
93
90
|
app.exec()
|
94
|
-
|
91
|
+
logging.debug('Done')
|
95
92
|
|
96
93
|
|
97
94
|
# end simple_carla/tests/qt_carla.py
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|