some bugfixes

This commit is contained in:
2024-05-02 13:35:58 +02:00
parent f4d0a86d7d
commit 9282526392
7 changed files with 40 additions and 51 deletions

View File

@ -58,17 +58,11 @@ fn main() {
println!("OPS-SAT Rust Experiment OBSW v{}", version_str);
setup_logger().expect("setting up logging with fern failed");
set_up_home_path();
#[cfg(feature = "host")]
let base_dir = std::env::current_dir()
.expect("getting current dir failed")
.to_path_buf();
#[cfg(not(feature = "host"))]
let base_dir = HOME_PATH.get().unwrap();
set_up_low_prio_ground_dir(base_dir.clone());
set_up_ground_dir(base_dir.clone());
let home_path = set_up_home_path();
set_up_low_prio_ground_dir(home_path.clone());
set_up_ground_dir(home_path.clone());
let app_cfg = create_app_config(base_dir.clone());
let app_cfg = create_app_config(home_path.clone());
info!("App Configuration: {:?}", app_cfg);
let stop_signal = Arc::new(AtomicBool::new(false));
@ -201,7 +195,7 @@ fn main() {
stop_signal.clone(),
);
let mut home_path_stop_file = base_dir.clone();
let mut home_path_stop_file = home_path.clone();
home_path_stop_file.push(STOP_FILE_NAME);
let mut tmp_path_stop_file = temp_dir();
tmp_path_stop_file.push(STOP_FILE_NAME);
@ -209,7 +203,7 @@ fn main() {
controller_composite_rx,
pus_action_reply_tx.clone(),
stop_signal.clone(),
ControllerPathCollection::default(),
ControllerPathCollection::new(&home_path),
);
let mut tcp_spp_client = TcpSppClientStd::new(