Replies: 3 comments 2 replies
|
Yes, we'd be happy to take a PR for this. Thanks!
One thing to watch in the implementation: parameter callbacks are invoked synchronously from the param write path, not from the deck's own task. So the per-deck highlight() should only latch state. |
|
In the meantime, I was thinking about alternatives because the "highlight" operation could in theory be handled by other decks (e.g., the buzzer deck could emit a sound). So we actually have two options: one that I described above, and one where we define a |
|
Work started here: https://github.com/skybrush-io/crazyflie-firmware/tree/feat/system-highlight-color-led-deck Not fully fleshed out yet, just curious if I am on the right track with the implementation. |
Uh oh!
There was an error while loading. Please reload this page.
It seems like only the LED ring deck responds to setting the
system.highlightparameter to 1 by flashing the LEDs briefly. We use this parameter in Skybrush to allow the GCS operator to highlight a drone during preparations so it would be nice if this parameter also worked with the color LED deck. Would you be open to accepting a PR that implements this?My plan would be probably to extend
ledDeckHandlerDef_tinled_deck_controller.hwith ahighlight()callback that LED decks can fill in (or leave unimplemented). Settingsystem.highlightto 1 would then call a callback (usingPARAM_ADD_WITH_CALLBACK), which in turn calls the callbacks for all registered LED deck controllers.(Note: I will probably do this anyway for our Skybrush fork of the Crazyflie firmware as it is the easiest way to allow Skybrush to work with the LED rings as well as the color LED deck, I'm mainly interested in whether this would be good enough for inclusion in the next version of the firmware officially).
All reactions