diff --git a/subprojects/robotpy-cscore/cscore/__main__.py b/subprojects/robotpy-cscore/cscore/__main__.py index 51be70c6..61198e46 100644 --- a/subprojects/robotpy-cscore/cscore/__main__.py +++ b/subprojects/robotpy-cscore/cscore/__main__.py @@ -82,13 +82,6 @@ def main(): nt_server_group.add_argument( "--team", help="Team number to specify robot", type=int ) - parser.add_argument( - "--nt-protocol", - choices=[3, 4], - type=int, - help="NetworkTables protocol", - default=4, - ) parser.add_argument( "--nt-identity", default="cscore", help="NetworkTables identity" ) @@ -118,10 +111,7 @@ def main(): else: ntinst.setServer(args.robot) - if args.nt_protocol == 3: - ntinst.startClient3(args.nt_identity) - else: - ntinst.startClient4(args.nt_identity) + ntinst.startClient(args.nt_identity) # If stdin is a pipe, then die when the pipe goes away # -> this allows us to detect if a parent process exits @@ -159,12 +149,4 @@ def main(): if __name__ == "__main__": - # Setup wpi::now on roborio when executed as __main__ - try: - from ._cscore import _setupWpiNow # type: ignore - - _setupWpiNow() - except ImportError: - pass - main() diff --git a/subprojects/robotpy-cscore/cscore/src/main.cpp b/subprojects/robotpy-cscore/cscore/src/main.cpp index 03ea9987..2255306b 100644 --- a/subprojects/robotpy-cscore/cscore/src/main.cpp +++ b/subprojects/robotpy-cscore/cscore/src/main.cpp @@ -3,12 +3,6 @@ #include "cscore_cpp.h" -#ifdef __FRC_SYSTEMCORE__ -extern "C" { - void WPI_Impl_SetupNowUseDefaultOnRio(void); -} -#endif - SEMIWRAP_PYBIND11_MODULE(m) { initWrapper(m); @@ -22,8 +16,4 @@ SEMIWRAP_PYBIND11_MODULE(m) { CS_Shutdown(); }); m.add_object("_cleanup", cleanup); - - #ifdef __FRC_SYSTEMCORE__ - m.def("_setupWpiNow", WPI_Impl_SetupNowUseDefaultOnRio); - #endif -} \ No newline at end of file +} diff --git a/subprojects/robotpy-wpilib/wpilib/cameraserver.py b/subprojects/robotpy-wpilib/wpilib/cameraserver.py index fdbea945..397e3a9a 100644 --- a/subprojects/robotpy-wpilib/wpilib/cameraserver.py +++ b/subprojects/robotpy-wpilib/wpilib/cameraserver.py @@ -72,12 +72,12 @@ def launch(cls, vision_py: Optional[str] = None) -> None: # who do not. cscore handle values indicate type with bits 24-30 if vision_py: + hal.reportUsage("RobotPy/CameraServer", vision_py) if not vision_py.startswith("/"): vision_py = "/home/systemcore/py/" + vision_py args.append(vision_py) - hal.report(hal.tResourceType.kResourceType_PCVideoServer, 0x51) else: - hal.report(hal.tResourceType.kResourceType_PCVideoServer, 0x52) + hal.reportUsage("RobotPy/CameraServer", "") # We open a pipe to it so that when this process exits, it dies proc = subprocess.Popen(