Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Show Robot Errors Through LEDs #117

Open
Litemage opened this issue Feb 22, 2023 · 0 comments
Open

Show Robot Errors Through LEDs #117

Litemage opened this issue Feb 22, 2023 · 0 comments
Assignees

Comments

@Litemage
Copy link
Contributor

One useful case of LEDs is to show current state of the robot. Having a function that can be called through the LED subsystem to set the error state of the robot would be nice, as this makes errors more obvious than print statements. Any subsystem that logs an error should use this function.

  • Maybe have a std::vector of an error type containing an error level (Warning, Critical error) so that the robot can pick the most important error to display if multiple subsystems post errors. This could also include different treatment of errors i.e a high level error will stay registered forever, but a medium error will only stay for 3 seconds.

Error type could look like:

enum ErrorLevel{
     ERR_HIGH, // Robot cannot perform basic operations and/or could break itself if left in this state
     ERR_MID,  // Some functionality is broken, but overall operational
     ERR_LOW // Very few features are unavailable, robot is operational
};

struct LedError{
     ErrorLevel m_errLevel;
};

Note this would require a periodic update of some function.

@dkt01 dkt01 modified the milestones: Week 7, STL Feb 22, 2023
@dkt01 dkt01 removed this from the STL milestone Mar 1, 2023
@Litemage Litemage self-assigned this Mar 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants