some minor adaptions
This commit is contained in:
@@ -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>>,
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user