docs: Add missing godocs for OpenCV platform

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2016-12-01 14:58:58 +01:00
parent 8d924d9546
commit bde78fd1e9
2 changed files with 16 additions and 4 deletions

View File

@ -19,6 +19,7 @@ const (
Frame = "frame" Frame = "frame"
) )
// CameraDriver is the Gobot Driver for the OpenCV camera
type CameraDriver struct { type CameraDriver struct {
name string name string
camera capture camera capture
@ -58,8 +59,13 @@ func NewCameraDriver(source interface{}, v ...time.Duration) *CameraDriver {
return c return c
} }
// Name returns the Driver name
func (c *CameraDriver) Name() string { return c.name } func (c *CameraDriver) Name() string { return c.name }
// SetName sets the Driver name
func (c *CameraDriver) SetName(n string) { c.name = n } func (c *CameraDriver) SetName(n string) { c.name = n }
// Connection returns the Driver's connection
func (c *CameraDriver) Connection() gobot.Connection { return nil } func (c *CameraDriver) Connection() gobot.Connection { return nil }
// Start initializes camera by grabbing a frame // Start initializes camera by grabbing a frame

View File

@ -9,6 +9,7 @@ type window interface {
ShowImage(*cv.IplImage) ShowImage(*cv.IplImage)
} }
// WindowDriver is the Gobot Driver for the OpenCV window
type WindowDriver struct { type WindowDriver struct {
name string name string
window window window window
@ -26,8 +27,13 @@ func NewWindowDriver() *WindowDriver {
} }
} }
// Name returns the Driver name
func (w *WindowDriver) Name() string { return w.name } func (w *WindowDriver) Name() string { return w.name }
// SetName sets the Driver name
func (w *WindowDriver) SetName(n string) { w.name = n } func (w *WindowDriver) SetName(n string) { w.name = n }
// Connection returns the Driver's connection
func (w *WindowDriver) Connection() gobot.Connection { return nil } func (w *WindowDriver) Connection() gobot.Connection { return nil }
// Start starts window thread and driver // Start starts window thread and driver