-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathdebug.js
More file actions
817 lines (811 loc) · 27.9 KB
/
debug.js
File metadata and controls
817 lines (811 loc) · 27.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
import FC from './fc.js';
import { API_VERSION_1_47 } from './data_storage';
import semver from "semver";
const DEBUG = {
modes: [
{text: "NONE"},
{text: "CYCLETIME"},
{text: "BATTERY"},
{text: "GYRO_FILTERED"},
{text: "ACCELEROMETER"},
{text: "PIDLOOP"},
{text: "GYRO_SCALED"},
{text: "RC_INTERPOLATION"},
{text: "ANGLERATE"},
{text: "ESC_SENSOR"},
{text: "SCHEDULER"},
{text: "STACK"},
{text: "ESC_SENSOR_RPM"},
{text: "ESC_SENSOR_TMP"},
{text: "ALTITUDE"},
{text: "FFT"},
{text: "FFT_TIME"},
{text: "FFT_FREQ"},
{text: "RX_FRSKY_SPI"},
{text: "RX_SFHSS_SPI"},
{text: "GYRO_RAW"},
{text: "DUAL_GYRO_RAW"},
{text: "DUAL_GYRO_DIFF"},
{text: "MAX7456_SIGNAL"},
{text: "MAX7456_SPICLOCK"},
{text: "SBUS"},
{text: "FPORT"},
{text: "RANGEFINDER"},
{text: "RANGEFINDER_QUALITY"},
{text: "LIDAR_TF"},
{text: "ADC_INTERNAL"},
{text: "RUNAWAY_TAKEOFF"},
{text: "SDIO"},
{text: "CURRENT_SENSOR"},
{text: "USB"},
{text: "SMARTAUDIO"},
{text: "RTH"},
{text: "ITERM_RELAX"},
{text: "ACRO_TRAINER"},
{text: "RC_SMOOTHING"},
{text: "RX_SIGNAL_LOSS"},
{text: "RC_SMOOTHING_RATE"},
{text: "ANTI_GRAVITY"},
{text: "DYN_LPF"},
{text: "RX_SPEKTRUM_SPI"},
{text: "DSHOT_RPM_TELEMETRY"},
{text: "RPM_FILTER"},
{text: "D_MIN"},
{text: "AC_CORRECTION"},
{text: "AC_ERROR"},
{text: "DUAL_GYRO_SCALED"},
{text: "DSHOT_RPM_ERRORS"},
{text: "CRSF_LINK_STATISTICS_UPLINK"},
{text: "CRSF_LINK_STATISTICS_PWR"},
{text: "CRSF_LINK_STATISTICS_DOWN"},
{text: "BARO"},
{text: "GPS_RESCUE_THROTTLE_PID"},
{text: "DYN_IDLE"},
{text: "FEEDFORWARD_LIMIT"},
{text: "FEEDFORWARD"},
{text: "BLACKBOX_OUTPUT"},
{text: "GYRO_SAMPLE"},
{text: "RX_TIMING"},
{text: "D_LPF"},
{text: "VTX_TRAMP"},
{text: "GHST"},
{text: "GHST_MSP"},
{text: "SCHEDULER_DETERMINISM"},
{text: "TIMING_ACCURACY"},
{text: "RX_EXPRESSLRS_SPI"},
{text: "RX_EXPRESSLRS_PHASELOCK"},
{text: "RX_STATE_TIME"},
{text: "GPS_RESCUE_VELOCITY"},
{text: "GPS_RESCUE_HEADING"},
{text: "GPS_RESCUE_TRACKING"},
{text: "GPS_CONNECTION"},
{text: "ATTITUDE"},
{text: "VTX_MSP"},
{text: "GPS_DOP"},
{text: "FAILSAFE"},
{text: "GYRO_CALIBRATION"},
{text: "ANGLE_MODE"},
{text: "ANGLE_TARGET"},
{text: "CURRENT_ANGLE"},
{text: "DSHOT_TELEMETRY_COUNTS"},
{text: "RPM_LIMIT"},
{text: "RC_STATS"},
{text: "MAG_CALIB"},
{text: "MAG_TASK_RATE"},
{text: "EZLANDING"},
{text: "TPA"},
{text: "S_TERM"},
{text: "SPA"},
{text: "TASK"},
{text: "DSHOT_STATUS_N_TEMPERATURE"},
{text: "DSHOT_STATUS_N_VOLTAGE"},
{text: "DSHOT_STATUS_N_CURRENT"},
{text: "DSHOT_STATUS_N_DEBUG1"},
{text: "DSHOT_STATUS_N_DEBUG2"},
{text: "DSHOT_STATUS_N_STRESS_LVL"},
{text: "DSHOT_STATUS_N_ERPM_FRACTION_18"},
],
fieldNames: {
'NONE': {
'debug[all]': 'Debug [all]',
'debug[0]': 'Debug [0]',
'debug[1]': 'Debug [1]',
'debug[2]': 'Debug [2]',
'debug[3]': 'Debug [3]',
'debug[4]': 'Debug [4]',
'debug[5]': 'Debug [5]',
'debug[6]': 'Debug [6]',
'debug[7]': 'Debug [7]',
},
'CYCLETIME': {
'debug[all]': 'Debug Cycle Time',
'debug[0]': 'Cycle Time',
'debug[1]': 'CPU Load',
'debug[2]': 'Motor Update',
'debug[3]': 'Motor Deviation',
},
'BATTERY': {
'debug[all]': 'Debug Battery',
'debug[0]': 'Battery Volt ADC',
'debug[1]': 'Battery Volt',
},
'GYRO_FILTERED': {
'debug[all]': 'Debug Gyro Filtered',
'debug[0]': 'Gyro Filtered [X]',
'debug[1]': 'Gyro Filtered [Y]',
'debug[2]': 'Gyro Filtered [Z]',
},
'ACCELEROMETER': {
'debug[all]': 'Debug Accel.',
'debug[0]': 'Accel. Raw [X]',
'debug[1]': 'Accel. Raw [Y]',
'debug[2]': 'Accel. Raw [Z]',
},
'PIDLOOP': {
'debug[all]': 'Debug PID',
'debug[0]': 'Wait Time',
'debug[1]': 'Sub Update Time',
'debug[2]': 'PID Update Time',
'debug[3]': 'Motor Update Time',
},
'GYRO_SCALED': {
'debug[all]': 'Debug Gyro Scaled',
'debug[0]': 'Gyro Scaled [roll]',
'debug[1]': 'Gyro Scaled [pitch]',
'debug[2]': 'Gyro Scaled [yaw]',
},
'RC_INTERPOLATION': {
'debug[all]': 'Debug RC Interpolation',
'debug[0]': 'Raw RC Command [roll]',
'debug[1]': 'Current RX Refresh Rate',
'debug[2]': 'Interpolation Step Count',
'debug[3]': 'RC Setpoint [roll]',
},
'ANGLERATE': {
'debug[all]': 'Debug Angle Rate',
'debug[0]': 'Angle Rate [roll]',
'debug[1]': 'Angle Rate [pitch]',
'debug[2]': 'Angle Rate [yaw]',
},
'ESC_SENSOR': {
'debug[all]': 'ESC Sensor',
'debug[0]': 'Motor Index',
'debug[1]': 'Timeouts',
'debug[2]': 'CNC errors',
'debug[3]': 'Data age',
},
'SCHEDULER': {
'debug[all]': 'Scheduler',
'debug[2]': 'Schedule Time',
'debug[3]': 'Function Exec Time',
},
'STACK': {
'debug[all]': 'Stack',
'debug[0]': 'Stack High Mem',
'debug[1]': 'Stack Low Mem',
'debug[2]': 'Stack Current',
'debug[3]': 'Stack p',
},
'ESC_SENSOR_RPM': {
'debug[all]': 'ESC Sensor RPM',
'debug[0]': 'Motor 1',
'debug[1]': 'Motor 2',
'debug[2]': 'Motor 3',
'debug[3]': 'Motor 4',
},
'ESC_SENSOR_TMP': {
'debug[all]': 'ESC Sensor Temp',
'debug[0]': 'Motor 1',
'debug[1]': 'Motor 2',
'debug[2]': 'Motor 3',
'debug[3]': 'Motor 4',
},
'ALTITUDE': {
'debug[all]': 'Altitude',
'debug[0]': 'GPS Trust * 100',
'debug[1]': 'Baro Altitude',
'debug[2]': 'GPS Altitude',
'debug[3]': 'Vario',
},
'FFT': {
'debug[all]': 'Debug FFT',
'debug[0]': 'Gyro Pre Dyn Notch [dbg-axis]',
'debug[1]': 'Gyro Post Dyn Notch [dbg-axis]',
'debug[2]': 'Gyro Downsampled [dbg-axis]',
},
'FFT_TIME': {
'debug[all]': 'Debug FFT TIME',
'debug[0]': 'Active calc step',
'debug[1]': 'Step duration',
},
'FFT_FREQ': {
'debug[all]': 'Debug FFT FREQ',
'debug[0]': 'Notch 1 Center Freq [dbg-axis]',
'debug[1]': 'Notch 2 Center Freq [dbg-axis]',
'debug[2]': 'Notch 3 Center Freq [dbg-axis]',
'debug[3]': 'Gyro Pre Dyn Notch [dbg-axis]',
},
'RX_FRSKY_SPI': {
'debug[all]': 'FrSky SPI Rx',
'debug[0]': 'Looptime',
'debug[1]': 'Packet',
'debug[2]': 'Missing Packets',
'debug[3]': 'State',
},
'RX_SFHSS_SPI': {
'debug[all]': 'SFHSS SPI Rx',
'debug[0]': 'State',
'debug[1]': 'Missing Frame',
'debug[2]': 'Offset Max',
'debug[3]': 'Offset Min',
},
'GYRO_RAW': {
'debug[all]': 'Debug Gyro Raw',
'debug[0]': 'Gyro Raw [X]',
'debug[1]': 'Gyro Raw [Y]',
'debug[2]': 'Gyro Raw [Z]',
},
'DUAL_GYRO_RAW': {
'debug[all]': 'Debug Dual Gyro Raw',
'debug[0]': 'Gyro 1 Raw [roll]',
'debug[1]': 'Gyro 1 Raw [pitch]',
'debug[2]': 'Gyro 2 Raw [roll]',
'debug[3]': 'Gyro 2 Raw [pitch]',
},
'DUAL_GYRO_COMBINED': {
'debug[all]': 'Debug Dual Combined',
'debug[0]': 'Not Used',
'debug[1]': 'Gyro Filtered [roll]',
'debug[2]': 'Gyro Filtered [pitch]',
},
'DUAL_GYRO_DIFF': {
'debug[all]': 'Debug Dual Gyro Diff',
'debug[0]': 'Gyro Diff [roll]',
'debug[1]': 'Gyro Diff [pitch]',
'debug[2]': 'Gyro Diff [yaw]',
},
'MAX7456_SIGNAL': {
'debug[all]': 'Max7456 Signal',
'debug[0]': 'Mode Reg',
'debug[1]': 'Sense',
'debug[2]': 'ReInit',
'debug[3]': 'Rows',
},
'MAX7456_SPICLOCK': {
'debug[all]': 'Max7456 SPI Clock',
'debug[0]': 'Overclock',
'debug[1]': 'DevType',
'debug[2]': 'Divisor',
},
'SBUS': {
'debug[all]': 'SBus Rx',
'debug[0]': 'Frame Flags',
'debug[1]': 'State Flags',
'debug[2]': 'Frame Time',
},
'FPORT': {
'debug[all]': 'FPort Rx',
'debug[0]': 'Frame Interval',
'debug[1]': 'Frame Errors',
'debug[2]': 'Last Error',
'debug[3]': 'Telemetry Interval',
},
'RANGEFINDER': {
'debug[all]': 'Rangefinder',
'debug[0]': 'not used',
'debug[1]': 'Raw Altitude',
'debug[2]': 'Calc Altituded',
'debug[3]': 'SNR',
},
'RANGEFINDER_QUALITY': {
'debug[all]': 'Rangefinder Quality',
'debug[0]': 'Raw Altitude',
'debug[1]': 'SNR Threshold Reached',
'debug[2]': 'Dyn Distance Threshold',
'debug[3]': 'Is Surface Altitude Valid',
},
'LIDAR_TF': {
'debug[all]': 'Lidar TF',
'debug[0]': 'Distance',
'debug[1]': 'Strength',
'debug[2]': 'TF Frame (4)',
'debug[3]': 'TF Frame (5)',
},
'ADC_INTERNAL': {
'debug[all]': 'ADC Internal',
'debug[0]': 'Core Temp',
'debug[1]': 'VRef Internal Sample',
'debug[2]': 'Temp Sensor Sample',
'debug[3]': 'Vref mV',
},
'RUNAWAY_TAKEOFF': {
'debug[all]': 'Runaway Takeoff',
'debug[0]': 'Enabled',
'debug[1]': 'Activating Delay',
'debug[2]': 'Deactivating Delay',
'debug[3]': 'Deactivating Time',
},
'SDIO': {
'debug[all]': "Debug SDIO",
},
'CURRENT_SENSOR': {
'debug[all]': 'Current Sensor',
'debug[0]': 'milliVolts',
'debug[1]': 'centiAmps',
'debug[2]': 'Amps Latest',
'debug[3]': 'mAh Drawn',
},
'USB': {
'debug[all]': 'USB',
'debug[0]': 'Cable In',
'debug[1]': 'VCP Connected',
},
'SMART AUDIO': {
'debug[all]': 'Smart Audio VTx',
'debug[0]': 'Device + Version',
'debug[1]': 'Channel',
'debug[2]': 'Frequency',
'debug[3]': 'Power',
},
'RTH': {
'debug[all]': 'RTH Rescue codes',
'debug[0]': 'Pitch angle, deg',
'debug[1]': 'Rescue Phase',
'debug[2]': 'Failure code',
'debug[3]': 'Failure timers',
},
'ITERM_RELAX': {
'debug[all]': 'I-term Relax',
'debug[0]': 'Setpoint HPF [roll]',
'debug[1]': 'I Relax Factor [roll]',
'debug[2]': 'Relaxed I Error [roll]',
'debug[3]': 'Axis Error [roll]',
},
'ACRO_TRAINER': {
'debug[all]': 'Acro Trainer (a_t_axis)',
'debug[0]': 'Current Angle * 10 [deg]',
'debug[1]': 'Axis State',
'debug[2]': 'Correction amount',
'debug[3]': 'Projected Angle * 10 [deg]',
},
'RC_SMOOTHING': {
'debug[all]': 'Debug RC Smoothing',
'debug[0]': 'Raw RC Command',
'debug[1]': 'Raw RC Derivative',
'debug[2]': 'Smoothed RC Derivative',
'debug[3]': 'RX Refresh Rate',
},
'RX_SIGNAL_LOSS': {
'debug[all]': 'Rx Signal Loss',
'debug[0]': 'Signal Received',
'debug[1]': 'Failsafe',
'debug[2]': 'Not used',
'debug[3]': 'Throttle',
},
'RC_SMOOTHING_RATE': {
'debug[all]': 'Debug RC Smoothing Rate',
'debug[0]': 'Current RX Refresh Rate',
'debug[1]': 'Training Step Count',
'debug[2]': 'Average RX Refresh Rate',
'debug[3]': 'Sampling State',
},
'ANTI_GRAVITY': {
'debug[all]': 'I-term Relax',
'debug[0]': 'Base I gain * 1000',
'debug[1]': 'Final I gain * 1000',
'debug[2]': 'P gain [roll] * 1000',
'debug[3]': 'P gain [pitch] * 1000',
},
'DYN_LPF': {
'debug[all]': 'Debug Dyn LPF',
'debug[0]': 'Gyro Scaled [dbg-axis]',
'debug[1]': 'Notch Center [roll]',
'debug[2]': 'Lowpass Cutoff',
'debug[3]': 'Gyro Pre-Dyn [dbg-axis]',
},
'RX_SPEKTRUM_SPI': {
'debug[all]': 'Debug RX Spektrum SPI',
'debug[0]': 'Missed packets',
'debug[1]': 'Error',
'debug[2]': 'IRQ Status',
},
'DSHOT_RPM_TELEMETRY': {
'debug[all]': 'DShot Telemetry RPM',
'debug[0]': 'Motor 1 - DShot',
'debug[1]': 'Motor 2 - DShot',
'debug[2]': 'Motor 3 - DShot',
'debug[3]': 'Motor 4 - DShot',
'debug[4]': 'Motor 5 - DShot',
'debug[5]': 'Motor 6 - DShot',
'debug[6]': 'Motor 7 - DShot',
'debug[7]': 'Motor 8 - DShot',
},
'RPM_FILTER': {
'debug[all]': 'RPM Filter',
'debug[0]': 'Motor 1 - rpmFilter',
'debug[1]': 'Motor 2 - rpmFilter',
'debug[2]': 'Motor 3 - rpmFilter',
'debug[3]': 'Motor 4 - rpmFilter',
},
'D_MIN': {
'debug[all]': 'D_MIN',
'debug[0]': 'Gyro Factor [roll]',
'debug[1]': 'Setpoint Factor [roll]',
'debug[2]': 'Actual D [roll]',
'debug[3]': 'Actual D [pitch]',
},
'AC_CORRECTION': {
'debug[all]': 'AC Correction',
'debug[0]': 'AC Correction [roll]',
'debug[1]': 'AC Correction [pitch]',
'debug[2]': 'AC Correction [yaw]',
},
'AC_ERROR': {
'debug[all]': 'AC Error',
'debug[0]': 'AC Error [roll]',
'debug[1]': 'AC Error [pitch]',
'debug[2]': 'AC Error [yaw]',
},
'DUAL_GYRO_SCALED': {
'debug[all]': 'Dual Gyro Scaled',
'debug[0]': 'Gyro 1 [roll]',
'debug[1]': 'Gyro 1 [pitch]',
'debug[2]': 'Gyro 2 [roll]',
'debug[3]': 'Gyro 2 [pitch]',
},
'DSHOT_RPM_ERRORS': {
'debug[all]': 'DSHOT RPM Error',
'debug[0]': 'DSHOT RPM Error [1]',
'debug[1]': 'DSHOT RPM Error [2]',
'debug[2]': 'DSHOT RPM Error [3]',
'debug[3]': 'DSHOT RPM Error [4]',
},
'CRSF_LINK_STATISTICS_UPLINK': {
'debug[all]': 'CRSF Stats Uplink',
'debug[0]': 'Uplink RSSI 1',
'debug[1]': 'Uplink RSSI 2',
'debug[2]': 'Uplink Link Quality',
'debug[3]': 'RF Mode',
},
'CRSF_LINK_STATISTICS_PWR': {
'debug[all]': 'CRSF Stats Power',
'debug[0]': 'Antenna',
'debug[1]': 'SNR',
'debug[2]': 'TX Power',
},
'CRSF_LINK_STATISTICS_DOWN': {
'debug[all]': 'CRSF Stats Downlink',
'debug[0]': 'Downlink RSSI',
'debug[1]': 'Downlink Link Quality',
'debug[2]': 'Downlink SNR',
},
'BARO': {
'debug[all]': 'Debug Barometer',
'debug[0]': 'Baro State',
'debug[1]': 'Baro Pressure',
'debug[2]': 'Baro Temperature',
'debug[3]': 'Baro Altitude',
},
'GPS_RESCUE_THROTTLE_PID': {
'debug[all]': 'GPS Rescue throttle PIDs',
'debug[0]': 'Throttle P',
'debug[1]': 'Throttle D',
'debug[2]': 'Altitude',
'debug[3]': 'Target altitude',
},
'DYN_IDLE': {
'debug[all]': 'Dyn Idle',
'debug[0]': 'Dyn Idle P [roll]',
'debug[1]': 'Dyn Idle I [roll]',
'debug[2]': 'Dyn Idle D [roll]',
'debug[3]': 'Min RPM',
},
'FEEDFORWARD_LIMIT': {
'debug[all]': 'Feedforward Limit [roll]',
'debug[0]': 'Feedforward input [roll]',
'debug[1]': 'Feedforward input [pitch]',
'debug[2]': 'Feedforward limited [roll]',
},
'FEEDFORWARD': {
'debug[all]': 'Feedforward [roll]',
'debug[0]': 'Setpoint, un-smoothed [roll]',
'debug[1]': 'Delta, smoothed [roll]',
'debug[2]': 'Boost, smoothed [roll]',
'debug[3]': 'rcCommand Delta [roll]',
},
'BLACKBOX_OUTPUT': {
'debug[all]': 'Blackbox Output',
'debug[0]': 'Blackbox Rate',
'debug[1]': 'Blackbox Max Rate',
'debug[2]': 'Dropouts',
'debug[3]': 'Tx Bytes Free',
},
'GYRO_SAMPLE': {
'debug[all]': 'Gyro Sample',
'debug[0]': 'Before downsampling',
'debug[1]': 'After downsampling',
'debug[2]': 'After RPM',
'debug[3]': 'After all but Dyn Notch',
},
'RX_TIMING': {
'debug[all]': 'Receiver Timing (us)',
'debug[0]': 'Frame Delta',
'debug[1]': 'Frame Age',
},
'D_LPF': {
'debug[all]': 'D-Term [D_LPF]',
'debug[0]': 'Unfiltered D [roll]',
'debug[1]': 'Unfiltered D [pitch]',
'debug[2]': 'Filtered, with DMax [roll]',
'debug[3]': 'Filtered, with DMax [pitch]',
},
'VTX_TRAMP': {
'debug[all]': 'Tramp VTx',
'debug[0]': 'Status',
'debug[1]': 'Reply Code',
'debug[2]': 'Pit Mode',
'debug[3]': 'Retry Count',
},
'GHST': {
'debug[all]': 'Ghost Rx',
'debug[0]': 'CRC Error Count',
'debug[1]': 'Unknown Frame Count',
'debug[2]': 'RSSI',
'debug[3]': 'Link Quality',
},
'GHST_MSP': {
'debug[all]': 'Ghost MSP',
'debug[0]': 'MSP Frame Count',
'debug[1]': 'MSP Frame Counter',
},
'SCHEDULER_DETERMINISM': {
'debug[all]': 'Scheduler Determinism',
'debug[0]': 'Cycle Start time',
'debug[1]': 'ID of Late Task',
'debug[2]': 'Task Delay Time',
'debug[3]': 'Gyro Clock Skew',
'debug[4]': 'Minimum Gyro period in 100th of a us',
'debug[5]': 'Maximum Gyro period in 100th of a us',
'debug[6]': 'Span of Gyro period in 100th of a us',
'debug[7]': 'Gyro cycle deviation in 100th of a us',
},
'TIMING_ACCURACY': {
'debug[all]': 'Timing Accuracy',
'debug[0]': 'CPU Busy',
'debug[1]': 'Late Tasks per second',
'debug[2]': 'Total delay in last second',
'debug[3]': 'Total Tasks per second',
'debug[4]': 'Late Tasks per thousand',
},
'RX_EXPRESSLRS_SPI': {
'debug[all]': 'ExpressLRS SPI Rx',
'debug[0]': 'Lost Connection Count',
'debug[1]': 'RSSI',
'debug[2]': 'SNR',
'debug[3]': 'Uplink LQ',
},
'RX_EXPRESSLRS_PHASELOCK': {
'debug[all]': 'ExpressLRS SPI Phaselock',
'debug[0]': 'Phase offset',
'debug[1]': 'Filtered phase offset',
'debug[2]': 'Frequency Offset',
'debug[3]': 'Phase Shift',
},
'RX_STATE_TIME': {
'debug[all]': 'Rx State Time',
'debug[0]': 'Time 0',
'debug[1]': 'Time 1',
'debug[2]': 'Time 2',
'debug[3]': 'Time 3',
},
'GPS_RESCUE_VELOCITY': {
'debug[all]': 'GPS Rescue Velocity',
'debug[0]': 'Velocity P',
'debug[1]': 'Velocity D',
'debug[2]': 'Velocity to Home',
'debug[3]': 'Target Velocity',
},
'GPS_RESCUE_HEADING': {
'debug[all]': 'GPS Rescue Heading',
'debug[0]': 'Ground Speed',
'debug[1]': 'GPS Heading',
'debug[2]': 'IMU Attitude',
'debug[3]': 'Angle to home',
'debug[4]': 'magYaw',
'debug[5]': 'Roll MixAtt',
'debug[6]': 'Roll Added',
'debug[7]': 'Rescue Yaw Rate',
},
'GPS_RESCUE_TRACKING': {
'debug[all]': 'GPS Rescue Tracking',
'debug[0]': 'Velocity to home',
'debug[1]': 'Target velocity',
'debug[2]': 'Altitude',
'debug[3]': 'Target altitude',
},
'GPS_CONNECTION': {
'debug[all]': 'GPS Connection',
'debug[0]': 'Nav Model',
'debug[1]': 'GPS Nav interval',
'debug[2]': 'Task timer',
'debug[3]': 'Baud Rate / FC interval',
'debug[4]': 'State*100 +SubState',
'debug[5]': 'ExecuteTime',
'debug[6]': 'Ack State',
'debug[7]': 'Rx buffer size',
},
'ATTITUDE': {
'debug[all]': 'Attitude',
'debug[0]': 'accADC X',
'debug[1]': 'accADC Y',
'debug[2]': 'Setpoint Roll',
'debug[3]': 'Setpoint Pitch',
},
'VTX_MSP': {
'debug[all]': 'VTX MSP',
'debug[0]': 'packetCounter',
'debug[1]': 'isCrsfPortConfig',
'debug[2]': 'isLowPowerDisarmed',
'debug[3]': 'mspTelemetryDescriptor',
},
'GPS_DOP': {
'debug[all]': 'GPS Dilution of Precision',
'debug[0]': 'Number of Satellites',
'debug[1]': 'pDOP (positional - 3D)',
'debug[2]': 'hDOP (horizontal - 2D)',
'debug[3]': 'vDOP (vertical - 1D)',
},
'FAILSAFE': {
'debug[all]': 'Failsafe',
'debug[0]': 'Failsafe Phase switch',
'debug[1]': 'Failsafe State',
'debug[2]': 'Receiving data from Rx',
'debug[3]': 'Failsafe Phase',
},
'GYRO_CALIBRATION': {
'debug[all]': 'Gyro Calibration',
'debug[0]': 'Gyro Calibration X',
'debug[1]': 'Gyro Calibration Y',
'debug[2]': 'Gyro Calibration Z',
'debug[3]': 'Calibration Cycles remaining',
},
'ANGLE_MODE': {
'debug[all]': 'Angle Mode',
'debug[0]': 'Angle Target',
'debug[1]': 'Angle Error',
'debug[2]': 'Angle Feedforward',
'debug[3]': 'Angle Current',
},
'ANGLE_TARGET': {
'debug[all]': 'Angle Target',
'debug[0]': 'Angle Target',
'debug[1]': 'Sin Angle',
'debug[2]': 'Current PID Setpoint',
'debug[3]': 'Angle Current',
},
'CURRENT_ANGLE': {
'debug[all]': 'Current Angle',
'debug[0]': 'Current Angle X',
'debug[1]': 'Current Angle Y',
'debug[2]': 'Current Angle Z',
},
'DSHOT_TELEMETRY_COUNTS': {
'debug[all]': 'DShot Telemetry Counts',
'debug[0]': 'DShot Telemetry Debug[0] + 1',
'debug[1]': 'DShot Telemetry Debug[1] + 1',
'debug[2]': 'DShot Telemetry Debug[2] + 1',
'debug[3]': 'Preamble Skip',
},
'RPM_LIMIT': {
'debug[all]': 'RPM Limit',
'debug[0]': 'Average RPM',
'debug[1]': 'Average RPM (unsmoothed)',
'debug[2]': 'RPM Limit throttle scale',
'debug[3]': 'Throttle',
'debug[4]': 'Error',
'debug[5]': 'Proportional',
'debug[6]': 'Integral',
'debug[7]': 'Derivative',
},
'RC_STATS': {
'debug[all]': 'RC Stats',
'debug[0]': 'Average Throttle',
},
'MAG_CALIB': {
'debug[all]': 'Mag Calibration',
'debug[0]': 'Mag X',
'debug[1]': 'Mag Y',
'debug[2]': 'Mag Z',
'debug[3]': 'Norm / Length of magADC',
'debug[4]': 'Estimated Mag Bias X',
'debug[5]': 'Estimated Mag Bias Y',
'debug[6]': 'Estimated Mag Bias Z',
'debug[7]': 'Mag Bias Estimator',
},
'MAG_TASK_RATE': {
'debug[all]': 'Mag Task Rate',
'debug[0]': 'Task Rate (Hz)',
'debug[1]': 'Actual Data Rate (Hz)',
'debug[2]': 'Data Interval (Us)',
'debug[3]': 'Execute Time (Us)',
'debug[4]': 'Bus Busy',
'debug[5]': 'Read State',
'debug[6]': 'Task Time (Us)',
},
'EZLANDING': {
'debug[all]': 'EZ Landing',
'debug[0]': 'EZ Land Factor',
'debug[1]': 'Adjusted Throttle',
'debug[2]': 'Upper Limit',
'debug[3]': 'EZ Land Limit',
'debug[4]': 'Stick Limit',
'debug[5]': 'Speed Limit',
},
'TPA': {
'debug[all]': 'TPA',
'debug[0]': 'TPA Factor',
},
'S_TERM': {
'debug[all]': 'S Term',
'debug[0]': 'S Term [roll]',
'debug[1]': 'S Term [pitch]',
'debug[2]': 'S Term [yaw]',
},
'SPA': {
'debug[all': 'SPA',
'debug[0]': 'Setpoint PID Attenuation [roll]',
'debug[1]': 'Setpoint PID Attenuation [pitch]',
'debug[2]': 'Setpoint PID Attenuation [yaw]',
},
'TASK': {
'debug[all]': 'TASK',
'debug[0]': 'Value',
'debug[1]': 'Rate (Hz)',
'debug[2]': 'Max (us)',
'debug[3]': 'Average (us)',
'debug[4]': 'Estimated execution time (us)',
'debug[5]': 'Actual execution time (us)',
'debug[6]': 'Difference estimated vs actual',
'debug[7]': 'Late count',
},
},
enableFields: [
{ text: "PID" },
{ text: "RC Commands" },
{ text: "Setpoint" },
{ text: "Battery" },
{ text: "Magnetometer" },
{ text: "Altitude" },
{ text: "RSSI" },
{ text: "Gyro" },
{ text: "Accelerometer" },
{ text: "Debug Log" },
{ text: "Motor" },
{ text: "GPS" },
{ text: "RPM" },
{ text: "Gyro (Unfiltered)"},
],
};
function update() {
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) {
DEBUG.fieldNames.FFT_FREQ = {
'debug[all]': 'Debug FFT FREQ',
'debug[0]': 'Gyro Pre Dyn Notch [dbg-axis]',
'debug[1]': 'Notch 1 Center Freq [dbg-axis]',
'debug[2]': 'Notch 2 Center Freq [dbg-axis]',
'debug[3]': 'Notch 3 Center Freq [dbg-axis]',
'debug[4]': 'Notch 4 Center Freq [dbg-axis]',
'debug[5]': 'Notch 5 Center Freq [dbg-axis]',
'debug[6]': 'Notch 6 Center Freq [dbg-axis]',
'debug[7]': 'Notch 7 Center Freq [dbg-axis]',
};
DEBUG.fieldNames.TPA = {
'debug[all]': 'TPA',
'debug[0]': 'TPA Factor',
'debug[1]': 'TPA Pitch Angle Factor (Wing)',
'debug[2]': 'TPA Argument (Wing)',
};
}
}
update();
export default DEBUG;