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
2 changes: 2 additions & 0 deletions console_backend/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ pub(crate) const BASELINE_TIME_STR_FILEPATH: &str = "baseline_log_%Y%m%d-%H%M%S.
pub(crate) const SBP_FILEPATH: &str = "swift-gnss-%Y%m%d-%H%M%S.sbp";
pub(crate) const SBP_JSON_FILEPATH: &str = "swift-gnss-%Y%m%d-%H%M%S.sbp.json";
pub(crate) const DEFAULT_LOG_DIRECTORY: &str = "SwiftNav";
pub(crate) const DEFAULT_IP_ADDRESS: &str = "192.168.0.222";
pub(crate) const DEFAULT_PORT: u16 = 55555;

// Common constants.
pub(crate) const NUM_POINTS: usize = 200;
Expand Down
13 changes: 9 additions & 4 deletions console_backend/src/shared_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use serialport::FlowControl;

use crate::constants::{
APPLICATION_NAME, APPLICATION_ORGANIZATION, APPLICATION_QUALIFIER, CONNECTION_HISTORY_FILENAME,
DEFAULT_LOG_DIRECTORY, MAX_CONNECTION_HISTORY, MPS,
DEFAULT_IP_ADDRESS, DEFAULT_LOG_DIRECTORY, DEFAULT_PORT, MAX_CONNECTION_HISTORY, MPS,
};
use crate::errors::CONVERT_TO_STR_FAILURE;
use crate::log_panel::LogLevel;
Expand Down Expand Up @@ -758,8 +758,13 @@ impl ConnectionHistory {
if let Ok(default_path) = LOG_DIRECTORY.path().into_os_string().into_string() {
folders.insert(default_path);
}
let mut addresses = IndexSet::new();
addresses.insert(Address {
host: DEFAULT_IP_ADDRESS.to_string(),
port: DEFAULT_PORT,
});
ConnectionHistory {
addresses: IndexSet::new(),
addresses,
files: IndexSet::new(),
folders,
serial_configs: IndexMap::new(),
Expand Down Expand Up @@ -961,9 +966,9 @@ mod tests {
backup_file(bfilename.clone());

let mut conn_history = ConnectionHistory::new();
let host1 = String::from("host1");
let host1 = String::from(DEFAULT_IP_ADDRESS);
let host2 = String::from("host2");
let port = 100;
let port = DEFAULT_PORT;

conn_history.record_address(host1.clone(), port);
let addresses = conn_history.addresses();
Expand Down
2 changes: 1 addition & 1 deletion swiftnav_console/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@

CONSOLE_BACKEND_CAPNP_PATH = "console_backend.capnp"

PIKSI_HOST = "piksi-relay-bb9f2b10e53143f4a816a11884e679cf.ce.swiftnav.com"
PIKSI_HOST = "192.168.0.222"
PIKSI_PORT = 55555


Expand Down