From ae89763a5195db011948b0146daaeea6cf3574d0 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Tue, 10 Sep 2024 13:53:17 -0400 Subject: [PATCH] cast strings from CLI to the correct type --- .../open_gopro/demos/gui/livestream.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/demos/python/sdk_wireless_camera_control/open_gopro/demos/gui/livestream.py b/demos/python/sdk_wireless_camera_control/open_gopro/demos/gui/livestream.py index bacbeeb8..c7e9b0b7 100644 --- a/demos/python/sdk_wireless_camera_control/open_gopro/demos/gui/livestream.py +++ b/demos/python/sdk_wireless_camera_control/open_gopro/demos/gui/livestream.py @@ -73,8 +73,10 @@ def parse_arguments() -> argparse.Namespace: parser.add_argument("--min_bit", type=int, help="Minimum bitrate.", default=1000) parser.add_argument("--max_bit", type=int, help="Maximum bitrate.", default=1000) parser.add_argument("--start_bit", type=int, help="Starting bitrate.", default=1000) - parser.add_argument("--resolution", help="Resolution.", choices=list(proto.EnumWindowSize.values()), default=None) - parser.add_argument("--fov", help="Field of View.", choices=list(proto.EnumLens.values()), default=None) + parser.add_argument( + "--resolution", help="Resolution.", choices=list(proto.EnumWindowSize.values()), default=None, type=int + ) + parser.add_argument("--fov", help="Field of View.", choices=list(proto.EnumLens.values()), default=None, type=int) return add_cli_args_and_parse(parser, wifi=False)