diff --git a/platforms/i2c/blinkm_driver.go b/platforms/i2c/blinkm_driver.go index c32cef83..4178afd8 100644 --- a/platforms/i2c/blinkm_driver.go +++ b/platforms/i2c/blinkm_driver.go @@ -10,9 +10,10 @@ type BlinkMDriver struct { Adaptor I2cInterface } -func NewBlinkMDriver(a I2cInterface) *BlinkMDriver { +func NewBlinkMDriver(a I2cInterface, name string) *BlinkMDriver { return &BlinkMDriver{ Driver: gobot.Driver{ + Name: name, Commands: []string{ "RgbC", "FadeC", diff --git a/platforms/i2c/blinkm_driver_test.go b/platforms/i2c/blinkm_driver_test.go index bb8402c8..1803ad1b 100644 --- a/platforms/i2c/blinkm_driver_test.go +++ b/platforms/i2c/blinkm_driver_test.go @@ -12,7 +12,7 @@ var _ = Describe("BlinkM", func() { ) BeforeEach(func() { - b = NewBlinkMDriver(t) + b = NewBlinkMDriver(t, "bot") }) It("Must be able to Start", func() { diff --git a/platforms/i2c/hmc6352_driver.go b/platforms/i2c/hmc6352_driver.go index 69949adf..d7f2112b 100644 --- a/platforms/i2c/hmc6352_driver.go +++ b/platforms/i2c/hmc6352_driver.go @@ -11,8 +11,11 @@ type HMC6352Driver struct { Heading uint16 } -func NewHMC6352Driver(a I2cInterface) *HMC6352Driver { +func NewHMC6352Driver(a I2cInterface, name string) *HMC6352Driver { return &HMC6352Driver{ + Driver: gobot.Driver{ + Name: name, + }, Adaptor: a, } } diff --git a/platforms/i2c/hmc6352_driver_test.go b/platforms/i2c/hmc6352_driver_test.go index 9ad8d7a1..1e4501d1 100644 --- a/platforms/i2c/hmc6352_driver_test.go +++ b/platforms/i2c/hmc6352_driver_test.go @@ -12,7 +12,7 @@ var _ = Describe("HMC6352", func() { ) BeforeEach(func() { - h = NewHMC6352Driver(t) + h = NewHMC6352Driver(t, "bot") }) It("Must be able to Start", func() { diff --git a/platforms/i2c/wiichuck_driver.go b/platforms/i2c/wiichuck_driver.go index 5dda9a60..9f8babb7 100644 --- a/platforms/i2c/wiichuck_driver.go +++ b/platforms/i2c/wiichuck_driver.go @@ -13,9 +13,10 @@ type WiichuckDriver struct { data map[string]float64 } -func NewWiichuckDriver(a I2cInterface) *WiichuckDriver { +func NewWiichuckDriver(a I2cInterface, name string) *WiichuckDriver { return &WiichuckDriver{ Driver: gobot.Driver{ + Name: name, Events: map[string]chan interface{}{ "z_button": make(chan interface{}), "c_button": make(chan interface{}), diff --git a/platforms/i2c/wiichuck_driver_test.go b/platforms/i2c/wiichuck_driver_test.go index 6c4cabc1..84464b1b 100644 --- a/platforms/i2c/wiichuck_driver_test.go +++ b/platforms/i2c/wiichuck_driver_test.go @@ -12,7 +12,7 @@ var _ = Describe("Wiichuck", func() { ) BeforeEach(func() { - w = NewWiichuckDriver(t) + w = NewWiichuckDriver(t, "bot") }) PIt("Must be able to Start", func() {