that should do the job
All checks were successful
Rust/sat-rs/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2024-02-07 15:23:56 +01:00
parent 267ae6500e
commit de4e261835
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 9 additions and 7 deletions

View File

@ -26,3 +26,7 @@ path = "../satrs-core"
[dependencies.satrs-mib] [dependencies.satrs-mib]
# version = "0.1.0-alpha.1" # version = "0.1.0-alpha.1"
path = "../satrs-mib" path = "../satrs-mib"
[features]
dyn_tmtc = []
default = ["dyn_tmtc"]

View File

@ -53,8 +53,6 @@ use std::sync::{Arc, RwLock};
use std::thread; use std::thread;
use std::time::Duration; use std::time::Duration;
const USE_STATIC_POOLS: bool = true;
fn create_static_pools() -> (StaticMemoryPool, StaticMemoryPool) { fn create_static_pools() -> (StaticMemoryPool, StaticMemoryPool) {
( (
StaticMemoryPool::new(StaticPoolConfig::new(vec![ StaticMemoryPool::new(StaticPoolConfig::new(vec![
@ -94,6 +92,7 @@ fn create_verification_reporter(verif_sender: impl EcssTmSender) -> Verification
VerificationReporterWithSender::new(&verif_cfg, Box::new(verif_sender)) VerificationReporterWithSender::new(&verif_cfg, Box::new(verif_sender))
} }
#[allow(dead_code)]
fn static_tmtc_pool_main() { fn static_tmtc_pool_main() {
let (tm_pool, tc_pool) = create_static_pools(); let (tm_pool, tc_pool) = create_static_pools();
let shared_tm_store = SharedTmStore::new(tm_pool); let shared_tm_store = SharedTmStore::new(tm_pool);
@ -532,11 +531,10 @@ fn dyn_tmtc_pool_main() {
fn main() { fn main() {
setup_logger().expect("setting up logging with fern failed"); setup_logger().expect("setting up logging with fern failed");
println!("Running OBSW example"); println!("Running OBSW example");
if USE_STATIC_POOLS { #[cfg(not(feature = "dyn_tmtc"))]
static_tmtc_pool_main(); static_tmtc_pool_main();
} else { #[cfg(feature = "dyn_tmtc")]
dyn_tmtc_pool_main(); dyn_tmtc_pool_main();
}
} }
pub fn update_time(time_provider: &mut TimeProvider, timestamp: &mut [u8]) { pub fn update_time(time_provider: &mut TimeProvider, timestamp: &mut [u8]) {