Skip to content

Commit

Permalink
rename params (according to tag v0.2.0 of lights_note, fixed subscrip…
Browse files Browse the repository at this point in the history
…tion bug
  • Loading branch information
AsiiaPine authored and PonomarevDA committed Jun 4, 2024
1 parent ddc9595 commit 5031935
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/raccoonlab_tools/scripts/dronecan/test_lights.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 5031935

Please sign in to comment.