@@ -124,13 +124,6 @@ function FlightLogFieldPresenter() {
124
124
'debug[2]' :'rollPitchYawMix[2]' ,
125
125
'debug[3]' :'rollPitchYawMix[3]' ,
126
126
} ,
127
- 'AIRMODE' : {
128
- 'debug[all]' :'debug[all]' ,
129
- 'debug[0]' :'debug[0]' ,
130
- 'debug[1]' :'debug[1]' ,
131
- 'debug[2]' :'debug[2]' ,
132
- 'debug[3]' :'debug[3]' ,
133
- } ,
134
127
'PIDLOOP' : {
135
128
'debug[all]' :'Debug PID' ,
136
129
'debug[0]' :'Wait Time' ,
@@ -152,13 +145,6 @@ function FlightLogFieldPresenter() {
152
145
'debug[2]' :'rcCommand_raw[yaw]' ,
153
146
'debug[3]' :'rxRefreshRate' ,
154
147
} ,
155
- 'VELOCITY' : {
156
- 'debug[all]' :'debug[all]' ,
157
- 'debug[0]' :'debug[0]' ,
158
- 'debug[1]' :'debug[1]' ,
159
- 'debug[2]' :'debug[2]' ,
160
- 'debug[3]' :'debug[3]' ,
161
- } ,
162
148
'DTERM_FILTER' : {
163
149
'debug[all]' :'Debug Filter' ,
164
150
'debug[0]' :'dterm_filter[roll]' ,
@@ -194,58 +180,28 @@ function FlightLogFieldPresenter() {
194
180
'debug[2]' :'Stack Current' ,
195
181
'debug[3]' :'Stack p' ,
196
182
} ,
197
- 'DEBUG_ESC_SENSOR_RPM' : {
198
- 'debug[all]' :'Debug ESC Sensor RPM' ,
199
- 'debug[0]' :'debug[0]' ,
200
- 'debug[1]' :'debug[1]' ,
201
- 'debug[2]' :'debug[2]' ,
202
- 'debug[3]' :'debug[3]' ,
203
-
204
- } ,
205
- 'DEBUG_ESC_SENSOR_TMP' : {
206
- 'debug[all]' :'Debug ESC Sensor TMP' ,
207
- 'debug[0]' :'debug[0]' ,
208
- 'debug[1]' :'debug[1]' ,
209
- 'debug[2]' :'debug[2]' ,
210
- 'debug[3]' :'debug[3]' ,
211
- } ,
212
- 'DEBUG_ALTITUDE' : {
213
- 'debug[all]' :'Debug Altitude' ,
214
- 'debug[0]' :'debug[0]' ,
215
- 'debug[1]' :'debug[1]' ,
216
- 'debug[2]' :'debug[2]' ,
217
- 'debug[3]' :'debug[3]' ,
218
- } ,
219
- 'DEBUG_FFT' : {
183
+ 'FFT' : {
220
184
'debug[all]' :'Debug FFT' ,
221
185
'debug[0]' :'gyro_raw[roll]' ,
222
186
'debug[1]' :'gyro_dyn_notch[roll]' ,
223
187
'debug[2]' :'gyro_bpf[roll]' ,
224
188
'debug[3]' :'fft_center_index[roll]' ,
225
189
} ,
226
- 'DEBUG_FFT_TIME ' : {
190
+ 'FFT_TIME ' : {
227
191
'debug[all]' :'Debug FFT TIME' ,
228
192
'debug[0]' :'Active calc step' ,
229
193
'debug[1]' :'Step duration' ,
230
194
'debug[2]' :'Additional steps' ,
231
195
'debug[3]' :'Not used' ,
232
196
} ,
233
- 'DEBUG_FFT_FREQ ' : {
197
+ 'FFT_FREQ ' : {
234
198
'debug[all]' :'Debug FFT FREQ' ,
235
199
'debug[0]' :'center_freq[roll]' ,
236
200
'debug[1]' :'center_freq[pitch]' ,
237
201
'debug[2]' :'center_freq[yaw]' ,
238
202
'debug[3]' :'Not used' ,
239
203
} ,
240
- 'DEBUG_FRSKY_D_RX' : {
241
- 'debug[all]' :'Debug FRSKY_D_RX' ,
242
- 'debug[0]' :'debug[0]' ,
243
- 'debug[1]' :'debug[1]' ,
244
- 'debug[2]' :'debug[2]' ,
245
- 'debug[3]' :'debug[3]' ,
246
-
247
- } ,
248
- 'DEBUG_GYRO_RAW' : {
204
+ 'GYRO_RAW' : {
249
205
'debug[all]' :'Debug Gyro Raw' ,
250
206
'debug[0]' :'gyro_raw[X]' ,
251
207
'debug[1]' :'gyro_raw[Y]' ,
@@ -489,16 +445,28 @@ function FlightLogFieldPresenter() {
489
445
case 'DEBUG_FFT_FREQ' :
490
446
return value . toFixed ( 0 ) + "Hz" ;
491
447
default :
492
- return "" ;
448
+ return value . toFixed ( 0 ) ;
493
449
}
494
450
}
495
451
return "" ;
496
452
} ;
497
453
498
454
FlightLogFieldPresenter . fieldNameToFriendly = function ( fieldName , debugMode ) {
499
- if ( debugMode ) {
455
+ if ( debugMode ) {
500
456
if ( fieldName . includes ( 'debug' ) ) {
501
- var debugFields = DEBUG_FRIENDLY_FIELD_NAMES [ debugMode < DEBUG_MODE . length ? DEBUG_MODE [ debugMode ] : DEBUG_MODE [ 0 ] ] ;
457
+ var debugModeName = DEBUG_MODE [ debugMode ] ;
458
+ var debugFields ;
459
+ if ( debugModeName ) {
460
+ debugFields = DEBUG_FRIENDLY_FIELD_NAMES [ debugModeName ] ;
461
+ }
462
+
463
+ if ( ! debugFields ) {
464
+ if ( fieldName === 'debug[all]' ) {
465
+ return 'Debug (' + ( debugModeName || debugMode ) + ')' ;
466
+ }
467
+ debugFields = DEBUG_FRIENDLY_FIELD_NAMES [ DEBUG_MODE [ 0 ] ] ;
468
+ }
469
+
502
470
return debugFields [ fieldName ] ;
503
471
}
504
472
}
0 commit comments