更新SANT支持运动检测

This commit is contained in:
dahanzimin
2025-06-04 18:45:17 +08:00
parent 9d276a3f4b
commit b92b3f550a
2 changed files with 3 additions and 3 deletions

View File

@@ -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')

View File

@@ -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: