Skip to Content
VectorLib

MoveToPoint

vectorlib::MoveToPoint — fields, methods, parameters and return types.


pub struct MoveToPoint<'a>

Builder returned by Chassis::move_to_point.

View source

Methods

Prop

Type

forwards

pub fn forwards(self, forwards: bool) -> Self

Drive forwards (true, default) or backwards (false).

Parameters

Prop

Type

Returns

Self

View source

max_speed

pub fn max_speed(self, max_speed: f32) -> Self

Maximum speed, 0-127. 127 by default.

Parameters

Prop

Type

Returns

Self

View source

min_speed

pub fn min_speed(self, min_speed: f32) -> Self

Minimum speed, 0-127. Non-zero switches to motion-chaining exit conditions.

Parameters

Prop

Type

Returns

Self

View source

early_exit_range

pub fn early_exit_range(self, early_exit_range: f32) -> Self

Exit when within this many inches. Only used when min_speed is non-zero.

Parameters

Prop

Type

Returns

Self

View source

early_lambda_range

pub fn early_lambda_range(self, early_lambda_range: f32) -> Self

LemLib-TitanTron: run the early lambda once within this many inches of the target.

Parameters

Prop

Type

Returns

Self

View source

params

pub fn params(self, params: MoveToPointParams) -> Self

Replace the complete movement options.

Parameters

Prop

Type

Returns

Self

View source

run_async

pub fn run_async(self, run_async: bool) -> Self

Run in the background when true (default). With false, await completion.

Parameters

Prop

Type

Returns

Self

View source

early_lambda

pub fn early_lambda<F, Fut>(self, lambda: F) -> Self where F: Fn() -> Fut + 'static, Fut: Future<Output = ()> + 'static

Run a callback once when the early lambda range is reached.

Parameters

Prop

Type

Returns

Self

View source

set_early_lambda

pub fn set_early_lambda(self, lambda: Option<EarlyLambda>) -> Self

Set or clear the callback.

Parameters

Prop

Type

Returns

Self

View source