40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
# coding: gb2312
|
|
|
|
from DeviceDefine.consensus import UNKNOWN
|
|
from PureBackend.base_driver import MODEL_MEDIAPIPE
|
|
from PureBackend.exercise_backend import ExerciseBackend
|
|
|
|
|
|
class GEB:
|
|
_geb: ExerciseBackend = None
|
|
is_initial = False
|
|
|
|
def __init__(
|
|
self,
|
|
master_mode=True,
|
|
positioning=True,
|
|
camera=True,
|
|
model=MODEL_MEDIAPIPE,
|
|
speaker=True,
|
|
multi_positioning_mode=False,
|
|
device_type=UNKNOWN,
|
|
pure_mode=True
|
|
) -> None:
|
|
super().__init__()
|
|
if not GEB.is_initial:
|
|
GEB.is_initial = True # ±ê¼Ç¶à½ø³ÌÒÑÆô¶¯
|
|
GEB._geb = ExerciseBackend(
|
|
master_mode=master_mode,
|
|
positioning=positioning,
|
|
camera=camera,
|
|
model=model,
|
|
speaker=speaker,
|
|
multi_positioning_mode=multi_positioning_mode,
|
|
device_type=device_type,
|
|
pure_mode=pure_mode
|
|
)
|
|
|
|
@staticmethod
|
|
def get_geb():
|
|
return GEB._geb
|