some minor adaptions

This commit is contained in:
2026-01-21 12:54:56 +01:00
parent 049160d187
commit 3c7fefbb8f
4 changed files with 4 additions and 2 deletions
+4
View File
@@ -21,6 +21,7 @@ pub struct PowerSwitchHelper {
}
#[derive(Debug, Error, Copy, Clone, PartialEq, Eq)]
#[allow(dead_code)]
pub enum SwitchCommandingError {
#[error("send error: {0}")]
Send(#[from] GenericSendError),
@@ -48,6 +49,7 @@ impl PowerSwitchHelper {
Ok(())
}
#[allow(dead_code)]
pub fn send_switch_off_cmd(
&self,
requestor_info: satrs::request::MessageMetadata,
@@ -75,6 +77,7 @@ impl PowerSwitchHelper {
Err(SwitchInfoError::SwitchIdNotInMap(switch_id))
}
#[allow(dead_code)]
fn switch_delay_ms(&self) -> Duration {
// Here, we could set device specific switch delays theoretically. Set it to this value
// for now.
@@ -155,6 +158,7 @@ pub struct SwitchRequestInfo {
}
// Test switch helper which can be used for unittests.
#[allow(dead_code)]
pub struct TestSwitchHelper {
pub switch_requests: RefCell<VecDeque<SwitchRequestInfo>>,
pub switch_info_requests: RefCell<VecDeque<SwitchId>>,
-2
View File
@@ -281,7 +281,6 @@ pub struct PcduHandler<ComInterface: SerialInterface> {
shared_switch_map: Arc<Mutex<SwitchSet>>,
mode_and_submode: ModeAndSubmode,
stamp_helper: TimestampHelper,
tm_buf: [u8; 256],
}
impl<ComInterface: SerialInterface> PcduHandler<ComInterface> {
@@ -303,7 +302,6 @@ impl<ComInterface: SerialInterface> PcduHandler<ComInterface> {
shared_switch_map,
mode_and_submode: ModeAndSubmode::new(0, 0),
stamp_helper: TimestampHelper::default(),
tm_buf: [0; 256],
}
}
pub fn periodic_operation(&mut self, op_code: OpCode) {