diff --git a/platforms/opencv/camera_driver.go b/platforms/opencv/camera_driver.go index 61952f05..7a387e90 100644 --- a/platforms/opencv/camera_driver.go +++ b/platforms/opencv/camera_driver.go @@ -19,6 +19,7 @@ const ( Frame = "frame" ) +// CameraDriver is the Gobot Driver for the OpenCV camera type CameraDriver struct { name string camera capture @@ -58,8 +59,13 @@ func NewCameraDriver(source interface{}, v ...time.Duration) *CameraDriver { return c } -func (c *CameraDriver) Name() string { return c.name } -func (c *CameraDriver) SetName(n string) { c.name = n } +// Name returns the Driver name +func (c *CameraDriver) Name() string { return c.name } + +// SetName sets the Driver name +func (c *CameraDriver) SetName(n string) { c.name = n } + +// Connection returns the Driver's connection func (c *CameraDriver) Connection() gobot.Connection { return nil } // Start initializes camera by grabbing a frame diff --git a/platforms/opencv/window_driver.go b/platforms/opencv/window_driver.go index 6be51fd4..73d4a6a5 100644 --- a/platforms/opencv/window_driver.go +++ b/platforms/opencv/window_driver.go @@ -9,6 +9,7 @@ type window interface { ShowImage(*cv.IplImage) } +// WindowDriver is the Gobot Driver for the OpenCV window type WindowDriver struct { name string window window @@ -26,8 +27,13 @@ func NewWindowDriver() *WindowDriver { } } -func (w *WindowDriver) Name() string { return w.name } -func (w *WindowDriver) SetName(n string) { w.name = n } +// Name returns the Driver name +func (w *WindowDriver) Name() string { return w.name } + +// SetName sets the Driver name +func (w *WindowDriver) SetName(n string) { w.name = n } + +// Connection returns the Driver's connection func (w *WindowDriver) Connection() gobot.Connection { return nil } // Start starts window thread and driver