feat: added way to communicate 10 basic gestures
ref: N25B-399
This commit is contained in:
@@ -12,6 +12,7 @@ class RIEndpoint(str, Enum):
|
||||
SPEECH = "actuate/speech"
|
||||
GESTURE_SINGLE = "actuate/gesture/single"
|
||||
GESTURE_TAG = "actuate/gesture/tag"
|
||||
GESTURE_BASIC = "actuate/gesture/single"
|
||||
PING = "ping"
|
||||
NEGOTIATE_PORTS = "negotiate/ports"
|
||||
|
||||
@@ -49,16 +50,13 @@ class GestureCommand(RIMessage):
|
||||
"""
|
||||
|
||||
endpoint: Literal[ # pyright: ignore[reportIncompatibleVariableOverride] - We validate this stricter rule ourselves
|
||||
RIEndpoint.GESTURE_SINGLE, RIEndpoint.GESTURE_TAG
|
||||
RIEndpoint.GESTURE_SINGLE, RIEndpoint.GESTURE_TAG, RIEndpoint.GESTURE_SINGLE
|
||||
]
|
||||
data: str
|
||||
|
||||
@model_validator(mode="after")
|
||||
def check_endpoint(self):
|
||||
allowed = {
|
||||
RIEndpoint.GESTURE_SINGLE,
|
||||
RIEndpoint.GESTURE_TAG,
|
||||
}
|
||||
allowed = {RIEndpoint.GESTURE_SINGLE, RIEndpoint.GESTURE_TAG, RIEndpoint.GESTURE_SINGLE}
|
||||
if self.endpoint not in allowed:
|
||||
raise ValueError("endpoint must be GESTURE_SINGLE or GESTURE_TAG")
|
||||
raise ValueError("endpoint must be GESTURE_SINGLE, GESTURE_TAG or GESTURE_BASIC")
|
||||
return self
|
||||
|
||||
Reference in New Issue
Block a user