cfclient 2017.4__py3-none-any.whl → 2025.12.1__py3-none-any.whl
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.
- cfclient/__init__.py +16 -11
- cfclient/configs/config.json +4 -3
- cfclient/configs/input/Generic_OS_X.json +1 -0
- cfclient/configs/input/Joystick.json +1 -0
- cfclient/configs/input/PS3_Mode_1.json +1 -0
- cfclient/configs/input/PS3_Mode_2.json +1 -0
- cfclient/configs/input/PS3_Mode_3.json +1 -0
- cfclient/configs/input/PS4_Mode_1.json +1 -0
- cfclient/configs/input/PS4_Mode_2.json +1 -0
- cfclient/configs/input/PS4_shoulder_btns_yaw.json +1 -0
- cfclient/configs/input/xbox360_mode1.json +1 -0
- cfclient/configs/log/PID_tuning/Attitude.json +46 -0
- cfclient/configs/log/PID_tuning/Attitude_rate.json +46 -0
- cfclient/configs/log/PID_tuning/Position.json +46 -0
- cfclient/configs/log/PID_tuning/Velocity.json +46 -0
- cfclient/configs/log/PID_tuning_components/Pitch.json +22 -0
- cfclient/configs/log/PID_tuning_components/Pitch_rate.json +22 -0
- cfclient/configs/log/PID_tuning_components/Position_x.json +22 -0
- cfclient/configs/log/PID_tuning_components/Position_y.json +22 -0
- cfclient/configs/log/PID_tuning_components/Position_z.json +22 -0
- cfclient/configs/log/PID_tuning_components/Roll.json +22 -0
- cfclient/configs/log/PID_tuning_components/Roll_rate.json +22 -0
- cfclient/configs/log/PID_tuning_components/Velocity_x.json +22 -0
- cfclient/configs/log/PID_tuning_components/Velocity_y.json +22 -0
- cfclient/configs/log/PID_tuning_components/Velocity_z.json +22 -0
- cfclient/configs/log/PID_tuning_components/Yaw.json +22 -0
- cfclient/configs/log/PID_tuning_components/Yaw_rate.json +22 -0
- cfclient/gui.py +44 -9
- cfclient/headless.py +3 -12
- cfclient/resources/log_param_doc.json +1 -0
- cfclient/ui/connectivity_manager.py +198 -0
- cfclient/ui/dialogs/about.py +53 -36
- cfclient/ui/dialogs/about.ui +23 -3
- cfclient/ui/dialogs/anchor_position_dialog.py +252 -0
- cfclient/ui/dialogs/anchor_position_dialog.ui +138 -0
- cfclient/ui/dialogs/basestation_mode_dialog.py +185 -0
- cfclient/ui/dialogs/basestation_mode_dialog.ui +186 -0
- cfclient/ui/dialogs/bootloader.py +448 -85
- cfclient/ui/dialogs/bootloader.ui +387 -134
- cfclient/ui/dialogs/cf2config.py +4 -4
- cfclient/ui/dialogs/cf2config.ui +3 -4
- cfclient/ui/dialogs/inputconfigdialogue.py +24 -19
- cfclient/ui/dialogs/inputconfigdialogue.ui +53 -30
- cfclient/ui/dialogs/lighthouse_bs_geometry_dialog.py +220 -0
- cfclient/ui/dialogs/lighthouse_bs_geometry_dialog.ui +110 -0
- cfclient/ui/dialogs/lighthouse_system_type_dialog.py +93 -0
- cfclient/ui/dialogs/lighthouse_system_type_dialog.ui +121 -0
- cfclient/ui/dialogs/logconfigdialogue.py +401 -101
- cfclient/ui/dialogs/logconfigdialogue.ui +117 -72
- cfclient/ui/icons/bl.webp +0 -0
- cfclient/ui/icons/bolt.webp +0 -0
- cfclient/ui/icons/cf21.webp +0 -0
- cfclient/ui/icons/checkmark_black.png +0 -0
- cfclient/ui/icons/checkmark_white.png +0 -0
- cfclient/ui/icons/create.png +0 -0
- cfclient/ui/icons/delete.png +0 -0
- cfclient/ui/icons/flapper.webp +0 -0
- cfclient/ui/icons/tag.webp +0 -0
- cfclient/ui/main.py +328 -258
- cfclient/ui/main.ui +184 -80
- cfclient/ui/pluginhelper.py +7 -1
- cfclient/ui/pose_logger.py +116 -0
- cfclient/ui/tab_toolbox.py +208 -0
- cfclient/ui/tabs/ColorLEDTab.py +752 -0
- cfclient/ui/tabs/ConsoleTab.py +48 -13
- cfclient/ui/{toolboxes → tabs}/CrtpSharkToolbox.py +19 -34
- cfclient/ui/tabs/ExampleTab.py +9 -16
- cfclient/ui/tabs/FlightTab.py +437 -325
- cfclient/ui/tabs/GpsTab.py +14 -20
- cfclient/ui/tabs/LEDRingTab.py +277 -0
- cfclient/ui/tabs/LogBlockDebugTab.py +20 -27
- cfclient/ui/tabs/LogBlockTab.py +35 -35
- cfclient/ui/tabs/LogClientTab.py +85 -0
- cfclient/ui/tabs/LogTab.py +50 -27
- cfclient/ui/tabs/ParamTab.py +443 -57
- cfclient/ui/tabs/PlotTab.py +23 -25
- cfclient/ui/tabs/TuningTab.py +292 -0
- cfclient/ui/tabs/__init__.py +12 -2
- cfclient/ui/tabs/colorLEDTab.ui +624 -0
- cfclient/ui/tabs/consoleTab.ui +46 -0
- cfclient/ui/tabs/flightActionContainer.ui +103 -0
- cfclient/ui/tabs/flightTab.ui +724 -237
- cfclient/ui/tabs/{ledTab.ui → ledRingTab.ui} +63 -46
- cfclient/ui/tabs/lighthouse_tab.py +714 -0
- cfclient/ui/tabs/lighthouse_tab.ui +430 -0
- cfclient/ui/tabs/locopositioning_tab.py +606 -389
- cfclient/ui/tabs/locopositioning_tab.ui +370 -253
- cfclient/ui/tabs/logClientTab.ui +52 -0
- cfclient/ui/tabs/logTab.ui +1 -1
- cfclient/ui/tabs/paramTab.ui +204 -3
- cfclient/ui/tabs/tuningTab.ui +773 -0
- cfclient/ui/widgets/ai.py +37 -39
- cfclient/ui/widgets/hexspinbox.py +16 -10
- cfclient/ui/widgets/plotter.ui +39 -47
- cfclient/ui/widgets/plotwidget.py +57 -22
- cfclient/ui/widgets/super_slider.py +112 -0
- cfclient/ui/wizards/__init__.py +0 -0
- cfclient/ui/wizards/bslh_1.png +0 -0
- cfclient/ui/wizards/bslh_2.png +0 -0
- cfclient/ui/wizards/bslh_3.png +0 -0
- cfclient/ui/wizards/bslh_4.png +0 -0
- cfclient/ui/wizards/bslh_5.png +0 -0
- cfclient/ui/wizards/lighthouse_geo_bs_estimation_wizard.py +465 -0
- cfclient/utils/config_manager.py +5 -4
- cfclient/utils/input/__init__.py +77 -19
- cfclient/utils/input/inputinterfaces/wiimote.py +2 -2
- cfclient/utils/input/inputreaderinterface.py +17 -7
- cfclient/utils/input/inputreaders/__init__.py +17 -0
- cfclient/utils/logconfigreader.py +245 -25
- cfclient/utils/logdatawriter.py +3 -1
- cfclient/utils/periodictimer.py +1 -1
- cfclient/utils/ui.py +336 -0
- cfclient/utils/zmq_led_driver.py +5 -0
- cfclient/utils/zmq_param.py +6 -0
- cfclient/version.py +34 -1
- cfclient-2025.12.1.dist-info/METADATA +70 -0
- cfclient-2025.12.1.dist-info/RECORD +152 -0
- {cfclient-2017.4.dist-info → cfclient-2025.12.1.dist-info}/WHEEL +1 -1
- {cfclient-2017.4.dist-info → cfclient-2025.12.1.dist-info}/entry_points.txt +0 -1
- cfclient-2025.12.1.dist-info/licenses/LICENSE.txt +350 -0
- {cfclient-2017.4.dist-info → cfclient-2025.12.1.dist-info}/top_level.txt +1 -0
- cfconfig/Makefile +51 -0
- cfconfig/configblock.py +111 -0
- cfloader/__init__.py +41 -55
- cfzmq/__init__.py +22 -14
- cfclient/ui/dialogs/cf1config.py +0 -265
- cfclient/ui/dialogs/cf1config.ui +0 -260
- cfclient/ui/tab.py +0 -96
- cfclient/ui/tabs/LEDTab.py +0 -169
- cfclient/ui/toolboxes/ConsoleToolbox.py +0 -69
- cfclient/ui/toolboxes/DebugDriverToolbox.py +0 -107
- cfclient/ui/toolboxes/__init__.py +0 -45
- cfclient/ui/toolboxes/consoleToolbox.ui +0 -62
- cfclient/ui/toolboxes/debugDriverToolbox.ui +0 -86
- cfclient-2017.4.dist-info/DESCRIPTION.rst +0 -3
- cfclient-2017.4.dist-info/METADATA +0 -22
- cfclient-2017.4.dist-info/RECORD +0 -104
- cfclient-2017.4.dist-info/metadata.json +0 -1
- /cfclient/{icon-256.png → ui/icons/icon-256.png} +0 -0
- /cfclient/ui/{toolboxes → tabs}/crtpSharkToolbox.ui +0 -0
cfclient/gui.py
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
|
|
7
7
|
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
|
|
8
8
|
#
|
|
9
|
-
# Copyright (C) 2011-
|
|
9
|
+
# Copyright (C) 2011-2023 Bitcraze AB
|
|
10
10
|
#
|
|
11
11
|
# Crazyflie Nano Quadcopter Client
|
|
12
12
|
#
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
|
|
27
27
|
"""Initialization of the PC Client GUI."""
|
|
28
28
|
|
|
29
|
+
import platform
|
|
29
30
|
import sys
|
|
30
31
|
import os
|
|
31
32
|
import argparse
|
|
32
33
|
import datetime
|
|
34
|
+
import signal
|
|
33
35
|
|
|
34
36
|
import logging
|
|
35
37
|
|
|
@@ -39,6 +41,14 @@ __author__ = 'Bitcraze AB'
|
|
|
39
41
|
__all__ = []
|
|
40
42
|
|
|
41
43
|
|
|
44
|
+
def handle_sigint(app):
|
|
45
|
+
logging.info('SIGINT received, exiting ...')
|
|
46
|
+
if app:
|
|
47
|
+
app.closeAllWindows()
|
|
48
|
+
else:
|
|
49
|
+
sys.exit(0)
|
|
50
|
+
|
|
51
|
+
|
|
42
52
|
def main():
|
|
43
53
|
"""
|
|
44
54
|
Check starting conditions and start GUI.
|
|
@@ -47,9 +57,18 @@ def main():
|
|
|
47
57
|
all imports and exit verbosely if a library is not found. Disable outputs
|
|
48
58
|
to stdout and start the GUI.
|
|
49
59
|
"""
|
|
60
|
+
app = None
|
|
61
|
+
|
|
62
|
+
# Connect ctrl-c (SIGINT) signal
|
|
63
|
+
signal.signal(signal.SIGINT, lambda sig, frame: handle_sigint(app))
|
|
64
|
+
|
|
65
|
+
# Allows frozen mac build to load libraries from app bundle
|
|
66
|
+
if getattr(sys, 'frozen', False) and platform.system() == 'Darwin':
|
|
67
|
+
os.environ['DYLD_FALLBACK_LIBRARY_PATH'] = os.path.dirname(
|
|
68
|
+
sys.executable)
|
|
50
69
|
|
|
51
|
-
# Set ERROR level for
|
|
52
|
-
qtlogger = logging.getLogger('
|
|
70
|
+
# Set ERROR level for PyQt logger
|
|
71
|
+
qtlogger = logging.getLogger('PyQt6')
|
|
53
72
|
qtlogger.setLevel(logging.ERROR)
|
|
54
73
|
|
|
55
74
|
parser = argparse.ArgumentParser(
|
|
@@ -57,6 +76,10 @@ def main():
|
|
|
57
76
|
parser.add_argument('--debug', '-d', nargs=1, default='info', type=str,
|
|
58
77
|
help="set debug level "
|
|
59
78
|
"[minimal, info, debug, debugfile]")
|
|
79
|
+
parser.add_argument('--check-imports', type=bool, default=False,
|
|
80
|
+
const=True, nargs="?",
|
|
81
|
+
help="Check python imports and exit successfully" +
|
|
82
|
+
" (intended for CI)")
|
|
60
83
|
args = parser.parse_args()
|
|
61
84
|
debug = args.debug
|
|
62
85
|
|
|
@@ -100,9 +123,9 @@ def main():
|
|
|
100
123
|
sys.exit(1)
|
|
101
124
|
|
|
102
125
|
try:
|
|
103
|
-
import
|
|
126
|
+
import PyQt6 # noqa
|
|
104
127
|
except ImportError:
|
|
105
|
-
logger.critical("No
|
|
128
|
+
logger.critical("No PyQT6 installation found, exiting!")
|
|
106
129
|
sys.exit(1)
|
|
107
130
|
|
|
108
131
|
# Disable printouts from STL
|
|
@@ -131,14 +154,24 @@ def main():
|
|
|
131
154
|
logger.info("Foundation not found. Menu will show python as "
|
|
132
155
|
"application name")
|
|
133
156
|
|
|
157
|
+
if args.check_imports:
|
|
158
|
+
logger.info("All imports successful!")
|
|
159
|
+
sys.exit(0)
|
|
160
|
+
|
|
134
161
|
# Start up the main user-interface
|
|
135
162
|
from .ui.main import MainUI
|
|
136
|
-
from
|
|
137
|
-
from
|
|
163
|
+
from PyQt6.QtWidgets import QApplication
|
|
164
|
+
from PyQt6.QtGui import QIcon
|
|
165
|
+
|
|
166
|
+
if os.name == 'posix':
|
|
167
|
+
logger.info('If startup fails because of "xcb", install dependency with `sudo apt install libxcb-xinerama0`.')
|
|
138
168
|
|
|
139
169
|
app = QApplication(sys.argv)
|
|
170
|
+
app.setStyle("Fusion")
|
|
171
|
+
from cfclient.utils.ui import UiUtils
|
|
140
172
|
|
|
141
|
-
app.setWindowIcon(QIcon(cfclient.module_path + "/icon-256.png"))
|
|
173
|
+
app.setWindowIcon(QIcon(cfclient.module_path + "/ui/icons/icon-256.png"))
|
|
174
|
+
app.setApplicationName("Crazyflie client")
|
|
142
175
|
# Make sure the right icon is set in Windows 7+ taskbar
|
|
143
176
|
if os.name == 'nt':
|
|
144
177
|
import ctypes
|
|
@@ -151,8 +184,10 @@ def main():
|
|
|
151
184
|
pass
|
|
152
185
|
|
|
153
186
|
main_window = MainUI()
|
|
187
|
+
app.setFont(UiUtils.FONT)
|
|
154
188
|
main_window.show()
|
|
155
|
-
|
|
189
|
+
main_window.set_default_theme()
|
|
190
|
+
sys.exit(app.exec())
|
|
156
191
|
|
|
157
192
|
|
|
158
193
|
if __name__ == "__main__":
|
cfclient/headless.py
CHANGED
|
@@ -66,14 +66,9 @@ class HeadlessClient():
|
|
|
66
66
|
for d in self._jr.available_devices():
|
|
67
67
|
self._devs.append(d.name)
|
|
68
68
|
|
|
69
|
-
def setup_controller(self, input_config, input_device=0
|
|
69
|
+
def setup_controller(self, input_config, input_device=0):
|
|
70
70
|
"""Set up the device reader"""
|
|
71
71
|
# Set up the joystick reader
|
|
72
|
-
self._jr.device_error.add_callback(self._input_dev_error)
|
|
73
|
-
print("Client side X-mode: %s" % xmode)
|
|
74
|
-
if (xmode):
|
|
75
|
-
self._cf.commander.set_client_xmode(xmode)
|
|
76
|
-
|
|
77
72
|
devs = self._jr.available_devices() # noqa, is this a bug?
|
|
78
73
|
print("Will use [%s] for input" % self._devs[input_device])
|
|
79
74
|
self._jr.start_input(self._devs[input_device])
|
|
@@ -98,7 +93,7 @@ class HeadlessClient():
|
|
|
98
93
|
# 2014-11-25 chad: Add a callback for when we have a good connection.
|
|
99
94
|
self._cf.connected.add_callback(self._connected)
|
|
100
95
|
self._cf.param.add_update_callback(
|
|
101
|
-
group="imu_sensors", name="
|
|
96
|
+
group="imu_sensors", name="AK8963", cb=(
|
|
102
97
|
lambda name, found: self._jr.set_alt_hold_available(
|
|
103
98
|
eval(found))))
|
|
104
99
|
self._jr.assisted_control_updated.add_callback(
|
|
@@ -145,9 +140,6 @@ def main():
|
|
|
145
140
|
parser.add_argument("--controllers", action="store_true",
|
|
146
141
|
dest="list_controllers",
|
|
147
142
|
help="Only display available controllers and exit")
|
|
148
|
-
parser.add_argument("-x", "--x-mode", action="store_true",
|
|
149
|
-
dest="xmode",
|
|
150
|
-
help="Enable client-side X-mode")
|
|
151
143
|
(args, unused) = parser.parse_known_args()
|
|
152
144
|
|
|
153
145
|
if args.debug:
|
|
@@ -162,8 +154,7 @@ def main():
|
|
|
162
154
|
else:
|
|
163
155
|
if headless.controller_connected():
|
|
164
156
|
headless.setup_controller(input_config=args.input,
|
|
165
|
-
input_device=args.controller
|
|
166
|
-
xmode=args.xmode)
|
|
157
|
+
input_device=args.controller)
|
|
167
158
|
headless.connect_crazyflie(link_uri=args.uri)
|
|
168
159
|
else:
|
|
169
160
|
print("No input-device connected, exiting!")
|