Skip to content

Commit

Permalink
add move
Browse files Browse the repository at this point in the history
  • Loading branch information
ryescholin committed May 31, 2024
1 parent 6df7e6d commit bdd6c60
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion pod-operation/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
tokio::spawn(demo::read_lidar(lidar));

let mut state_machine = StateMachine::new(io);
tokio::spawn(async {
tokio::spawn(async move {
state_machine.run().await;
});

Expand Down
36 changes: 18 additions & 18 deletions pod-operation/src/state_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ pub struct StateMachine {
enter_actions: EnumMap<State, fn(&mut Self)>,
state_transitions: EnumMap<State, Option<StateTransition>>,
io: SocketIo,
// brakes: Brakes,
// signal_light: SignalLight,
// wheel_encoder: WheelEncoder,
// //upstream_pressure_transducer: PressureTransducer,
// downstream_pressure_transducer: PressureTransducer,
// lim_temperature_port: LimTemperature,
// lim_temperature_starboard: LimTemperature,
// high_voltage_system: HighVoltageSystem,
brakes: Brakes,
signal_light: SignalLight,
wheel_encoder: WheelEncoder,
//upstream_pressure_transducer: PressureTransducer,
downstream_pressure_transducer: PressureTransducer,
lim_temperature_port: LimTemperature,
lim_temperature_starboard: LimTemperature,
high_voltage_system: HighVoltageSystem,
lidar: Lidar,
}

Expand Down Expand Up @@ -94,16 +94,16 @@ impl StateMachine {
enter_actions,
state_transitions,
io,
// brakes: Brakes::new(),
// signal_light: SignalLight::new(),
// wheel_encoder: WheelEncoder::new(),
// //upstream_pressure_transducer: PressureTransducer::upstream(),
// downstream_pressure_transducer: PressureTransducer::downstream(),
// lim_temperature_port: LimTemperature::new(ads1x1x::SlaveAddr::Default),
// lim_temperature_starboard: LimTemperature::new(ads1x1x::SlaveAddr::Alternative(
// false, true,
// )),
// high_voltage_system: HighVoltageSystem::new(),
brakes: Brakes::new(),
signal_light: SignalLight::new(),
wheel_encoder: WheelEncoder::new(),
//upstream_pressure_transducer: PressureTransducer::upstream(),
downstream_pressure_transducer: PressureTransducer::downstream(),
lim_temperature_port: LimTemperature::new(ads1x1x::SlaveAddr::Default),
lim_temperature_starboard: LimTemperature::new(ads1x1x::SlaveAddr::Alternative(
false, true,
)),
high_voltage_system: HighVoltageSystem::new(),
lidar: Lidar::new(),
}
}
Expand Down

0 comments on commit bdd6c60

Please sign in to comment.