From 443995fe5eb25dc6b0612a13ad8326ff9c383920 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 10 Apr 2024 15:05:24 +0200 Subject: [PATCH] smaller fixes --- src/interface/tcp.rs | 4 ++-- src/main.rs | 2 +- src/pus/action.rs | 6 +++--- src/tmtc/ccsds.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/interface/tcp.rs b/src/interface/tcp.rs index 59a521b..f722dfa 100644 --- a/src/interface/tcp.rs +++ b/src/interface/tcp.rs @@ -1,5 +1,5 @@ use std::{ - collections::{HashSet, VecDeque}, + collections::VecDeque, sync::{atomic::AtomicBool, Arc, Mutex}, time::Duration, }; @@ -86,7 +86,7 @@ impl HandledConnectionHandler for ConnectionFinishedHandler { pub type TcpServerType = TcpSpacepacketsServer< SyncTcpTmSource, CcsdsDistributor, MpscErrorType>, - HashSet, + Vec, ConnectionFinishedHandler, (), CcsdsError, diff --git a/src/main.rs b/src/main.rs index b61904f..e416b63 100644 --- a/src/main.rs +++ b/src/main.rs @@ -62,7 +62,7 @@ fn main() { let (_pus_action_reply_tx, pus_action_reply_rx) = mpsc::channel(); // let (pus_hk_reply_tx, pus_hk_reply_rx) = mpsc::channel(); // let (pus_mode_reply_tx, pus_mode_reply_rx) = mpsc::channel(); - let (controller_composite_tx, controller_composite_rx) = mpsc::channel(); + let (controller_composite_tx, _controller_composite_rx) = mpsc::channel(); // Some request are targetable. This map is used to retrieve sender handles based on a target ID. let mut request_map = GenericRequestRouter::default(); diff --git a/src/pus/action.rs b/src/pus/action.rs index dc5f133..3900796 100644 --- a/src/pus/action.rs +++ b/src/pus/action.rs @@ -11,9 +11,9 @@ use satrs::pus::verification::{ VerificationReportingProvider, VerificationToken, }; use satrs::pus::{ - ActiveRequestProvider, EcssTcAndToken, EcssTcInMemConverter, EcssTcInVecConverter, - EcssTmSenderCore, EcssTmtcError, GenericConversionError, MpscTmAsVecSender, - PusPacketHandlerResult, PusReplyHandler, PusServiceHelper, PusTcToRequestConverter, PusTmAsVec, + ActiveRequestProvider, EcssTcAndToken, EcssTcInVecConverter, EcssTmSenderCore, EcssTmtcError, + GenericConversionError, PusPacketHandlerResult, PusReplyHandler, PusServiceHelper, + PusTcToRequestConverter, PusTmAsVec, }; use satrs::request::{GenericMessage, UniqueApidTargetId}; use satrs::spacepackets::ecss::tc::PusTcReader; diff --git a/src/tmtc/ccsds.rs b/src/tmtc/ccsds.rs index 6828538..97edf26 100644 --- a/src/tmtc/ccsds.rs +++ b/src/tmtc/ccsds.rs @@ -34,7 +34,7 @@ impl< sp_header: &SpHeader, tc_raw: &[u8], ) -> Result<(), Self::Error> { - return self.tc_source.pass_ccsds(sp_header, tc_raw); + self.tc_source.pass_ccsds(sp_header, tc_raw) } fn handle_packet_with_unknown_apid( @@ -42,8 +42,8 @@ impl< sp_header: &SpHeader, _tc_raw: &[u8], ) -> Result<(), Self::Error> { + // TODO: Log event as telemetry or something similar? log::warn!("unknown APID 0x{:x?} detected", sp_header.apid()); - // TODO: Log event or something similar? Ok(()) } }