ev3_drivebase/drivebase/wait.rs
1#![expect(unused)]
2
3use super::DriveBase;
4use core::time::Duration;
5use ev3dev_lang_rust::motors::TachoMotor;
6
7impl DriveBase {
8 /// Wait until condition cond returns true or the timeout is reached.
9 ///
10 /// The condition is checked when to the state attribute has changed. If the timeout is None
11 /// it will wait an infinite amount of time.
12 pub fn wait<F>(&self, cond: F, timeout: Option<Duration>)
13 where
14 F: Fn(&TachoMotor, &TachoMotor) -> bool + Send + Sync,
15 {
16 }
17
18 pub(super) fn wait_until_not_moving(&self, timeout: Option<Duration>) -> &Self {
19 self.left.wait_until_not_moving(timeout);
20 self.right.wait_until_not_moving(timeout);
21 self
22 }
23}