From 4f757e11b036366452e13bfab665d47c55a5ab01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Ant=C3=B4nio=20Cardoso?= Date: Tue, 12 Nov 2024 21:52:46 -0300 Subject: [PATCH] src: lib: hub: Use mavlink-system-id, mavlink-component-id, mavlink-heartbeat-frequency CLI arg values --- src/lib/hub/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/hub/mod.rs b/src/lib/hub/mod.rs index 67414a51..7d0268d8 100644 --- a/src/lib/hub/mod.rs +++ b/src/lib/hub/mod.rs @@ -9,6 +9,7 @@ use lazy_static::lazy_static; use tokio::sync::{broadcast, mpsc, oneshot, RwLock}; use crate::{ + cli, drivers::{Driver, DriverInfo}, protocol::Protocol, stats::{ @@ -26,11 +27,9 @@ use protocol::HubCommand; lazy_static! { static ref HUB: Hub = Hub::new( 10000, - Arc::new(RwLock::new( - mavlink::ardupilotmega::MavComponent::MAV_COMP_ID_ONBOARD_COMPUTER as u8, - )), - Arc::new(RwLock::new(1)), - Arc::new(RwLock::new(1.)), + Arc::new(RwLock::new(cli::mavlink_system_id())), + Arc::new(RwLock::new(cli::mavlink_component_id())), + Arc::new(RwLock::new(cli::mavlink_heartbeat_frequency())), ); }