diff --git a/Cargo.lock b/Cargo.lock index 8c1147c..a0d88f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -601,7 +601,7 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "ops-sat-rs" -version = "0.0.1" +version = "0.1.0" dependencies = [ "chrono", "derive-new", diff --git a/src/config.rs b/src/config.rs index 9c799a3..30e0614 100644 --- a/src/config.rs +++ b/src/config.rs @@ -43,6 +43,8 @@ pub enum GroupId { pub const TEST_EVENT: EventU32TypedSev = EventU32TypedSev::::new(GroupId::Tmtc as u16, 0); +pub const VERSION: Option<&str> = option_env!("CARGO_PKG_VERSION"); + lazy_static! { pub static ref HOME_PATH: PathBuf = { let mut home_path = PathBuf::new(); diff --git a/src/main.rs b/src/main.rs index a8b56af..af84c9d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,7 @@ use ops_sat_rs::config::{ components::{CONTROLLER_ID, TCP_SERVER, TCP_SPP_CLIENT, UDP_SERVER}, pool::create_sched_tc_pool, tasks::{FREQ_MS_CAMERA_HANDLING, FREQ_MS_CTRL, FREQ_MS_PUS_STACK, STOP_CHECK_FREQUENCY}, - VALID_PACKET_ID_LIST, + VALID_PACKET_ID_LIST, VERSION, }; use ops_sat_rs::config::{components::CAMERA_HANDLER, tasks::FREQ_MS_EVENT_HANDLING}; use ops_sat_rs::config::{tasks::FREQ_MS_UDP_TMTC, OBSW_SERVER_ADDR, SERVER_PORT}; @@ -53,7 +53,8 @@ mod tmtc; fn main() { setup_logger().expect("setting up logging with fern failed"); - println!("OPS-SAT Rust Experiment OBSW"); + let version_str = VERSION.unwrap_or("?"); + println!("OPS-SAT Rust Experiment OBSW v{}", version_str); let app_cfg = create_app_config(); println!("App Configuration: {:?}", app_cfg);