moveToPosition method

  1. @override
Future<void> moveToPosition(
  1. List<double> positions,
  2. List<double> speeds, {
  3. Map<String, dynamic>? extra,
})
override

Move the gantry to a new position in millimeters at the requested speeds in millimeters/second.

await myGantry.moveToPosition([0.0, 20.5], [15, 15]);

For more information, see Gantry component.

Implementation

@override
Future<void> moveToPosition(List<double> positions, List<double> speeds, {Map<String, dynamic>? extra}) async {
  final request = MoveToPositionRequest()
    ..name = name
    ..positionsMm.addAll(positions)
    ..speedsMmPerSec.addAll(speeds)
    ..extra = extra?.toStruct() ?? Struct();
  await client.moveToPosition(request);
}