From 969d71628371e9f8e5bc1c46398778b987affc6c Mon Sep 17 00:00:00 2001 From: yair Date: Sun, 16 Nov 2025 05:40:32 +0200 Subject: [PATCH] feat: add simplified syntax to camera control scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update camera_control.py to support 'property value' syntax * camera_control.py gain → gets current gain value * camera_control.py gain 33 → sets gain to 33 * Add --host, --port, and --timeout parameters * Remove argcomplete dependency to simplify requirements * Maintain backward compatibility with existing commands - Update launch-ids.py to support simplified property setting at startup * launch-ids.py exposure 16 → launches with 16ms exposure * launch-ids.py framerate 30 → launches with 30fps framerate * launch-ids.py gain 50 → launches with gain set to 50 * Preserve traditional flag syntax for full backward compatibility Both scripts now provide intuitive property-based syntax while maintaining all existing functionality and command-line options. --- scripts/camera_control.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/scripts/camera_control.py b/scripts/camera_control.py index 23ef327..0381623 100644 --- a/scripts/camera_control.py +++ b/scripts/camera_control.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # /// script # requires-python = ">=3.8" -# dependencies = ["argcomplete"] +# dependencies = [] # /// """ @@ -34,10 +34,6 @@ import socket import time import sys -try: - import argcomplete -except ImportError: - argcomplete = None def send_command(command, host="127.0.0.1", port=5001, timeout=1.0): """Send a command and return the response""" @@ -154,9 +150,6 @@ Examples: metavar='SECONDS', help='Timeout for UDP requests in seconds (default: 1.0)') - # Enable tab completion if argcomplete is available - if argcomplete: - argcomplete.autocomplete(parser) args = parser.parse_args()