File tree Expand file tree Collapse file tree 3 files changed +4
-32
lines changed Expand file tree Collapse file tree 3 files changed +4
-32
lines changed Original file line number Diff line number Diff line change @@ -82,13 +82,6 @@ def main():
82
82
nt_server_group .add_argument (
83
83
"--team" , help = "Team number to specify robot" , type = int
84
84
)
85
- parser .add_argument (
86
- "--nt-protocol" ,
87
- choices = [3 , 4 ],
88
- type = int ,
89
- help = "NetworkTables protocol" ,
90
- default = 4 ,
91
- )
92
85
parser .add_argument (
93
86
"--nt-identity" , default = "cscore" , help = "NetworkTables identity"
94
87
)
@@ -118,10 +111,7 @@ def main():
118
111
else :
119
112
ntinst .setServer (args .robot )
120
113
121
- if args .nt_protocol == 3 :
122
- ntinst .startClient3 (args .nt_identity )
123
- else :
124
- ntinst .startClient4 (args .nt_identity )
114
+ ntinst .startClient (args .nt_identity )
125
115
126
116
# If stdin is a pipe, then die when the pipe goes away
127
117
# -> this allows us to detect if a parent process exits
@@ -159,12 +149,4 @@ def main():
159
149
160
150
161
151
if __name__ == "__main__" :
162
- # Setup wpi::now on roborio when executed as __main__
163
- try :
164
- from ._cscore import _setupWpiNow # type: ignore
165
-
166
- _setupWpiNow ()
167
- except ImportError :
168
- pass
169
-
170
152
main ()
Original file line number Diff line number Diff line change 3
3
4
4
#include " cscore_cpp.h"
5
5
6
- #ifdef __FRC_SYSTEMCORE__
7
- extern " C" {
8
- void WPI_Impl_SetupNowUseDefaultOnRio (void );
9
- }
10
- #endif
11
-
12
6
SEMIWRAP_PYBIND11_MODULE (m) {
13
7
initWrapper (m);
14
8
@@ -22,8 +16,4 @@ SEMIWRAP_PYBIND11_MODULE(m) {
22
16
CS_Shutdown ();
23
17
});
24
18
m.add_object (" _cleanup" , cleanup);
25
-
26
- #ifdef __FRC_SYSTEMCORE__
27
- m.def (" _setupWpiNow" , WPI_Impl_SetupNowUseDefaultOnRio);
28
- #endif
29
- }
19
+ }
Original file line number Diff line number Diff line change @@ -72,12 +72,12 @@ def launch(cls, vision_py: Optional[str] = None) -> None:
72
72
# who do not. cscore handle values indicate type with bits 24-30
73
73
74
74
if vision_py :
75
+ hal .reportUsage ("RobotPy/CameraServer" , vision_py )
75
76
if not vision_py .startswith ("/" ):
76
77
vision_py = "/home/systemcore/py/" + vision_py
77
78
args .append (vision_py )
78
- hal .report (hal .tResourceType .kResourceType_PCVideoServer , 0x51 )
79
79
else :
80
- hal .report ( hal . tResourceType . kResourceType_PCVideoServer , 0x52 )
80
+ hal .reportUsage ( "RobotPy/CameraServer" , "" )
81
81
82
82
# We open a pipe to it so that when this process exits, it dies
83
83
proc = subprocess .Popen (
You can’t perform that action at this time.
0 commit comments