resetZeroPosition method

  1. @override
Future<void> resetZeroPosition(
  1. double offset, {
  2. Map<String, dynamic>? extra,
})
override

Set the current position (modified by offset) to be the new zero (home) position.

// Set the current position as the new home position with no offset.
await myMotor.resetZeroPosition(0.0);

For more information, see Motor component.

Implementation

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