监听拍头demo

async test.demo_touch.test_ObserveHeadRacket()[源代码]

监听拍头事件demo

监听拍头事件,当机器人头部被拍击时,上报拍头类型

当机器人头部被双击时,停止监听,并跳一个舞蹈

# ObserveHeadRacketResponse.type:

# class HeadRacketType(enum.Enum):

# SINGLE_CLICK = 1 # 单击

# LONG_PRESS = 2 # 长按

# DOUBLE_CLICK = 3 # 双击