Showing the changes to interface/src/SerialInterface.cpp (1 of 1 file). Show all
Unified · Split
| @@ -152,28 +152,26 @@ void SerialInterface::renderLevels(int width, int height) { · 151 unmodified lines | ||
| 152 | 152 | const int GAP = 16; |
| 153 | 153 | char val[40]; |
| 154 | 154 | if (!USING_INVENSENSE_MPU9150) { |
| 155 | − for(i = 0; i < NUM_CHANNELS; i++) | |
| 156 | − { | |
| 157 | − | |
| 155 | + for(i = 0; i < NUM_CHANNELS; i++) { | |
| 158 | 156 | // Actual value |
| 159 | 157 | glLineWidth(2.0); |
| 160 | 158 | glColor4f(1, 1, 1, 1); |
| 161 | 159 | glBegin(GL_LINES); |
| 162 | − glVertex2f(disp_x, height*0.95); | |
| 163 | − glVertex2f(disp_x, height*(0.25 + 0.75f*getValue(i)/4096)); | |
| 160 | + glVertex2f(disp_x, height * 0.95); | |
| 161 | + glVertex2f(disp_x, height * (0.25 + 0.75f * getValue(i) / 4096)); | |
| 164 | 162 | glColor4f(1, 0, 0, 1); |
| 165 | − glVertex2f(disp_x - 3, height*(0.25 + 0.75f*getValue(i)/4096)); | |
| 166 | − glVertex2f(disp_x, height*(0.25 + 0.75f*getValue(i)/4096)); | |
| 163 | + glVertex2f(disp_x - 3, height * (0.25 + 0.75f * getValue(i) / 4096)); | |
| 164 | + glVertex2f(disp_x, height * (0.25 + 0.75f * getValue(i) / 4096)); | |
| 167 | 165 | glEnd(); |
| 168 | 166 | // Trailing Average value |
| 169 | 167 | glBegin(GL_LINES); |
| 170 | 168 | glColor4f(1, 1, 1, 1); |
| 171 | − glVertex2f(disp_x, height*(0.25 + 0.75f*getTrailingValue(i)/4096)); | |
| 172 | − glVertex2f(disp_x + 4, height*(0.25 + 0.75f*getTrailingValue(i)/4096)); | |
| 169 | + glVertex2f(disp_x, height * (0.25 + 0.75f * getTrailingValue(i) / 4096)); | |
| 170 | + glVertex2f(disp_x + 4, height * (0.25 + 0.75f * getTrailingValue(i) / 4096)); | |
| 173 | 171 | glEnd(); |
| 174 | 172 | |
| 175 | 173 | sprintf(val, "%d", getValue(i)); |
| 176 | − drawtext(disp_x-GAP/2, (height*0.95)+2, 0.08, 90, 1.0, 0, val, 0, 1, 0); | |
| 174 | + drawtext(disp_x - GAP / 2, (height * 0.95) + 2, 0.08, 90, 1.0, 0, val, 0, 1, 0); | |
| 177 | 175 | |
| 178 | 176 | disp_x += GAP; |
| 179 | 177 | } |
| @@ -207,9 +205,8 @@ void SerialInterface::renderLevels(int width, int height) { · 27 unmodified lines | ||
| 207 | 205 | glVertex2f(LEVEL_CORNER_X + LEVEL_CENTER, LEVEL_CORNER_Y - 6); |
| 208 | 206 | glVertex2f(LEVEL_CORNER_X + LEVEL_CENTER, LEVEL_CORNER_Y + 30); |
| 209 | 207 | glEnd(); |
| 210 | − | |
| 211 | − | |
| 212 | 208 | } |
| 209 | + | |
| 213 | 210 | // Display Serial latency block |
| 214 | 211 | if (LED) { |
| 215 | 212 | glColor3f(1,0,0); |