3636
3737LAUNCH_DELAY_S = 0.1
3838
39+ # The test-mode session bound to the currently running test
3940ACTIVE_SESSION = None
40- """The test-mode session bound to the currently running test, or None.
41-
42- Set by the test-mode launcher (software.gameplay_tests.test_mode) while a
43- selected test runs, so that gameplay_test_runner binds the test to the open
44- Thunderscope instead of launching new binaries.
45- """
4641
4742
4843@dataclass
@@ -56,17 +51,12 @@ class SessionContext:
5651 blue_full_system_proto_unix_io : ProtoUnixIO
5752 yellow_full_system_proto_unix_io : ProtoUnixIO
5853 simulator_proto_unix_io : ProtoUnixIO
59- gamecontroller : Any
60- robot_communication : Optional [Any ] = None
61- """The RobotCommunication instance, only set for field tests"""
62- estop_mode : Optional [Any ] = None
63- """The EstopMode, only set for field tests"""
64- simulator : Optional [Any ] = None
65- """The Simulator context manager, only set for simulated tests"""
66- blue_full_system : Optional [Any ] = None
67- """The blue FullSystem context manager, only set for simulated tests"""
68- yellow_full_system : Optional [Any ] = None
69- """The yellow FullSystem context manager, only set for simulated tests"""
54+ gamecontroller : Gamecontroller
55+ robot_communication : Optional [RobotCommunication ] = None
56+ estop_mode : Optional [EstopMode ] = None
57+ simulator : Optional [Simulator ] = None
58+ blue_full_system : Optional [FullSystem ] = None
59+ yellow_full_system : Optional [FullSystem ] = None
7060
7161
7262@pytest .fixture
@@ -174,9 +164,7 @@ def simulated_session(args, runtime_subpath):
174164 should_restart_on_crash = False ,
175165 running_in_realtime = args .enable_thunderscope and not args .ci_mode ,
176166 ) as yellow_fs ,
177- Gamecontroller (
178- suppress_logs = (not args .show_gamecontroller_logs )
179- ) as gamecontroller ,
167+ Gamecontroller (suppress_logs = (not args .verbose )) as gamecontroller ,
180168 ):
181169 blue_fs .setup_proto_unix_io (blue_full_system_proto_unix_io )
182170 yellow_fs .setup_proto_unix_io (yellow_full_system_proto_unix_io )
@@ -189,6 +177,7 @@ def simulated_session(args, runtime_subpath):
189177 gamecontroller .setup_proto_unix_io (
190178 blue_full_system_proto_unix_io = blue_full_system_proto_unix_io ,
191179 yellow_full_system_proto_unix_io = yellow_full_system_proto_unix_io ,
180+ simulator_proto_unix_io = None , # None so that gamecontroller doesn't set robot limit
192181 )
193182
194183 time .sleep (LAUNCH_DELAY_S )
@@ -240,7 +229,7 @@ def field_session(args, runtime_subpath):
240229 ) as friendly_fs ,
241230 Gamecontroller (
242231 # we would be using conventional port if and only if we are playing in robocup.
243- suppress_logs = (not args .show_gamecontroller_logs ),
232+ suppress_logs = (not args .verbose ),
244233 use_conventional_port = False ,
245234 ) as gamecontroller ,
246235 WifiCommunicationManager (
0 commit comments