更新SANT支持运动检测
This commit is contained in:
@@ -68,7 +68,7 @@ class AI:
|
||||
def motion_recognition(self, threshold=50):
|
||||
if self._func == MOTION_DEECTION:
|
||||
if self._once: self._init(threshold)
|
||||
return self._ai.read()
|
||||
return bool(self._ai.read() >= threshold)
|
||||
else:
|
||||
raise AttributeError('This model can only run motion recognition')
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@ from machine import SoftI2C, Pin
|
||||
from mixgo_sant import onboard_bot
|
||||
|
||||
class GC032A(Camera):
|
||||
def __init__(self, framesize=LCD, hmirror=None):
|
||||
def __init__(self, framesize=LCD, hmirror=None, frame=1):
|
||||
onboard_bot.cam_en(1, 500)
|
||||
super().__init__()
|
||||
super().__init__(frame)
|
||||
super().set_framesize(framesize)
|
||||
time.sleep_ms(100)
|
||||
if hmirror is not None:
|
||||
|
||||
Reference in New Issue
Block a user