goTo method

  1. @override
Future<void> goTo(
  1. double rpm,
  2. double positionRevolutions, {
  3. Map<String, dynamic>? extra,
})
override

Spin the Motor to the specified position (provided in revolutions from home/zero), at the specified speed, in revolutions per minute. Regardless of the directionality of the rpm this function will move the Motor towards the specified position.

// Turn the motor to 8.3 revolutions from home at 75 RPM.
await myMotor.goTo(75, 8.3);

For more information, see Motor component.

Implementation

@override
Future<void> goTo(double rpm, double positionRevolutions, {Map<String, dynamic>? extra}) async {
  final request = GoToRequest()
    ..name = name
    ..rpm = rpm
    ..positionRevolutions = positionRevolutions
    ..extra = extra?.toStruct() ?? Struct();
  await client.goTo(request);
}