build(boards): micropython板卡执行 npm run build:prod

This commit is contained in:
王立帮
2025-06-18 23:43:04 +08:00
parent e42a129714
commit 0d8b8b3170
61 changed files with 867 additions and 124 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')
@@ -104,3 +104,7 @@ class AI:
self._ai.delete(_id)
else:
raise AttributeError('This model can only run face recognition')
def stop(self):
if self._ai is not None:
self._ai.stop()