MarsRoverFirmware
MarsRoverFirmware copied to clipboard
Create RGB LED library
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 toRGBLED
, making it a base class - Adding support for active high or active low configurations to the RGB LED driver
- Creating
LEDMatrix
andStatusLED
classes that inherit from theRGBLED
base class.LEDMatrix
should be active high and support the functionalities of the oldLEDMatrix
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
andStatusLED
classes