Add IS_GET_GAINBOOST support to IDS uEye plugin

- Add gain-boost property to gstidsueyesrc (boolean)
- Implement is_SetGainBoost() API call in property setter and framerate/exposure function
- Add UDP control commands SET_GAIN_BOOST and GET_GAIN_BOOST
- Add --gain-boost command-line flag to launch-ids.py
- Update camera_control.py with get-gain-boost and set-gain-boost commands
- Change parameter defaults to None (exposure, framerate, gain) to respect INI file defaults
- Only set properties when explicitly provided by user - INI file is source of truth
This commit is contained in:
yair
2025-11-16 04:58:17 +02:00
parent 48f669f5c8
commit b62451d80f
4 changed files with 149 additions and 28 deletions

View File

@@ -19,6 +19,8 @@ Usage:
uv run scripts/camera_control.py set-auto-exposure 1 # Enable auto-exposure
uv run scripts/camera_control.py get-auto-gain # Get auto-gain status
uv run scripts/camera_control.py set-auto-gain 1 # Enable auto-gain
uv run scripts/camera_control.py get-gain-boost # Get gain boost status
uv run scripts/camera_control.py set-gain-boost 1 # Enable gain boost
uv run scripts/camera_control.py status # Get pipeline status
This script provides both individual control commands and full test suite functionality
@@ -190,6 +192,8 @@ Examples:
%(prog)s set-auto-exposure 1 # Enable auto-exposure
%(prog)s get-auto-gain # Get auto-gain status
%(prog)s set-auto-gain 1 # Enable auto-gain
%(prog)s get-gain-boost # Get gain boost status
%(prog)s set-gain-boost 1 # Enable gain boost
%(prog)s status # Get pipeline status
""",
formatter_class=argparse.RawDescriptionHelpFormatter
@@ -200,7 +204,8 @@ Examples:
choices=['test', 'get-exposure', 'get-exposure-range', 'set-exposure',
'get-framerate', 'set-framerate', 'get-gain', 'set-gain',
'get-auto-exposure', 'set-auto-exposure',
'get-auto-gain', 'set-auto-gain', 'status'],
'get-auto-gain', 'set-auto-gain',
'get-gain-boost', 'set-gain-boost', 'status'],
help='Command to execute')
parser.add_argument('value',
@@ -304,6 +309,22 @@ Examples:
success = simple_command(f"SET_AUTO_GAIN {ag_value}",
f"{'Enabling' if ag_value else 'Disabling'} auto-gain")
elif args.command == 'get-gain-boost':
success = simple_command("GET_GAIN_BOOST", "Getting gain boost status")
elif args.command == 'set-gain-boost':
if args.value is None:
print("Error: set-gain-boost requires a value (0=off, 1=on)")
parser.print_help()
sys.exit(1)
# Convert to int
gb_value = int(args.value)
if gb_value not in [0, 1]:
print("Error: Gain boost must be 0 (off) or 1 (on)")
sys.exit(1)
success = simple_command(f"SET_GAIN_BOOST {gb_value}",
f"{'Enabling' if gb_value else 'Disabling'} gain boost")
elif args.command == 'status':
success = simple_command("STATUS", "Getting pipeline status")