From 50319353fa7193e25e736a5f2beeb8e59bdb962d Mon Sep 17 00:00:00 2001 From: AsiiaPine Date: Mon, 3 Jun 2024 16:44:53 +0300 Subject: [PATCH] rename params (according to tag v0.2.0 of lights_note, fixed subscription bug --- src/raccoonlab_tools/scripts/dronecan/test_lights.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/raccoonlab_tools/scripts/dronecan/test_lights.py b/src/raccoonlab_tools/scripts/dronecan/test_lights.py index d52d99a6..c23c6f91 100755 --- a/src/raccoonlab_tools/scripts/dronecan/test_lights.py +++ b/src/raccoonlab_tools/scripts/dronecan/test_lights.py @@ -18,7 +18,7 @@ PARAM_LIGHTS_MAX_INTENSITY = 'lights.max_intensity' PARAM_LIGHTS_DEFAULT_COLOR = 'lights.default_color' PARAM_LIGHTS_TYPE = 'lights.type' -PARAM_LIGHTS_BLINK_PERIOD = 'lights.blink_period_ms' +PARAM_LIGHTS_BLINK_PERIOD = 'lights.period' PARAM_LIGHTS_DUTY_CYCLE_PCT = 'lights.duty_cycle_pct' PARAM_LIGHTS_VERBOSE = 'lights.verbose' @@ -67,7 +67,7 @@ def send_single_light_command(self, red: int, green: int, blue: int, id: int = 0 self.node.publish(msg) def recv_color(self, timeout_sec=0.03): - res = self.node.sub_once(dronecan.uavcan.equipment.indication.LightsCommand, timeout_sec) + res = self.node.sub_once(dronecan.uavcan.equipment.indication.LightsCommand, timeout_sec=timeout_sec) color = res.message.commands[0].color return color