Documentation ¶
Index ¶
- type Connector
- type Position
- type Servo
- func (svo *Servo) Apply(w http.ResponseWriter)
- func (svo *Servo) Connect(router *mux.Router, prefix string)
- func (svo *Servo) Ease(w http.ResponseWriter, r *http.Request)
- func (svo *Servo) Home(w http.ResponseWriter, r *http.Request)
- func (svo *Servo) Move(w http.ResponseWriter, r *http.Request)
- func (svo *Servo) Stop(w http.ResponseWriter, r *http.Request)
- func (svo *Servo) Test(w http.ResponseWriter, r *http.Request)
- type ServoCommand
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector struct { Servos []*Servo `json:"servos"` // contains filtered or unexported fields }
func NewConnector ¶
func (*Connector) Initialize ¶
func (conn *Connector) Initialize()
type Servo ¶
type Servo struct { Index uint `json:"index"` Title string `json:"title"` ControlUrl string `json:"controlUrl"` Settings Settings `json:"settings"` Command ServoCommand `json:"command"` Angle uint `json:"angle"` Speed uint `json:"speed"` EaseType uint `json:"easeType"` SettingForms forms.Forms `json:"-"` CommandForms forms.Forms `json:"-"` }
func (*Servo) Apply ¶
func (svo *Servo) Apply(w http.ResponseWriter)
type ServoCommand ¶
type ServoCommand uint
const ( ServoBase ServoCommand = iota ServoHome ServoMove ServoEase ServoTest ServoStop ServoMax )
func ServoCommands ¶
func ServoCommands() []ServoCommand
func (ServoCommand) String ¶
func (svoc ServoCommand) String() string
Click to show internal directories.
Click to hide internal directories.