build(boards): micropython板卡执行 npm run build:prod
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')
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user