From 69fc126f398e94dbbda8d3eb820346947dc8f205 Mon Sep 17 00:00:00 2001 From: Cyrille Nofficial Date: Thu, 19 May 2022 17:20:30 +0200 Subject: [PATCH] fix(cli): bad type when parsing args --- pca9685/cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pca9685/cli.py b/pca9685/cli.py index f55e2f3..57cd1e3 100644 --- a/pca9685/cli.py +++ b/pca9685/cli.py @@ -116,14 +116,14 @@ def execute_from_command_line(): if args["steering"]: steering_pin = donkeycar.parts.pins.pwm_pin_by_id(pin_id) controller = actuator.PulseController(steering_pin) - steering = actuator.PWMSteering(controller=controller, left_pulse=args["--left-pulse"], right_pulse=args["--right-pulse"]) + steering = actuator.PWMSteering(controller=controller, left_pulse=int(args["--left-pulse"]), right_pulse=int(args["--right-pulse"])) client = init_mqtt_steering_client(steering_controller=steering, broker_host=broker_host, user=user, password=password, client_id=client_id, steering_topic=topic) elif args["throttle"]: throttle_pin = donkeycar.parts.pins.pwm_pin_by_id("PCA9685.0:40.7") controller = actuator.PulseController(throttle_pin) - throttle = actuator.PWMThrottle(controller=controller, max_pulse=args["--max-pulse"], min_pulse=args["--min-pulse"], - zero_pulse=args["--zero-pulse"]) + throttle = actuator.PWMThrottle(controller=controller, max_pulse=int(args["--max-pulse"]), min_pulse=int(args["--min-pulse"]), + zero_pulse=int(args["--zero-pulse"])) client = init_mqtt_throttle_client(throttle_controller=throttle, broker_host=broker_host, user=user, password=password, client_id=client_id, throttle_topic=topic) else: