3030
3131
3232def _build_parser () -> argparse .ArgumentParser :
33- parser = argparse .ArgumentParser (
34- description = "Minimal Tk monitor GUI for the robot gateway"
35- )
33+ parser = argparse .ArgumentParser (description = "Minimal Tk monitor GUI for the robot gateway" )
3634 parser .add_argument ("--host" , default = "127.0.0.1" , help = "gRPC gateway host" )
3735 parser .add_argument ("--port" , type = int , default = 50051 , help = "gRPC gateway port" )
3836 parser .add_argument (
@@ -153,18 +151,10 @@ def _build_layout(self) -> None:
153151 self ._add_labeled_entry (connection_frame , "Host" , self ._host_var , 0 , 0 )
154152 self ._add_labeled_entry (connection_frame , "Port" , self ._port_var , 0 , 2 , width = 10 )
155153 self ._add_labeled_entry (connection_frame , "Preview Host" , self ._preview_host_var , 1 , 0 )
156- self ._add_labeled_entry (
157- connection_frame , "Preview Port" , self ._preview_port_var , 1 , 2 , width = 10
158- )
159- self ._add_labeled_entry (
160- connection_frame , "Latency ms" , self ._preview_latency_var , 2 , 0 , width = 10
161- )
162- self ._add_labeled_entry (
163- connection_frame , "gst-launch" , self ._gst_launch_path_var , 2 , 2
164- )
165- self ._add_labeled_entry (
166- connection_frame , "Poll Interval (s)" , self ._poll_interval_var , 3 , 0 , width = 10
167- )
154+ self ._add_labeled_entry (connection_frame , "Preview Port" , self ._preview_port_var , 1 , 2 , width = 10 )
155+ self ._add_labeled_entry (connection_frame , "Latency ms" , self ._preview_latency_var , 2 , 0 , width = 10 )
156+ self ._add_labeled_entry (connection_frame , "gst-launch" , self ._gst_launch_path_var , 2 , 2 )
157+ self ._add_labeled_entry (connection_frame , "Poll Interval (s)" , self ._poll_interval_var , 3 , 0 , width = 10 )
168158 ttk .Label (connection_frame , text = "Profile" ).grid (row = 3 , column = 2 , sticky = tk .W , pady = (8 , 0 ))
169159 profile_box = ttk .Combobox (
170160 connection_frame ,
@@ -181,21 +171,11 @@ def _build_layout(self) -> None:
181171 controls = ttk .Frame (container )
182172 controls .pack (fill = tk .X , pady = (0 , 10 ))
183173 ttk .Button (controls , text = "Refresh" , command = self .refresh_status ).pack (side = tk .LEFT )
184- ttk .Button (controls , text = "Start Watch" , command = self .start_watch ).pack (
185- side = tk .LEFT , padx = (8 , 0 )
186- )
187- ttk .Button (controls , text = "Stop Watch" , command = self .stop_watch ).pack (
188- side = tk .LEFT , padx = (8 , 0 )
189- )
190- ttk .Button (controls , text = "Preview On" , command = self .preview_on ).pack (
191- side = tk .LEFT , padx = (24 , 0 )
192- )
193- ttk .Button (controls , text = "Preview Off" , command = self .preview_off ).pack (
194- side = tk .LEFT , padx = (8 , 0 )
195- )
196- ttk .Button (controls , text = "Open Viewer" , command = self .open_viewer ).pack (
197- side = tk .LEFT , padx = (24 , 0 )
198- )
174+ ttk .Button (controls , text = "Start Watch" , command = self .start_watch ).pack (side = tk .LEFT , padx = (8 , 0 ))
175+ ttk .Button (controls , text = "Stop Watch" , command = self .stop_watch ).pack (side = tk .LEFT , padx = (8 , 0 ))
176+ ttk .Button (controls , text = "Preview On" , command = self .preview_on ).pack (side = tk .LEFT , padx = (24 , 0 ))
177+ ttk .Button (controls , text = "Preview Off" , command = self .preview_off ).pack (side = tk .LEFT , padx = (8 , 0 ))
178+ ttk .Button (controls , text = "Open Viewer" , command = self .open_viewer ).pack (side = tk .LEFT , padx = (24 , 0 ))
199179
200180 body = ttk .Panedwindow (container , orient = tk .VERTICAL )
201181 body .pack (fill = tk .BOTH , expand = True )
0 commit comments