Correct the one-controller claim: the drone takes over, it does not refuse
Tested on the aircraft. A second ARSDK handshake is accepted and telemetry is redirected to it; the first session's frames stop while it still reports connected = True. So the claim inherited from pyparrot's error text, which had reached our error messages, tool descriptions, simulator behaviour and a test name, was wrong in the most misleading direction: a refusal would be loud, and this is silent. The simulator now models the takeover by default; refusal stays available because a client must handle a non-zero status anyway.
This commit is contained in:
@@ -55,3 +55,19 @@ def test_acknowledgement_is_decided_by_data_type_not_buffer():
|
||||
frame = Frame(DataType.DATA_WITH_ACK, buffer_id, 9, b"\x00\x05\x00\x00")
|
||||
assert Frame.decode_all(frame.encode())[0].buffer_id == buffer_id
|
||||
assert 0 <= BufferId.ack_for(buffer_id) <= 255
|
||||
|
||||
|
||||
def test_simulator_models_takeover_not_refusal_by_default():
|
||||
"""The aircraft accepts a second controller; it does not refuse one.
|
||||
|
||||
Tested on the real drone 2026-10-02: session A's frames froze at 264 while
|
||||
session B took over, and A went on reporting connected = True. The
|
||||
simulator defaulted to refusing, which is the same unverified assumption
|
||||
the client carried, so no test could catch the difference.
|
||||
"""
|
||||
import dataclasses
|
||||
|
||||
from mcbebop.sim import FakeBebop
|
||||
|
||||
field = next(f for f in dataclasses.fields(FakeBebop) if f.name == "single_controller")
|
||||
assert field.default is False, "the default must model the aircraft, not the folklore"
|
||||
|
||||
Reference in New Issue
Block a user