Skip to content

Commit 5c9c5e9

Browse files
committed
Merge branch 'main' into steve/python-packaging
2 parents b4880da + 9614e70 commit 5c9c5e9

File tree

24 files changed

+501
-187
lines changed

24 files changed

+501
-187
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,23 +365,26 @@ jobs:
365365
run: |
366366
which tar
367367
cd console
368+
ls -la
369+
ls -la ..
370+
ls -la ../utils
368371
if [ "$RUNNER_OS" == "Windows" ]; then
369-
python ../utils/bench_runner.py --frontend_cpu --executable=./Scripts/swiftnav-console.exe
372+
python ../utils/bench_runner.py --frontend_cpu --executable="Scripts/swiftnav-console.exe"
370373
elif [ "$RUNNER_OS" == "macOS" ]; then
371-
python ../utils/bench_runner.py --frontend_cpu --executable=./bin/swiftnav-console
374+
python ../utils/bench_runner.py --frontend_cpu --executable="bin/swiftnav-console"
372375
elif [ "$RUNNER_OS" == "Linux" ]; then
373-
python ../utils/bench_runner.py --frontend_cpu --executable=./bin/swiftnav-console
376+
python ../utils/bench_runner.py --frontend_cpu --executable="bin/swiftnav-console"
374377
fi
375378
- name: Run MEM Frontend Benchmark.
376379
shell: bash
377380
run: |
378381
cd console
379382
if [ "$RUNNER_OS" == "Windows" ]; then
380-
python ../utils/bench_runner.py --frontend_mem --executable=./Scripts/swiftnav-console.exe
383+
python ../utils/bench_runner.py --frontend_mem --executable="Scripts/swiftnav-console.exe"
381384
elif [ "$RUNNER_OS" == "macOS" ]; then
382-
python ../utils/bench_runner.py --frontend_mem --executable=./bin/swiftnav-console
385+
python ../utils/bench_runner.py --frontend_mem --executable="bin/swiftnav-console"
383386
elif [ "$RUNNER_OS" == "Linux" ]; then
384-
python ../utils/bench_runner.py --frontend_mem --executable=./bin/swiftnav-console
387+
python ../utils/bench_runner.py --frontend_mem --executable="bin/swiftnav-console"
385388
fi
386389
387390

console_backend/src/cli_options.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ pub struct CliOptions {
109109
pub dirname: Option<String>,
110110

111111
// Frontend Options
112+
/// Show Filio pane in Update tab.
113+
#[clap(long = "show-fileio")]
114+
pub show_fileio: bool,
115+
112116
/// Don't use opengl in plots.
113117
#[clap(long = "no-opengl", parse(from_flag = Not::not))]
114118
pub no_opengl: bool,

console_backend/src/common_constants.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ pub enum Keys {
269269
NETWORK_INFO,
270270
#[strum(serialize = "IP_ADDRESS")]
271271
IP_ADDRESS,
272+
#[strum(serialize = "ANTENNA_STATUS")]
273+
ANTENNA_STATUS,
272274
}
273275

274276
#[derive(Clone, Debug, Display, EnumString, EnumVariantNames, Eq, Hash, PartialEq)]

console_backend/src/constants.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,6 @@ pub const BASELINE_TABLE_KEYS: &[&str] = &[
9797
pub(crate) const PLOT_HISTORY_MAX: usize = 1000;
9898
pub(crate) const DILUTION_OF_PRECISION_UNITS: f64 = 0.01;
9999
pub(crate) const NUM_GNSS_MODES: usize = 6;
100-
pub(crate) const LAT_MAX: f64 = 90_f64;
101-
pub(crate) const LAT_MIN: f64 = -90_f64;
102-
pub(crate) const LON_MAX: f64 = 180_f64;
103-
pub(crate) const LON_MIN: f64 = -180_f64;
104100
pub(crate) const DEGREES: &str = "degrees";
105101
pub(crate) const METERS: &str = "meters";
106102
pub(crate) const NO_FIX_LABEL: &str = "No Fix";
@@ -249,7 +245,7 @@ pub(crate) const UDEG2DEG: f64 = 0.0000001;
249245
// Status Bar constants.
250246
pub(crate) const UPDATE_TOLERANCE_SECONDS: f64 = 1.2;
251247
pub(crate) const UNKNOWN_ERROR: &str = "Unk Error";
252-
pub(crate) const UNKNOWN_ERROR_SHORT: &str = "unk";
248+
pub(crate) const UNKNOWN_ERROR_SHORT: &str = "Unk";
253249
pub(crate) const ODO_POSTFIX: &str = "+Odo";
254250
pub(crate) const INS_POSTFIX: &str = "+INS";
255251

console_backend/src/errors.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ pub(crate) const CROSSBEAM_SCOPE_UNWRAP_FAILURE: &str = "unable to unwrap crossb
1717
pub(crate) const UNABLE_TO_CLONE_UPDATE_SHARED: &str = "unable to clone update shared";
1818
pub(crate) const FILEIO_CHANNEL_SEND_FAILURE: &str =
1919
"failure attempting to send via fileio channel";
20+
pub(crate) const SOLUTION_POSITION_UNIT_SELECTION_NOT_AVAILABLE: &str =
21+
"solution position unit selection not available";

console_backend/src/process_messages.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ where
139139
tabs.solution.lock().unwrap().handle_gps_time(msg);
140140
});
141141

