Skip to content

Commit

Permalink
gpio: use new improved default namer to avoid API conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Feb 2, 2017
1 parent 2234600 commit 4041bdc
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion drivers/gpio/button_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type ButtonDriver struct {
// time.Duration: Interval at which the ButtonDriver is polled for new information
func NewButtonDriver(a DigitalReader, pin string, v ...time.Duration) *ButtonDriver {
b := &ButtonDriver{
name: "Button",
name: gobot.DefaultName("Button"),
connection: a,
pin: pin,
Active: false,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/buzzer_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ type BuzzerDriver struct {
// NewBuzzerDriver return a new BuzzerDriver given a DigitalWriter and pin.
func NewBuzzerDriver(a DigitalWriter, pin string) *BuzzerDriver {
l := &BuzzerDriver{
name: "Buzzer",
name: gobot.DefaultName("Buzzer"),
pin: pin,
connection: a,
high: false,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/direct_pin_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type DirectPinDriver struct {
// "ServoWrite" - See DirectPinDriver.ServoWrite
func NewDirectPinDriver(a gobot.Connection, pin string) *DirectPinDriver {
d := &DirectPinDriver{
name: "DirectPin",
name: gobot.DefaultName("DirectPin"),
connection: a,
pin: pin,
Commander: gobot.NewCommander(),
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/led_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type LedDriver struct {
// "Off" - See LedDriver.Off
func NewLedDriver(a DigitalWriter, pin string) *LedDriver {
l := &LedDriver{
name: "LED",
name: gobot.DefaultName("LED"),
pin: pin,
connection: a,
high: false,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/makey_button_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type MakeyButtonDriver struct {
// time.Duration: Interval at which the ButtonDriver is polled for new information
func NewMakeyButtonDriver(a DigitalReader, pin string, v ...time.Duration) *MakeyButtonDriver {
m := &MakeyButtonDriver{
name: "MakeyButton",
name: gobot.DefaultName("MakeyButton"),
connection: a,
pin: pin,
Active: false,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/motor_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type MotorDriver struct {
// NewMotorDriver return a new MotorDriver given a DigitalWriter and pin
func NewMotorDriver(a DigitalWriter, speedPin string) *MotorDriver {
return &MotorDriver{
name: "Motor",
name: gobot.DefaultName("Motor"),
connection: a,
SpeedPin: speedPin,
CurrentState: 0,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/pir_motion_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type PIRMotionDriver struct {
// time.Duration: Interval at which the PIRMotionDriver is polled for new information
func NewPIRMotionDriver(a DigitalReader, pin string, v ...time.Duration) *PIRMotionDriver {
b := &PIRMotionDriver{
name: "PIRMotion",
name: gobot.DefaultName("PIRMotion"),
connection: a,
pin: pin,
Active: false,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/relay_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type RelayDriver struct {
// "Off" - See RelayDriver.Off
func NewRelayDriver(a DigitalWriter, pin string) *RelayDriver {
l := &RelayDriver{
name: "Relay",
name: gobot.DefaultName("Relay"),
pin: pin,
connection: a,
high: false,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/rgb_led_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type RgbLedDriver struct {
// "Off" - See RgbLedDriver.Off
func NewRgbLedDriver(a DigitalWriter, redPin string, greenPin string, bluePin string) *RgbLedDriver {
l := &RgbLedDriver{
name: "RGBLED",
name: gobot.DefaultName("RGBLED"),
pinRed: redPin,
pinGreen: greenPin,
pinBlue: bluePin,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/servo_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type ServoDriver struct {
// "Max" - See ServoDriver.Max
func NewServoDriver(a ServoWriter, pin string) *ServoDriver {
s := &ServoDriver{
name: "Servo",
name: gobot.DefaultName("Servo"),
connection: a,
pin: pin,
Commander: gobot.NewCommander(),
Expand Down

0 comments on commit 4041bdc

Please sign in to comment.