resetPosition method

  1. @override
Future<void> resetPosition({
  1. Map<String, dynamic>? extra,
})
override

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

// Set the current position as the new home position.
await myEncoder.resetPosition();

For more information, see Encoder component.

Implementation

@override
Future<void> resetPosition({Map<String, dynamic>? extra}) async {
  final request = ResetPositionRequest()
    ..name = name
    ..extra = extra?.toStruct() ?? Struct();
  await client.resetPosition(request, options: callOptions);
}