Skip to content

Conversation

@gemenerik
Copy link
Member

Color LED examples now detect which deck variant is present (bottom or top-facing) and use the first one found. This keeps examples simple while supporting both colorLedBot and colorLedTop parameter groups.

Requires bitcraze/crazyflie-firmware#1553

@gemenerik gemenerik self-assigned this Nov 5, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for detecting and using both bottom-facing and top-facing color LED decks on Crazyflie drones. The code now dynamically detects which deck type is connected and automatically configures the appropriate parameters.

  • Added deck detection logic that checks for both bcColorLedBot and bcColorLedTop deck types
  • Refactored hardcoded parameter names to use a dynamic deck_params dictionary
  • Updated all parameter references to use the detected deck's parameter names

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
examples/color_led_deck/color_led_set.py Added deck detection logic and replaced hardcoded parameter names with dynamic deck_params dictionary for setting a single LED color
examples/color_led_deck/color_led_cycle.py Added deck detection logic and replaced hardcoded parameter names with dynamic deck_params dictionary for cycling through colors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Color LED examples now detect which deck variant is present (bottom
or top-facing) and use the first one found. This keeps examples simple
while supporting both colorLedBot and colorLedTop parameter groups.
@gemenerik gemenerik force-pushed the rik/clr_led_variants branch from 9d1801f to 017633b Compare November 5, 2025 15:04
Copy link
Member

@ArisMorgens ArisMorgens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I tested it with the latest crazyflie-firmware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants