Skip to content

Commit b971f87

Browse files
committed
add reset DoCommand and inf loop for data
1 parent 183c27f commit b971f87

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

pour/vinocart.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ func (vc *VinoCart) DoCommand(ctx context.Context, cmd map[string]interface{}) (
186186
vc.setStatus("manual mode")
187187
}()
188188

189+
if cmd["reset"] == true {
190+
return nil, vc.Reset(ctx)
191+
}
192+
189193
if cmd["touch"] == true {
190194
return nil, vc.Touch(ctx)
191195
}
@@ -379,13 +383,6 @@ func (vc *VinoCart) saveCupImage(ctx context.Context, prepped image.Image) error
379383
return fmt.Errorf("VIAM_MACHINE_PART_ID not defined")
380384
}
381385

382-
if vc.dataClient != nil {
383-
err := vc.saveCupImage(ctx, prepped)
384-
if err != nil {
385-
vc.logger.Warnf("couldn't save cam image: %v", err)
386-
}
387-
}
388-
389386
data, err := encodePNG(prepped)
390387
if err != nil {
391388
return err

0 commit comments

Comments
 (0)