Fix missing 'platform.h' includes in compilation units, and make them stay away.
[betaflight.git] / src / main / build / debug.c
blobca953f2e06053fc37734aac37fb2aec75f4112eb
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",
58 "DUAL_GYRO_RAW",
59 "DUAL_GYRO_COMBINE",
60 "DUAL_GYRO_DIFF",
61 "MAX7456_SIGNAL",
62 "MAX7456_SPICLOCK",
63 "SBUS",
64 "FPORT",
65 "RANGEFINDER",
66 "RANGEFINDER_QUALITY",
67 "LIDAR_TF",
68 "ADC_INTERNAL",
69 "RUNAWAY_TAKEOFF",
70 "SDIO",
71 "CURRENT_SENSOR",
72 "USB",
73 "SMARTAUDIO",
74 "RTH",
75 "ITERM_RELAX",
76 "ACRO_TRAINER",
77 "RC_SMOOTHING",
78 "RX_SIGNAL_LOSS",
79 "RC_SMOOTHING_RATE",
80 "ANTI_GRAVITY",
81 "DYN_LPF",
82 "RX_SPEKTRUM_SPI",
83 "DSHOT_RPM_TELEMETRY",
84 "RPM_FILTER",
85 "D_MIN",