spin method

  1. @override
Future<void> spin(
  1. double angle,
  2. double velocity, {
  3. Map<String, dynamic>? extra,
})
override

Spin the Base in place angle degrees, at the given angular velocity, expressed in degrees per second.

When velocity is 0, the Base will stop. This method blocks until completed or canceled.

// Spin the base 10 degrees at 15 deg/s
await myBase.spin(10, 15);

For more information, see Base component.

Implementation

@override
Future<void> spin(double angle, double velocity, {Map<String, dynamic>? extra}) async {
  final request = SpinRequest()
    ..name = name
    ..angleDeg = angle
    ..degsPerSec = velocity
    ..extra = extra?.toStruct() ?? Struct();
  await client.spin(request);
}