getMotorData method

List<MetricLine> getMotorData(
  1. MotorData motor
)

Returns a description of a MotorData.

Implementation

List<MetricLine> getMotorData(MotorData motor) => [
	MetricLine("  Is moving? ${motor.isMoving.displayName}", severity: motor.isMoving.toBool() ? Severity.info : null),
	MetricLine("  Limit? ${motor.isLimitSwitchPressed.displayName}", severity: motor.isLimitSwitchPressed.toBool() ? Severity.warning : null),
	MetricLine("  Direction: ${motor.direction.humanName}"),
	MetricLine("  Steps: ${motor.currentStep} --> ${motor.targetStep}"),
	MetricLine("  Angle: ${motor.angle.toDegrees()} degrees"),
];