Skip to content

Commit

Permalink
Fix: Cippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSprenger committed Jun 8, 2024
1 parent 764fe8f commit 521408b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions boards/recovery/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ mod app {
/* Recovery Timer config */
let (pclk_tc2tc3, gclk0) = Pclk::enable(tokens.pclks.tc2_tc3, gclk0);
let timerclk: hal::clock::v1::Tc2Tc3Clock = pclk_tc2tc3.into();
let mut recovery_timer =
hal::timer::TimerCounter2::tc2_(&timerclk, peripherals.TC2, &mut mclk);
let recovery_timer = hal::timer::TimerCounter2::tc2_(&timerclk, peripherals.TC2, &mut mclk);

/* Spawn tasks */
run_sm::spawn().ok();
Expand Down
6 changes: 3 additions & 3 deletions boards/recovery/src/state_machine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ impl From<state::StateData> for RocketStates {
}
}
// Linter: an implementation of From is preferred since it gives you Into<_> for free where the reverse isn't true
impl Into<state::StateData> for RocketStates {
fn into(self) -> state::StateData {
match self {
impl From<RocketStates> for state::StateData {
fn from(val: RocketStates) -> Self {
match val {
RocketStates::Initializing(_) => state::StateData::Initializing,
RocketStates::WaitForTakeoff(_) => state::StateData::WaitForTakeoff,
RocketStates::Ascent(_) => state::StateData::Ascent,
Expand Down
4 changes: 1 addition & 3 deletions boards/recovery/src/state_machine/states/terminal_descent.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use super::Descent;
use crate::app::fire_main;
use crate::state_machine::{
RocketStates, State, StateMachineContext, StateMachineSharedResources, TransitionInto,
WaitForRecovery,
RocketStates, State, StateMachineContext, TransitionInto, WaitForRecovery,
};
use crate::{no_transition, transition};
use atsamd_hal::prelude::_embedded_hal_timer_CountDown;
Expand All @@ -20,7 +19,6 @@ impl State for TerminalDescent {
spawn!(fire_main)?;
Ok(())
});
// context.shared_resources.
context.shared_resources.recovery_timer.lock(|timer| {
timer.enable_interrupt();
let duration_mins = atsamd_hal::fugit::MinutesDurationU32::minutes(1);
Expand Down

0 comments on commit 521408b

Please sign in to comment.