Skip to main content
Skip table of contents

Boom LED Override

The LED lights on the ends of the booms can be controlled by user systems using a custom override via DroneCAN and/or mavlink from a payload or ground-based system.

In the event that mavlink and DroneCAN overrides are active simultaneously, DroneCAN will take precedence.

A 1000ms timeout is present where the lights will resume normal function when a valid override message has not been received in this time. To maintain the override, messages are suggested to be sent at least once every 500ms.


DroneCAN Override

a CAN based override can be realised using the "LightsCommand" message available in the standard message set.

The target light ID is: 0

This will be accepted from any source node

See also: DroneCAN, SingleLightCommand, RGB565

DroneCAN LED Override Example

This example python script uses DroneCAN to control the LEDs for a cyan coloured half second periodic flash

PY
import dronecan
import time
import os

node = None
can_flash = True

def publish_can_leds():
    global can_flash
    if can_flash:
        colour = dronecan.uavcan.equipment.indication.RGB565(red=0, green=63, blue=31)
    else:
        colour = dronecan.uavcan.equipment.indication.RGB565(red=0, green=0, blue=0)
    single_light = dronecan.uavcan.equipment.indication.SingleLightCommand(light_id=0, color=colour)
    message = dronecan.uavcan.equipment.indication.LightsCommand(commands=[single_light])
    node.broadcast(message)
    can_flash = not can_flash

def main():
    global node
    node = dronecan.make_node("can0", node_id=102, bitrate=1000000)
    node.periodic(0.5, publish_can_leds)
    while True:
        try:
            node.spin(1)
        except KeyboardInterrupt:
            break
        except:             
            continue       
main()

MAVLink Override

The MAVLink override makes use of the LED_CONTROL message found in the Ardupilotmega dialect.

To Target the boom LEDs with this message:
target_system: 1
target_component: 59
instance: 0
pattern: 255
custom_len: 3
Custom_bytes: uint8_t array [red,green,blue]

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.