1
0
Fork 0
mirror of https://github.com/kidoman/embd synced 2025-07-03 03:47:33 +02:00

servo: assume good defaults for minus and maxus (544 and 2400, as per

the Arduino documentation: http://arduino.cc/en/Reference/ServoAttach)
This commit is contained in:
Karan Misra 2014-01-09 02:41:50 +05:30
parent 7c32e907e1
commit 7809d9d6ba
3 changed files with 8 additions and 3 deletions

View file

@ -7,6 +7,11 @@ import (
"github.com/kid0m4n/go-rpi/util"
)
const (
minus = 544
maxus = 2400
)
// A PWM interface implements access to a pwm controller.
type PWM interface {
SetMicroseconds(channel int, us int) error
@ -22,7 +27,7 @@ type Servo struct {
}
// New creates a new Servo interface.
func New(pwm PWM, channel int, minus, maxus int) *Servo {
func New(pwm PWM, channel int) *Servo {
return &Servo{
PWM: pwm,
Channel: channel,