Skip to content

Commit

Permalink
src: lib: hub: Use mavlink-system-id, mavlink-component-id, mavlink-h…
Browse files Browse the repository at this point in the history
…eartbeat-frequency CLI arg values
  • Loading branch information
joaoantoniocardoso committed Nov 13, 2024
1 parent 106dc36 commit a07a8ab
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/lib/hub/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand All @@ -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())),
);
}

Expand Down

0 comments on commit a07a8ab

Please sign in to comment.