Say when a command is never acknowledged
15 commands go on the unacknowledged buffer, so acked=false is their normal outcome rather than a failure. Reporting it bare made a working camera move look broken; the note now says to confirm with get_state instead.
This commit is contained in:
@@ -10,7 +10,7 @@ from mcbebop.config import Settings
|
|||||||
from mcbebop.models import SendResult
|
from mcbebop.models import SendResult
|
||||||
from mcbebop.protocol import xml_index
|
from mcbebop.protocol import xml_index
|
||||||
from mcbebop.protocol.safety import ALWAYS_ALLOWED
|
from mcbebop.protocol.safety import ALWAYS_ALLOWED
|
||||||
from mcbebop.protocol.types import Direction, Tier
|
from mcbebop.protocol.types import Buffer, Direction, Tier
|
||||||
from mcbebop.tools._common import app, require_session
|
from mcbebop.tools._common import app, require_session
|
||||||
|
|
||||||
LOCKED_TIERS = (Tier.MOTION, Tier.ENVELOPE)
|
LOCKED_TIERS = (Tier.MOTION, Tier.ENVELOPE)
|
||||||
@@ -70,7 +70,15 @@ def register(mcp: FastMCP, settings: Settings) -> None:
|
|||||||
session = require_session()
|
session = require_session()
|
||||||
|
|
||||||
note = ""
|
note = ""
|
||||||
if xml_index.supports_bebop2(spec.support) is False:
|
if spec.buffer is Buffer.NON_ACK:
|
||||||
|
# Fire-and-forget by design: piloting and camera commands go on the
|
||||||
|
# unacknowledged buffer, so acked=false here means "never acked",
|
||||||
|
# not "failed". Say so, or a working command reads as a failure.
|
||||||
|
note = (
|
||||||
|
"Sent on the unacknowledged buffer, so the drone never replies to it; "
|
||||||
|
"acked=false is expected. Confirm it took effect with get_state()."
|
||||||
|
)
|
||||||
|
elif xml_index.supports_bebop2(spec.support) is False:
|
||||||
note = f"The XML does not list the Bebop 2 as supporting this (support={spec.support!r})."
|
note = f"The XML does not list the Bebop 2 as supporting this (support={spec.support!r})."
|
||||||
elif spec.deprecated:
|
elif spec.deprecated:
|
||||||
note = "Parrot marks this command deprecated; the drone may ignore it."
|
note = "Parrot marks this command deprecated; the drone may ignore it."
|
||||||
|
|||||||
Reference in New Issue
Block a user