@@ -110,7 +110,7 @@ class Arduino_Robot_Firmware{
110
110
111
111
112
112
// BMS, MAX17332
113
- int beginBMS ();
113
+ int beginBMS ();
114
114
void updateBMS ();
115
115
float getBatteryVoltage ();
116
116
float getBatteryChargePercentage ();
@@ -123,25 +123,25 @@ class Arduino_Robot_Firmware{
123
123
float getRpmLeft ();
124
124
bool setRpmRight (const float rpm);
125
125
float getRpmRight ();
126
- bool setRpm (const float left, const float right);
127
- void getRpm (float & left, float & right);
128
- void setKPidRight (const float kp, const float ki, const float kd);
129
- void setKPidLeft (const float kp, const float ki, const float kd);
126
+ bool setRpm (const float left, const float right); // sets RPMs on left and right wheels
127
+ void getRpm (float & left, float & right); // get RPMs on left and right wheels
128
+ void setKPidRight (const float kp, const float ki, const float kd); // set PID parameters for right wheel
129
+ void setKPidLeft (const float kp, const float ki, const float kd); // set PID parameters for left wheel
130
130
131
131
132
132
// Touch
133
- int beginTouch ();
134
- void updateTouch ();
135
- bool getAnyTouchPressed ();
136
- bool getTouchKey (const uint8_t key);
137
- uint8_t getTouchKeys ();
138
- bool getTouchUp ();
139
- bool getTouchRight ();
140
- bool getTouchDown ();
141
- bool getTouchLeft ();
142
- bool getTouchEnter ();
143
- bool getTouchOk ();
144
- bool getTouchDelete ();
133
+ int beginTouch (); // initialize touch
134
+ void updateTouch (); // update touch status
135
+ bool getAnyTouchPressed (); // get any touch pressed
136
+ bool getTouchKey (const uint8_t key); // return true if key touch is pressed
137
+ uint8_t getTouchKeys (); // return touched pads as byte
138
+ bool getTouchUp (); // get nav pad up
139
+ bool getTouchRight (); // get nav pad right
140
+ bool getTouchDown (); // get nav pad down
141
+ bool getTouchLeft (); // get nav pad left
142
+ bool getTouchEnter (); // get nav pad enter (center circle)
143
+ bool getTouchOk (); // get nav pad ok (right check)
144
+ bool getTouchDelete (); // get nav pad delete (right x)
145
145
146
146
147
147
// Leds
@@ -163,19 +163,19 @@ class Arduino_Robot_Firmware{
163
163
164
164
165
165
// Imu
166
- int beginImu ();
167
- void updateImu ();
168
- float getAccelerationX ();
169
- float getAccelerationY ();
170
- float getAccelerationZ ();
171
- float getAngularVelocityX ();
172
- float getAngularVelocityY ();
173
- float getAngularVelocityZ ();
174
- float getRoll ();
175
- float getPitch ();
176
- float getYaw ();
177
-
178
- void errorLed (const int error_code);
166
+ int beginImu (); // initialize LSD6DSOX-
167
+ void updateImu (); // update accelerometer and gyroscope data. Update sensor fusion
168
+ float getAccelerationX (); // get acceleration on x axis
169
+ float getAccelerationY (); // get acceleration on y axis
170
+ float getAccelerationZ (); // get acceleration on z axis
171
+ float getAngularVelocityX (); // get angular velocity on x axis
172
+ float getAngularVelocityY (); // get angular velocity on y axis
173
+ float getAngularVelocityZ (); // get angular velocity on z axis
174
+ float getRoll (); // get robot roll
175
+ float getPitch (); // get robot pitch
176
+ float getYaw (); // get robot yaw
177
+
178
+ void errorLed (const int error_code); // error routine, locks on code blinking led
179
179
180
180
181
181
0 commit comments