Skip to content

Console tab - #798

Merged
ArisMorgens merged 6 commits into
cflib2from
Aris/cflib2/Console_tab
Mar 26, 2026
Merged

ArisMorgens merged 6 commits into
cflib2from
Aris/cflib2/Console_tab

Conversation

@ArisMorgens

Copy link
Copy Markdown
Member

This PR adds the Console tab, running on crazyflie-lib-python-v2.

It also fixes a bug where the client crashed after the "too many packets lost" window is closed. The window was running its own event loop internally, which clashes with QtAsyncio. QTimer.singleShot schedules it to open after the current task finishes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds/enables the Console tab in the Qt client using the cflib2 (crazyflie-lib-python-v2) connection object, and adjusts the disconnect error dialog to avoid clashing with QtAsyncio.

Changes:

  • Enable ConsoleTab in the tabs registry so it loads in the UI.
  • Refactor ConsoleTab to use cflib2 async APIs for console output and param writes.
  • Defer the disconnect “Communication failure” modal dialog via QTimer.singleShot(0, ...) to avoid running it directly inside an async task.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/cfclient/ui/tabs/init.py Enables ConsoleTab import and adds it to the available tabs list.
src/cfclient/ui/tabs/ConsoleTab.py Reworks Console tab to use cflib2 Crazyflie + async console loop and async param set helpers.
src/cfclient/ui/main.py Defers disconnect QMessageBox.critical via QTimer.singleShot to avoid event loop clashes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/cfclient/ui/tabs/ConsoleTab.py Outdated
Comment thread src/cfclient/ui/main.py Outdated
@ArisMorgens ArisMorgens changed the title Aris/cflib2/console tab Console tab Mar 25, 2026
@ArisMorgens
ArisMorgens force-pushed the Aris/cflib2/Console_tab branch from b6470f9 to 68ddfac Compare March 25, 2026 13:18
@ArisMorgens
ArisMorgens force-pushed the Aris/cflib2/Console_tab branch from 3865eb2 to 2b3eee7 Compare March 25, 2026 14:45

@gemenerik gemenerik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

Comment thread src/cfclient/ui/tabs/ConsoleTab.py Outdated
@ArisMorgens
ArisMorgens merged commit 502124b into cflib2 Mar 26, 2026
1 check passed
@ArisMorgens
ArisMorgens deleted the Aris/cflib2/Console_tab branch March 26, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants