File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -613,20 +613,25 @@ def set_motion_detection(self, enabled=1):
613613 Get the current config and set the motion detection on or off
614614 '''
615615 result , current_config = self .get_motion_detect_config ()
616+ if result != FOSCAM_SUCCESS :
617+ return result
616618 current_config ['isEnable' ] = enabled
617619 self .set_motion_detect_config (current_config )
620+ return FOSCAM_SUCCESS
618621
619622 def enable_motion_detection (self ):
620623 '''
621624 Enable motion detection
622625 '''
623- self .set_motion_detection (1 )
626+ result = self .set_motion_detection (1 )
627+ return result
624628
625629 def disable_motion_detection (self ):
626630 '''
627631 disable motion detection
628632 '''
629- self .set_motion_detection (0 )
633+ result = self .set_motion_detection (0 )
634+ return result
630635
631636 def get_alarm_record_config (self , callback = None ):
632637 '''
You can’t perform that action at this time.
0 commit comments