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
4 changes: 4 additions & 0 deletions console_backend/src/cli_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ pub struct CliOptions {
#[clap(long = "show-fileio")]
pub show_fileio: bool,

/// Allow File Connections.
#[clap(long = "show-file-connection")]
pub show_file_connection: bool,

/// Don't use opengl in plots.
#[clap(long = "no-opengl", parse(from_flag = Not::not))]
pub no_opengl: bool,
Expand Down
5 changes: 3 additions & 2 deletions resources/ConnectionScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Item {
RadioButton {
id: serialRadio

checked: previous_connection_type == "Serial"
checked: (previous_connection_type == "Serial" || previous_connection_type == "File" && !Globals.showFileConnection)
text: serial_usb
onToggled: dialogRect.forceActiveFocus()
}
Expand All @@ -98,9 +98,10 @@ Item {
RadioButton {
id: fileRadio

checked: previous_connection_type == "File"
checked: previous_connection_type == "File" && Globals.showFileConnection
text: file
onToggled: dialogRect.forceActiveFocus()
visible: Globals.showFileConnection
}

Item {
Expand Down
1 change: 1 addition & 0 deletions resources/Constants/Globals.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ QtObject {
property string copyClipboard: ""
property var tablesWithHighlights: []
property var currentSelectedTable: null
property bool showFileConnection: false

function clearHighlightedRows() {
for (var i in tablesWithHighlights) {
Expand Down
3 changes: 3 additions & 0 deletions swiftnav_console/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,11 +790,14 @@ def handle_cli_arguments(args: argparse.Namespace, globals_: QObject):
)
else:
globals_.setProperty("width", args.width) # type: ignore
if args.show_file_connection:
globals_.setProperty("showFileConnection", True) # type: ignore


def main(passed_args: Optional[Tuple[str, ...]] = None) -> int:
parser = argparse.ArgumentParser(add_help=False, usage=argparse.SUPPRESS)
parser.add_argument("--show-fileio", action="store_true")
parser.add_argument("--show-file-connection", action="store_true")
parser.add_argument("--no-opengl", action="store_false")
parser.add_argument("--refresh-rate", type=int)
parser.add_argument("--tab")
Expand Down