Encapsulates the primary control authority of the turret.
More...
#include <system_control_types.h>
|
| constexpr | SystemControl (Mode mode=AI_MODE) |
| | Construct a new SystemControl object.
|
| |
| bool | is_ai () const |
| | Checks if the system is in AI mode.
|
| |
| bool | is_user () const |
| | Checks if the system is in User mode.
|
| |
| Mode | toggle_mode () |
| | Toggles the state between USER_MODE and AI_MODE.
|
| |
| const char * | to_string () const |
| | Converts the current mode to a human-readable string.
|
| |
| Mode | get_mode () const |
| | Gets the underlying Mode enum.
|
| |
|
| operator uint8_t () const |
| | Implicit conversion to uint8_t for simple storage.
|
| |
|
bool | operator== (Mode m) const |
| | Equality comparison with Mode enum.
|
| |
|
bool | operator!= (Mode m) const |
| | Inequality comparison with Mode enum.
|
| |
Encapsulates the primary control authority of the turret.
Provides a wrapper around system modes to allow for method-based state manipulation and string conversion.
◆ Mode
Internal mode values.
| Enumerator |
|---|
| USER_MODE | Manual override: Joystick inputs drive motors.
|
| AI_MODE | Autonomous: Computer Vision drives motors.
|
◆ SystemControl()
Construct a new SystemControl object.
- Parameters
-
| mode | Initial mode (defaults to AI_MODE). |
◆ get_mode()
| Mode SystemControl::get_mode |
( |
| ) |
const |
|
inline |
Gets the underlying Mode enum.
- Returns
- Mode.
◆ is_ai()
| bool SystemControl::is_ai |
( |
| ) |
const |
|
inline |
Checks if the system is in AI mode.
- Returns
- true if AI_MODE.
◆ is_user()
| bool SystemControl::is_user |
( |
| ) |
const |
|
inline |
Checks if the system is in User mode.
- Returns
- true if USER_MODE.
◆ to_string()
| const char * SystemControl::to_string |
( |
| ) |
const |
|
inline |
Converts the current mode to a human-readable string.
- Returns
- const char* "USER_MODE" or "AI_MODE".
◆ toggle_mode()
| Mode SystemControl::toggle_mode |
( |
| ) |
|
|
inline |
Toggles the state between USER_MODE and AI_MODE.
- Returns
- The new Mode state after toggling.
The documentation for this class was generated from the following file: