Gyro native rate sampling, filtering, and scheduler restructuring
[betaflight.git] / src / main / build / debug.c
blobc47726ef3d4bf639badda336750d237ab5428304
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #include <stdint.h>
23 #include "platform.h"
25 #include "debug.h"
27 int16_t debug[DEBUG16_VALUE_COUNT];
28 uint8_t debugMode;
30 #ifdef DEBUG_SECTION_TIMES
31 uint32_t sectionTimes[2][4];
32 #endif
34 // Please ensure that these names are aligned with the enum values defined in 'debug.h'
35 const char * const debugModeNames[DEBUG_COUNT] = {
36 "NONE",
37 "CYCLETIME",
38 "BATTERY",
39 "GYRO_FILTERED",
40 "ACCELEROMETER",
41 "PIDLOOP",
42 "GYRO_SCALED",
43 "RC_INTERPOLATION",
44 "ANGLERATE",
45 "ESC_SENSOR",
46 "SCHEDULER",
47 "STACK",
48 "ESC_SENSOR_RPM",
49 "ESC_SENSOR_TMP",
50 "ALTITUDE",
51 "FFT",
52 "FFT_TIME",
53 "FFT_FREQ",
54 "RX_FRSKY_SPI",
55 "RX_SFHSS_SPI",
56 "GYRO_RAW",
57 "DUAL_GYRO_RAW",
58 "DUAL_GYRO_DIFF",
59 "MAX7456_SIGNAL",
60 "MAX7456_SPICLOCK",
61 "SBUS",
62 "FPORT",
63 "RANGEFINDER",
64 "RANGEFINDER_QUALITY",
65 "LIDAR_TF",
66 "ADC_INTERNAL",
67 "RUNAWAY_TAKEOFF",
68 "SDIO",
69 "CURRENT_SENSOR",
70 "USB",
71 "SMARTAUDIO",
72 "RTH",
73 "ITERM_RELAX",
74 "ACRO_TRAINER",
75 "RC_SMOOTHING",
76 "RX_SIGNAL_LOSS",
77 "RC_SMOOTHING_RATE",
78 "ANTI_GRAVITY",
79 "DYN_LPF",
80 "RX_SPEKTRUM_SPI",
81 "DSHOT_RPM_TELEMETRY",
82 "RPM_FILTER",
83 "D_MIN",
84 "AC_CORRECTION",
85 "AC_ERROR",
86 "DUAL_GYRO_SCALED",
87 "DSHOT_RPM_ERRORS",
88 "CRSF_LINK_STATISTICS_UPLINK",
89 "CRSF_LINK_STATISTICS_PWR",
90 "CRSF_LINK_STATISTICS_DOWN",
91 "BARO",
92 "GPS_RESCUE_THROTTLE_PID",
93 "DYN_IDLE",
94 "FF_LIMIT",
95 "FF_INTERPOLATED",
96 "BLACKBOX_OUTPUT",
97 "GYRO_SAMPLE",