Skip to content

Commit 33fa67d

Browse files
committed
Removed redundant states
1 parent 39690db commit 33fa67d

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

boards/argus/src/main.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,6 @@ mod app {
286286
sm::States::Fault => spawn!(sm_fault),
287287
sm::States::Idle => spawn!(sm_idle),
288288
sm::States::Init => spawn!(sm_init),
289-
sm::States::Processing => spawn!(sm_process),
290-
sm::States::Recovery => spawn!(sm_recover),
291289
};
292290

293291
last_state = state;
@@ -322,16 +320,6 @@ mod app {
322320
todo!()
323321
}
324322

325-
#[task(priority = 3)]
326-
async fn sm_process(cx: sm_process::Context) {
327-
todo!()
328-
}
329-
330-
#[task(priority = 3)]
331-
async fn sm_recover(cx: sm_recover::Context) {
332-
todo!()
333-
}
334-
335323
#[task(priority = 3, binds = EXTI15_10, shared = [adc_manager], local = [adc1_int])]
336324
fn adc1_data_ready(mut cx: adc1_data_ready::Context) {
337325
info!("new data available come through");

boards/argus/src/state_machine.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ use smlang::statemachine;
33
statemachine! {
44
transitions: {
55
*Init + Start = Idle,
6-
Idle | Recovery + WantsCollection = Collection,
6+
Idle + WantsCollection = Collection,
77
Idle + NoConfig = Calibration,
8-
Collection + WantsProcessing = Processing,
98
Calibration + Configured = Idle,
109
Fault + FaultCleared = Idle,
1110
_ + FaultDetected = Fault,
@@ -39,10 +38,6 @@ pub mod tests {
3938
// Should transition to collection when asked
4039
_ = sm.process_event(Events::WantsCollection).unwrap();
4140
assert!(*sm.state() == States::Collection);
42-
43-
// Should transition to processing when asked
44-
_ = sm.process_event(Events::WantsProcessing).unwrap();
45-
assert!(*sm.state() == States::Processing);
4641
}
4742

4843
#[test]

boards/argus/src/traits.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ impl From<States> for DeviceState {
1111
match value {
1212
States::Idle => DeviceState::Idle,
1313
States::Calibration => DeviceState::Calibration,
14-
States::Recovery => DeviceState::Recovery,
1514
States::Collection => DeviceState::Collection,
1615
States::Init => DeviceState::Init,
17-
States::Processing => DeviceState::Processing,
1816
States::Fault => DeviceState::Fault,
1917
}
2018
}

0 commit comments

Comments
 (0)