core: update OpenCV platform to simply return error
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
1ec2497c64
commit
ed50f7fef7
|
@ -28,7 +28,7 @@ func TestCameraDriver(t *testing.T) {
|
|||
func TestCameraDriverStart(t *testing.T) {
|
||||
sem := make(chan bool)
|
||||
d := initTestCameraDriver()
|
||||
gobottest.Assert(t, len(d.Start()), 0)
|
||||
gobottest.Assert(t, d.Start(), nil)
|
||||
d.On(d.Event("frame"), func(data interface{}) {
|
||||
sem <- true
|
||||
})
|
||||
|
@ -39,13 +39,13 @@ func TestCameraDriverStart(t *testing.T) {
|
|||
}
|
||||
|
||||
d = NewCameraDriver("")
|
||||
gobottest.Assert(t, len(d.Start()), 0)
|
||||
gobottest.Assert(t, d.Start(), nil)
|
||||
|
||||
d = NewCameraDriver(true)
|
||||
gobottest.Refute(t, len(d.Start()), 0)
|
||||
gobottest.Refute(t, d.Start(), nil)
|
||||
}
|
||||
|
||||
func TestCameraDriverHalt(t *testing.T) {
|
||||
d := initTestCameraDriver()
|
||||
gobottest.Assert(t, len(d.Halt()), 0)
|
||||
gobottest.Assert(t, d.Halt(), nil)
|
||||
}
|
||||
|
|
|
@ -31,14 +31,14 @@ func (w *WindowDriver) SetName(n string) { w.name = n }
|
|||
func (w *WindowDriver) Connection() gobot.Connection { return nil }
|
||||
|
||||
// Start starts window thread and driver
|
||||
func (w *WindowDriver) Start() (errs []error) {
|
||||
func (w *WindowDriver) Start() (err error) {
|
||||
cv.StartWindowThread()
|
||||
w.start(w)
|
||||
return
|
||||
}
|
||||
|
||||
// Halt returns true if camera is halted successfully
|
||||
func (w *WindowDriver) Halt() (errs []error) { return }
|
||||
func (w *WindowDriver) Halt() (err error) { return }
|
||||
|
||||
// ShowImage displays image in window
|
||||
func (w *WindowDriver) ShowImage(image *cv.IplImage) {
|
||||
|
|
|
@ -25,12 +25,12 @@ func TestWindowDriver(t *testing.T) {
|
|||
|
||||
func TestWindowDriverStart(t *testing.T) {
|
||||
d := initTestWindowDriver()
|
||||
gobottest.Assert(t, len(d.Start()), 0)
|
||||
gobottest.Assert(t, d.Start(), nil)
|
||||
}
|
||||
|
||||
func TestWindowDriverHalt(t *testing.T) {
|
||||
d := initTestWindowDriver()
|
||||
gobottest.Assert(t, len(d.Halt()), 0)
|
||||
gobottest.Assert(t, d.Halt(), nil)
|
||||
}
|
||||
|
||||
func TestWindowDriverShowImage(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue