Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
MultimediaBoard.h
Go to the documentation of this file.
1
11#ifndef MULTIMEDIABOARD_H
12#define MULTIMEDIABOARD_H
13
14
23{
24 public:
26 // Declare public enums and structs that are specific to and used withing this class.
28
29 // Structs.
30
38 struct RGB
39 {
40 public:
41 // Declare public struct attributes.
42 double dRed;
43 double dGreen;
44 double dBlue;
45
46
54 {
55 // Initialize all member variables.
56 this->dRed = 0;
57 this->dGreen = 0;
58 this->dBlue = 0;
59 }
60
61
69 RGB(int iHex)
70 {
71 this->dRed = ((iHex >> 16) & 0xFF);
72 this->dGreen = ((iHex >> 8) & 0xFF);
73 this->dBlue = (iHex & 0xFF);
74 }
75
76
86 RGB(double dRed, double dGreen, double dBlue)
87 {
88 this->dRed = dRed;
89 this->dGreen = dGreen;
90 this->dBlue = dBlue;
91 }
92 };
93
94 // Enums
95 enum class MultimediaBoardLightingState
96 {
97 eOff = -2, // LED panel off.
98 eCustom, // A custom value has been set or board should go back to a previously custom set value.
99 eTeleOp, // TeleOp color = BLUE
100 eAutonomy, // Autonomy color = RED
101 eReachedGoal // Goal reached = FLASH GREEN
102 };
103
105 // Declare public methods and member variables.
107
110 void SendLightingState(MultimediaBoardLightingState eState);
111 void SendRGB(RGB stRGBVal);
112
114 // Setters
116
118 // Getters
120
121 MultimediaBoardLightingState GetCurrentLightingState() const;
123
124 private:
126 // Declare private member variables.
128 MultimediaBoardLightingState m_eCurrentLightingState;
129 RGB m_stCustomRGBValues;
130};
131#endif
This class handles communication with the multimedia board on the rover by sending RoveComm packets o...
Definition MultimediaBoard.h:23
RGB GetCustomLightingValues() const
Accessor for the current custom lighting RGB values.
Definition MultimediaBoard.cpp:203
MultimediaBoard()
Construct a new Multimedia Board:: Multimedia Board object.
Definition MultimediaBoard.cpp:27
MultimediaBoardLightingState GetCurrentLightingState() const
Accessor for the current lighting state of the multimedia board.
Definition MultimediaBoard.cpp:189
void SendLightingState(MultimediaBoardLightingState eState)
Sends a predetermined color pattern to board.
Definition MultimediaBoard.cpp:55
void SendRGB(RGB stRGBVal)
Send a custom RGB value to the board.
Definition MultimediaBoard.cpp:156
~MultimediaBoard()
Destroy the Multimedia Board:: Multimedia Board object.
Definition MultimediaBoard.cpp:40
This struct serves as a container for RGB values, and provides a few overridden constructors for conv...
Definition MultimediaBoard.h:39
RGB(int iHex)
Construct a new RGB object.
Definition MultimediaBoard.h:69
RGB()
Construct a new RGB object.
Definition MultimediaBoard.h:53
RGB(double dRed, double dGreen, double dBlue)
Construct a new RGB object.
Definition MultimediaBoard.h:86