Documentation ¶
Overview ¶
Package fake implements a fake encoder.
Index ¶
- type Encoder
- func (e *Encoder) GetTicksCount(ctx context.Context, extra map[string]interface{}) (int64, error)
- func (e *Encoder) Reset(ctx context.Context, offset int64, extra map[string]interface{}) error
- func (e *Encoder) SetPosition(ctx context.Context, position int64) error
- func (e *Encoder) SetSpeed(ctx context.Context, speed float64) error
- func (e *Encoder) Start(cancelCtx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder struct { generic.Unimplemented // contains filtered or unexported fields }
Encoder keeps track of a fake motor position.
func (*Encoder) GetTicksCount ¶
GetTicksCount returns the current position in terms of ticks.
func (*Encoder) Reset ¶
Reset sets the current position of the motor (adjusted by a given offset) to be its new zero position.
func (*Encoder) SetPosition ¶
SetPosition sets the position of the encoder.
Click to show internal directories.
Click to hide internal directories.