Documentation ¶
Index ¶
- Constants
- type Access
- type InstByte
- type InstName
- type Instruction
- type InstructionMap
- type Servo
- func (s *Servo) AngleLimitRead() ([]byte, error)
- func (s *Servo) AngleLimitWrite(minAngle uint16, maxAngle uint16) error
- func (s *Servo) AngleOffsetAdjust(adjust uint16) error
- func (s *Servo) AngleOffsetRead() ([]byte, error)
- func (s *Servo) AngleOffsetWrite() error
- func (s *Servo) IDRead() ([]byte, error)
- func (s *Servo) IDWrite(newID uint16) error
- func (s *Servo) LEDControlRead() ([]byte, error)
- func (s *Servo) LEDControlWrite(isAlwayOn uint16) error
- func (s *Servo) LEDErrorRead() ([]byte, error)
- func (s *Servo) LEDErrorWrite(lightColor uint16) error
- func (s *Servo) LoadOrUnloadRead() ([]byte, error)
- func (s *Servo) LoadOrUnloadWrite(isLoad uint16) error
- func (s *Servo) MotorModeRead() ([]byte, error)
- func (s *Servo) MotorModeWrite(isMotor uint16, speed uint16) error
- func (s *Servo) MoveStart() error
- func (s *Servo) MoveStop() ([]byte, error)
- func (s *Servo) MoveTimeRead() ([]byte, error)
- func (s *Servo) MoveTimeWaitRead() ([]byte, error)
- func (s *Servo) MoveTimeWaitWrite(position uint16, ms uint16) error
- func (s *Servo) MoveTimeWrite(position uint16, ms uint16) error
- func (s *Servo) PositionRead() ([]byte, error)
- func (s *Servo) SendInstruction(i InstName, values []uint16) error
- func (s *Servo) TemperatureMaxLimitRead() ([]byte, error)
- func (s *Servo) TemperatureMaxLimitWrite(maxTemperature uint16) error
- func (s *Servo) TemperatureRead() ([]byte, error)
- func (s *Servo) VoltageLimitRead() ([]byte, error)
- func (s *Servo) VoltageLimitWrite(minVoltage uint16, maxVoltage uint16) error
- func (s *Servo) VoltageRead() ([]byte, error)
Constants ¶
View Source
const ( MoveTimeWrite InstName = iota MoveTimeRead MoveTimeWaitWrite MoveTimeWaitRead MoveStart MoveStop IDWrite IDRead AngleOffsetAdjust AngleOffsetWrite AngleOffsetRead AngleLimitWrite AngleLimitRead VoltageLimitWrite VoltageLimitRead TemperatureMaxLimitWrite TemperatureMaxLimitRead TemperatureRead VoltageRead PositionRead MotorModeWrite MotorModeRead LoadOrUnloadWrite LoadOrUnloadRead LEDControlWrite LEDControlRead LEDErrorWrite LEDErrorRead RO Access = false RW Access = true )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Instruction ¶
type InstructionMap ¶
type InstructionMap map[InstName]*Instruction
type Servo ¶
func New ¶
func New(proto iface.Protocol, instructions InstructionMap, ID int) *Servo
New returns a new Servo.
func (*Servo) AngleLimitRead ¶
AngleLimitRead TODO: translate byte to angle and position
func (*Servo) AngleLimitWrite ¶
AngleLimitWrite: Set angle limit
func (*Servo) AngleOffsetAdjust ¶
AngleOffsetAdjust
func (*Servo) AngleOffsetRead ¶
AngleOffsetRead: Read Offset from Servo's EEPROM
func (*Servo) AngleOffsetWrite ¶
AngleOffsetWrite: Save Offset to Servo's EEPROM
func (*Servo) LEDControlWrite ¶
LEDControlWrite
func (*Servo) LEDErrorWrite ¶
LEDErrorWrite lightColor: 1~7
func (*Servo) LoadOrUnloadRead ¶
LoadOrUnloadRead
func (*Servo) LoadOrUnloadWrite ¶
LoadOrUnloadWrite
func (*Servo) MotorModeWrite ¶
MotorModeWrite speed: -1000 to 1000
func (*Servo) MoveTimeWaitRead ¶
MoveTimeWaitRead
func (*Servo) MoveTimeWaitWrite ¶
MoveTimeWaitWrite
func (*Servo) MoveTimeWrite ¶
MoveTimeWrite
func (*Servo) TemperatureMaxLimitRead ¶
TemperatureMaxLimitRead
func (*Servo) TemperatureMaxLimitWrite ¶
TemperatureMaxLimitWrite
func (*Servo) VoltageLimitRead ¶
VoltageLimitRead
func (*Servo) VoltageLimitWrite ¶
VoltageLimitWrite
Source Files ¶
Click to show internal directories.
Click to hide internal directories.