Rev 2041 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2041 | Rev 2048 | ||
---|---|---|---|
Line 122... | Line 122... | ||
122 | LCD_printfxy(16,0,"[%i]", menuItem); |
122 | LCD_printfxy(16, 0, "[%i]", menuItem); |
123 | } |
123 | } |
Line 124... | Line 124... | ||
124 | 124 | ||
125 | switch (menuItem) { |
125 | switch (menuItem) { |
126 | case 0:// Version Info Menu Item |
126 | case 0: // Version Info Menu Item |
- | 127 | LCD_printfxy(0, 0, "+ MikroKopter +"); |
|
- | 128 | LCD_printfxy( |
|
127 | LCD_printfxy(0,0,"+ MikroKopter +") |
129 | 0, |
- | 130 | 1, |
|
128 | ; |
131 | "HW:V%d.%d SW:%d.%d%c", |
129 | LCD_printfxy(0,1,"HW:V%d.%d SW:%d.%d%c",boardRelease/10,boardRelease%10,VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH+'a') |
- | |
130 | ; |
132 | boardRelease/10, boardRelease%10, VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH+'a'); |
131 | LCD_printfxy(0,2,"Setting: %d %s", getActiveParamSet(), mixerMatrix.name) |
- | |
132 | ; |
133 | LCD_printfxy(0, 2, "Setting: %d %s", getActiveParamSet(), mixerMatrix.name); |
133 | if (I2CTimeout < 6) { |
134 | if (I2CTimeout < 6) { |
134 | LCD_printfxy(0,3,"I2C Error!!!"); |
135 | LCD_printfxy(0, 3, "I2C Error!!!"); |
135 | } else if (missingMotor) { |
136 | } else if (missingMotor) { |
- | 137 | LCD_printfxy(0, 3, "Missing BL-Ctrl:%d", missingMotor); |
|
136 | LCD_printfxy(0,3,"Missing BL-Ctrl:%d", missingMotor); |
138 | } else |
137 | } else LCD_printfxy(0,3,"(c) Holger Buss"); |
139 | LCD_printfxy(0, 3, "(c) Holger Buss"); |
138 | break; |
140 | break; |
139 | /* |
141 | /* |
140 | case 1:// Height Control Menu Item |
142 | case 1:// Height Control Menu Item |
141 | if(staticParams.GlobalConfig & CFG_HEIGHT_CONTROL) { |
143 | if(staticParams.GlobalConfig & CFG_HEIGHT_CONTROL) { |
Line 151... | Line 153... | ||
151 | } |
153 | } |
152 | break; |
154 | break; |
153 | */ |
155 | */ |
154 | case 2:// Attitude Menu Item |
156 | case 2: // Attitude Menu Item |
155 | LCD_printfxy(0,0,"Attitude"); |
157 | LCD_printfxy(0, 0, "Attitude"); |
- | 158 | LCD_printfxy(0, 1, "Nick: %5i", |
|
156 | LCD_printfxy(0,1,"Nick: %5i", angle[PITCH] / GYRO_DEG_FACTOR_PITCHROLL); |
159 | attitude[PITCH] / GYRO_DEG_FACTOR_PITCHROLL); |
- | 160 | LCD_printfxy(0, 2, "Roll: %5i", |
|
157 | LCD_printfxy(0,2,"Roll: %5i", angle[ROLL ] / GYRO_DEG_FACTOR_PITCHROLL); |
161 | attitude[ROLL ] / GYRO_DEG_FACTOR_PITCHROLL); |
158 | LCD_printfxy(0,3,"Heading(M):%5i", magneticHeading); |
162 | LCD_printfxy(0, 3, "Heading(M):%5i", magneticHeading); |
159 | break; |
163 | break; |
160 | case 3:// Remote Control Channel Menu Item |
164 | case 3: // Remote Control Channel Menu Item |
161 | LCD_printfxy(0,0,"C1:%4i C2:%4i ",PPM_in[1],PPM_in[2]); |
165 | LCD_printfxy(0, 0, "C1:%4i C2:%4i ", PPM_in[1], PPM_in[2]); |
162 | LCD_printfxy(0,1,"C3:%4i C4:%4i ",PPM_in[3],PPM_in[4]); |
166 | LCD_printfxy(0, 1, "C3:%4i C4:%4i ", PPM_in[3], PPM_in[4]); |
163 | LCD_printfxy(0,2,"C5:%4i C6:%4i ",PPM_in[5],PPM_in[6]); |
167 | LCD_printfxy(0, 2, "C5:%4i C6:%4i ", PPM_in[5], PPM_in[6]); |
164 | LCD_printfxy(0,3,"C7:%4i C8:%4i ",PPM_in[7],PPM_in[8]); |
168 | LCD_printfxy(0, 3, "C7:%4i C8:%4i ", PPM_in[7], PPM_in[8]); |
165 | break; |
169 | break; |
166 | case 4:// Remote Control Mapping Menu Item |
170 | case 4: // Remote Control Mapping Menu Item |
- | 171 | LCD_printfxy( |
|
- | 172 | 0, |
|
- | 173 | 0, |
|
- | 174 | "Ni:%4i Ro:%4i ", |
|
167 | LCD_printfxy(0,0,"Ni:%4i Ro:%4i ",PPM_in[channelMap.channels[CH_PITCH]], PPM_in[channelMap.channels[CH_ROLL]]); |
175 | PPM_in[channelMap.channels[CH_PITCH]], PPM_in[channelMap.channels[CH_ROLL]]); |
- | 176 | LCD_printfxy( |
|
- | 177 | 0, |
|
- | 178 | 1, |
|
- | 179 | "Gs:%4i Ya:%4i ", |
|
168 | LCD_printfxy(0,1,"Gs:%4i Ya:%4i ",PPM_in[channelMap.channels[CH_THROTTLE]],PPM_in[channelMap.channels[CH_YAW]]); |
180 | PPM_in[channelMap.channels[CH_THROTTLE]], PPM_in[channelMap.channels[CH_YAW]]); |
- | 181 | LCD_printfxy( |
|
- | 182 | 0, |
|
- | 183 | 2, |
|
- | 184 | "P1:%4i P2:%4i ", |
|
169 | LCD_printfxy(0,2,"P1:%4i P2:%4i ",PPM_in[channelMap.channels[CH_POTS]], PPM_in[channelMap.channels[CH_POTS+1]]); |
185 | PPM_in[channelMap.channels[CH_POTS]], PPM_in[channelMap.channels[CH_POTS+1]]); |
- | 186 | LCD_printfxy( |
|
- | 187 | 0, |
|
- | 188 | 3, |
|
- | 189 | "P3:%4i P4:%4i ", |
|
170 | LCD_printfxy(0,3,"P3:%4i P4:%4i ",PPM_in[channelMap.channels[CH_POTS+2]], PPM_in[channelMap.channels[CH_POTS+3]]); |
190 | PPM_in[channelMap.channels[CH_POTS+2]], PPM_in[channelMap.channels[CH_POTS+3]]); |
171 | break; |
191 | break; |
172 | /* |
192 | /* |
173 | case 5:// Gyro Sensor Menu Item |
193 | case 5:// Gyro Sensor Menu Item |
174 | LCD_printfxy(0,0,"Gyro - Sensor"); |
194 | LCD_printfxy(0,0,"Gyro - Sensor"); |
175 | switch(BoardRelease) { |
195 | switch(BoardRelease) { |
Line 205... | Line 225... | ||
205 | LCD_printfxy(0,1,"Voltage: %3i.%1iV",UBat/10, UBat%10); |
225 | LCD_printfxy(0, 1, "Voltage: %3i.%1iV", UBat/10, UBat%10); |
206 | LCD_printfxy(0,2,"RC-Level: %5i",RCQuality); |
226 | LCD_printfxy(0, 2, "RC-Level: %5i", RCQuality); |
207 | break; |
227 | break; |
208 | case 8:// Compass Menu Item |
228 | case 8: // Compass Menu Item |
209 | LCD_printfxy(0,0,"Compass "); |
229 | LCD_printfxy(0, 0, "Compass "); |
210 | LCD_printfxy(0,1,"Course: %5i", compassCourse); |
230 | LCD_printfxy(0, 0, "TODO: Impl. "); |
211 | LCD_printfxy(0,2,"Heading: %5i", magneticHeading); |
- | |
212 | LCD_printfxy(0,3,"OffCourse: %5i", ((540 + magneticHeading - compassCourse) % 360) - 180); |
- | |
213 | break; |
231 | break; |
214 | case 9:// Poti Menu Item |
232 | case 9: // Poti Menu Item |
215 | LCD_printfxy(0,0,"Po1: %3i Po5: %3i" ,variables[0], variables[4]); //PPM24-Extesion |
233 | LCD_printfxy(0, 0, "Variables "); |
216 | LCD_printfxy(0,1,"Po2: %3i Po6: %3i" ,variables[1], variables[5]); //PPM24-Extesion |
234 | LCD_printfxy(0, 0, "TODO: Impl. "); |
217 | LCD_printfxy(0,2,"Po3: %3i Po7: %3i" ,variables[2], variables[6]); //PPM24-Extesion |
- | |
218 | LCD_printfxy(0,3,"Po4: %3i Po8: %3i" ,variables[3], variables[7]); //PPM24-Extesion |
- | |
219 | break; |
235 | break; |
220 | /* |
- | |
221 | case 10:// Servo Menu Item |
236 | case 10: // Servo Menu Item |
222 | LCD_printfxy(0,0,"Servo " ); |
237 | LCD_printfxy(0, 0, "Servos "); |
223 | LCD_printfxy(0,1,"Setpoint %3i",dynamicParams.ServoNickControl); |
- | |
224 | LCD_printfxy(0,2,"Position: %3i",ServoNickValue); |
238 | LCD_printfxy(0, 0, "TODO: Impl. "); |
225 | LCD_printfxy(0,3,"Range:%3i-%3i",staticParams.ServoNickMin, staticParams.ServoNickMax); |
- | |
226 | break; |
239 | break; |
227 | */ |
- | |
228 | case 11://Extern Control |
240 | case 11: //Extern Control |
229 | LCD_printfxy(0,0,"ExternControl " ); |
241 | LCD_printfxy(0, 0, "ExternControl "); |
- | 242 | LCD_printfxy(0, 1, "Ni:%4i Ro:%4i ", |
|
230 | LCD_printfxy(0,1,"Ni:%4i Ro:%4i ", externalControl.pitch, externalControl.roll); |
243 | externalControl.pitch, externalControl.roll); |
- | 244 | LCD_printfxy(0, 2, "Gs:%4i Ya:%4i ", |
|
231 | LCD_printfxy(0,2,"Gs:%4i Ya:%4i ", externalControl.throttle, externalControl.yaw); |
245 | externalControl.throttle, externalControl.yaw); |
- | 246 | LCD_printfxy(0, 3, "Hi:%4i Cf:%4i ", |
|
232 | LCD_printfxy(0,3,"Hi:%4i Cf:%4i ", externalControl.height, externalControl.config); |
247 | externalControl.height, externalControl.config); |
233 | break; |
248 | break; |
Line 234... | Line 249... | ||
234 | 249 | ||
235 | case 12://BL Communication errors |
250 | case 12: //BL Communication errors |
- | 251 | LCD_printfxy(0, 0, "BL-Ctrl Errors "); |
|
236 | LCD_printfxy(0,0,"BL-Ctrl Errors " ); |
252 | LCD_printfxy(0, 1, " %3d %3d %3d %3d ", |
- | 253 | motor[0].error, motor[1].error, motor[2].error, motor[3].error); |
|
237 | LCD_printfxy(0,1," %3d %3d %3d %3d ",motor[0].error,motor[1].error,motor[2].error,motor[3].error); |
254 | LCD_printfxy(0, 2, " %3d %3d %3d %3d ", |
- | 255 | motor[4].error, motor[5].error, motor[6].error, motor[7].error); |
|
238 | LCD_printfxy(0,2," %3d %3d %3d %3d ",motor[4].error,motor[5].error,motor[6].error,motor[7].error); |
256 | LCD_printfxy(0, 3, " %3d %3d %3d %3d ", |
239 | LCD_printfxy(0,3," %3d %3d %3d %3d ",motor[8].error,motor[9].error,motor[10].error,motor[11].error); |
257 | motor[8].error, motor[9].error, motor[10].error, motor[11].error); |
Line 240... | Line 258... | ||
240 | break; |
258 | break; |
241 | 259 | ||
- | 260 | case 13: //BL Overview |
|
- | 261 | LCD_printfxy(0, 0, "BL-Ctrl found "); |
|
- | 262 | LCD_printfxy( |
|
- | 263 | 0, |
|
242 | case 13://BL Overview |
264 | 1, |
- | 265 | " %c %c %c %c ", |
|
- | 266 | motor[0].present + '-', motor[1].present + '-', motor[2].present + '-', motor[3].present + '-'); |
|
- | 267 | LCD_printfxy( |
|
- | 268 | 0, |
|
243 | LCD_printfxy(0,0,"BL-Ctrl found " ); |
269 | 2, |
244 | LCD_printfxy(0,1," %c %c %c %c ",motor[0].present + '-',motor[1].present + '-',motor[2].present + '-',motor[3].present + '-'); |
270 | " %c %c %c %c ", |
245 | LCD_printfxy(0,2," %c %c %c %c ",motor[4].present + '-',motor[5].present + '-',motor[6].present + '-',motor[7].present + '-'); |
271 | motor[4].present + '-', motor[5].present + '-', motor[6].present + '-', motor[7].present + '-'); |
246 | LCD_printfxy(0,3," %c - - - ",motor[8].present + '-'); |
272 | LCD_printfxy(0, 3, " %c - - - ", motor[8].present + '-'); |
247 | if (motor[9].present) |
273 | if (motor[9].present) |
248 | LCD_printfxy(4,3,"10"); |
274 | LCD_printfxy(4, 3, "10"); |