fake

package
v0.12.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package fake implements a fake servo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Servo

type Servo struct {
	resource.Named
	resource.TriviallyReconfigurable
	resource.TriviallyCloseable
	// contains filtered or unexported fields
}

A Servo allows setting and reading a single angle.

func (*Servo) IsMoving

func (s *Servo) IsMoving(ctx context.Context) (bool, error)

IsMoving is always false for a fake servo.

func (*Servo) Move

func (s *Servo) Move(ctx context.Context, angleDeg uint32, extra map[string]interface{}) error

Move sets the given angle.

func (*Servo) Position

func (s *Servo) Position(ctx context.Context, extra map[string]interface{}) (uint32, error)

Position returns the set angle.

func (*Servo) Stop

func (s *Servo) Stop(ctx context.Context, extra map[string]interface{}) error

Stop doesn't do anything for a fake servo.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL