Skip to content

Commit

Permalink
correct error name and remove unnessesary code
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Nov 4, 2021
1 parent 2eec61c commit 5aac8f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/thermal-recorder/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (s *service) TakeSnapshot(lastFrame int) (*cptvframe.Frame, *dbus.Error) {
f, err := newSnapshot(lastFrame)
if err != nil {
return nil, &dbus.Error{
Name: dbusName + ".StayOnForError",
Name: dbusName + ".TakeSnapshot",
Body: []interface{}{err.Error()},
}
}
Expand Down
6 changes: 1 addition & 5 deletions motion/motionprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,7 @@ func (mp *MotionProcessor) Process(rawFrame []byte) error {
mp.stopConstantRecorder()
return err
}
if mp.CurrentFrame == math.MaxUint32 {
mp.CurrentFrame = 0
} else {
mp.CurrentFrame += 1
}
mp.CurrentFrame += 1
mp.process(frame)
mp.processConstantRecorder(frame)
return nil
Expand Down

0 comments on commit 5aac8f6

Please sign in to comment.