Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ cargo make create-dist
cargo make frontend-cpu-bench
```

## QML Debugging

In order to enable QML debugging, add this block to the main.py file.
QML debugging does not entirely work currently for this project and
still needs to be flushed out. See https://swift-nav.atlassian.net/browse/CPP-400
```
from PySide2.QtQml import QQmlDebuggingEnabler

sys.argv.append("-qmljsdebugger=port:10002,block")
debug = QQmlDebuggingEnabler() # pylint: disable=unused-variable
```
## Contributing

After making changes, run to tasks to ensure the code is ready for submission
Expand Down
6 changes: 1 addition & 5 deletions resources/StatusBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,7 @@ Rectangle {
statusBarINS.text = statusBarData.ins;
statusBarDataRate.text = statusBarData.data_rate;
statusBarAntenna.text = statusBarData.antenna_status;
let recordingPrefix = "🔴";
if (Qt.platform.os === "windows")
recordingPrefix = "[L]";

parent.title = (parent.sbpRecording ? recordingPrefix : " ") + statusBarData.title;
parent.title = (parent.sbpRecording ? "[L] " : " ") + statusBarData.title;
if (statusBarData.solid_connection) {
statusBarGoodConnectionImage.visible = true;
statusBarBadConnectionImage.visible = false;
Expand Down
4 changes: 1 addition & 3 deletions swiftnav_console/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from PySide2.QtGui import QFontDatabase

from PySide2.QtQml import QQmlComponent, qmlRegisterType, QQmlDebuggingEnabler
from PySide2.QtQml import QQmlComponent, qmlRegisterType

import swiftnav_console.console_resources # type: ignore # pylint: disable=unused-import

Expand Down Expand Up @@ -784,8 +784,6 @@ def main():

args_main, _ = parser.parse_known_args()

# sys.argv.append("-qmljsdebugger=port:10002,block")
debug = QQmlDebuggingEnabler() # pylint: disable=unused-variable
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_UseHighDpiPixmaps)
app = QApplication(sys.argv)
Expand Down