@@ -110,7 +110,7 @@ class Arduino_Robot_Firmware{
110110
111111
112112 // BMS, MAX17332
113- int beginBMS ();
113+ int beginBMS ();
114114 void updateBMS ();
115115 float getBatteryVoltage ();
116116 float getBatteryChargePercentage ();
@@ -123,25 +123,25 @@ class Arduino_Robot_Firmware{
123123 float getRpmLeft ();
124124 bool setRpmRight (const float rpm);
125125 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
130130
131131
132132 // 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)
145145
146146
147147 // Leds
@@ -163,19 +163,19 @@ class Arduino_Robot_Firmware{
163163
164164
165165 // 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
179179
180180
181181
0 commit comments