142-
link.register(|tabs: &Tabs<S>, _: MsgHeartbeat| {
142+
link.register(|tabs: &Tabs<S>, msg: MsgHeartbeat| {
143143
tabs.advanced_system_monitor
144144
.lock()
145145
.unwrap()
146146
.handle_heartbeat();
147-
tabs.status_bar.lock().unwrap().handle_heartbeat();
147+
tabs.status_bar.lock().unwrap().handle_heartbeat(msg);
148148
});
149149

150150
link.register(|tabs: &Tabs<S>, msg: MsgImuAux| {

console_backend/src/server_recv_thread.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ use crate::connection::ConnectionState;
33
use crate::console_backend_capnp as m;
44
use crate::errors::{
55
CAP_N_PROTO_DESERIALIZATION_FAILURE, CONVERT_TO_STR_FAILURE, SHARED_STATE_LOCK_MUTEX_FAILURE,
6+
SOLUTION_POSITION_UNIT_SELECTION_NOT_AVAILABLE,
67
};
78
use crate::log_panel::LogLevel;
89
use crate::output::CsvLogging;
910
use crate::settings_tab;
1011
use crate::shared_state::{AdvancedNetworkingState, SharedState};
12+
use crate::solution_tab::LatLonUnits;
1113
use crate::types::{ClientSender, FlowControl, RealtimeDelay};
1214
use crate::update_tab::UpdateTabUpdate;
1315
use crate::utils::refresh_navbar;
@@ -157,7 +159,10 @@ pub fn server_recv_thread(
157159
let unit = cv_in
158160
.get_solution_position_unit()
159161
.expect(CAP_N_PROTO_DESERIALIZATION_FAILURE);
160-
(*shared_data).solution_tab.position_tab.unit = unit.to_string();
162+
(*shared_data).solution_tab.position_tab.unit = Some(
163+
LatLonUnits::from_str(unit)
164+
.expect(SOLUTION_POSITION_UNIT_SELECTION_NOT_AVAILABLE),
165+
);
161166
}
162167
m::message::SolutionPositionStatusButtonFront(Ok(cv_in)) => {
163168
let shared_state_clone = shared_state.clone();

console_backend/src/shared_state.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
use crate::common_constants::{self as cc, SbpLogging};
22
use crate::constants::{
33
APPLICATION_NAME, APPLICATION_ORGANIZATION, APPLICATION_QUALIFIER, CONNECTION_HISTORY_FILENAME,
4-
DEFAULT_LOG_DIRECTORY, DEGREES, MAX_CONNECTION_HISTORY, MPS,
4+
DEFAULT_LOG_DIRECTORY, MAX_CONNECTION_HISTORY, MPS,
55
};
66
use crate::errors::{CONVERT_TO_STR_FAILURE, SHARED_STATE_LOCK_MUTEX_FAILURE};
77
use crate::log_panel::LogLevel;
88
use crate::output::{CsvLogging, CsvSerializer};
99
use crate::piksi_tools_constants::*;
1010
use crate::settings_tab;
11+
use crate::solution_tab::LatLonUnits;
1112
use crate::types::CapnProtoSender;
1213
use crate::update_tab::UpdateTabUpdate;
1314
use crate::utils::set_connected_frontend;
@@ -496,7 +497,7 @@ pub struct SolutionPositionTabState {
496497
pub last_ins_status_receipt_time: Instant,
497498
pub last_odo_update_time: Instant,
498499
pub pause: bool,
499-
pub unit: String,
500+
pub unit: Option<LatLonUnits>,
500501
pub log_file: Option<CsvSerializer>,
501502
}
502503

@@ -508,7 +509,7 @@ impl SolutionPositionTabState {
508509
last_ins_status_receipt_time: Instant::now(),
509510
last_odo_update_time: Instant::now(),
510511
pause: false,
511-
unit: String::from(DEGREES),
512+
unit: None,
512513
log_file: None,
513514
}
514515
}

0 commit comments

Comments
 (0)