MarsRoverFirmware icon indicating copy to clipboard operation
MarsRoverFirmware copied to clipboard

Create RGB LED library

Open cindyli-13 opened this issue 4 years ago • 0 comments

Each rover board has an onboard RGB LED. We've just been using it for debug purposes but we would like to actually use it as a visual indicator of board status. An LED matrix driver already exists for control of our custom LED matrix board - the RGB LED driver has the exact same implementation, except on some boards the signals for the onboard RGB LEDs are active low instead of active high.

The scope of this task includes:

  • Refactoring the LEDMatrix class to RGBLED, making it a base class
  • Adding support for active high or active low configurations to the RGB LED driver
  • Creating LEDMatrix and StatusLED classes that inherit from the RGBLED base class. LEDMatrix should be active high and support the functionalities of the old LEDMatrix class. StatusLED should support both active high and active low configurations and have the functionality of taking in a "status enum" to set the LED flash pattern.
  • Status enums: designing colour codes / flash patterns for different board states. Ideally this would be standardized across all boards (eg. solid green = operational, solid yellow = fault, flashing red = fatal failure).
  • Updating the test-led-matrix test app to test both LEDMatrix and StatusLED classes

cindyli-13 avatar Feb 22 '21 02:02 cindyli-13