Skip to content

Commit

Permalink
ad default for mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pejotejo committed Nov 27, 2024
1 parent 19c621b commit 5e00a15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/control/src/motion/walking_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ impl WalkingEngine {
.robot_to_walk
.fill_if_subscribed(|| robot_to_walk);
*cycle_context.walking_engine_mode = self.engine.mode;

Ok(MainOutputs {
walk_motor_commands: motor_commands.into(),
})
Expand Down
6 changes: 6 additions & 0 deletions crates/walking_engine/src/mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ pub enum Mode {
Catching(Catching),
}

impl Default for Mode {
fn default() -> Self {
Mode::Standing(Standing::default())
}
}

impl WalkTransition for Mode {
fn stand(self, context: &Context) -> Mode {
match self {
Expand Down

0 comments on commit 5e00a15

Please sign in to comment.