Merge pull request #11297 from SteveCEvans/baro_state
[betaflight.git] / src / main / cli / cli_debug_print.h
blobb167d62b192743d658e281b5c160e71219feee19
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 // Provides: cliPrintDebug... functions for displaying debugging information in the CLI
23 // Usage: Make sure USE_CLI_DEBUG_PRINT is defined
24 // Include this header in your code
25 // Add cliDebugPrint... statements as needed in your code
26 // Use the CLI to see the output of the debugging statements
28 // Cautions: Be sure to include rate limiting logic to your debug printing
29 // if needed otherwise you can flood the output.
31 // Be sure to reverse the Usage steps above to remove the debugging
32 // elements before submitting final code.
34 #include "platform.h"
36 #ifdef USE_CLI_DEBUG_PRINT
38 #include "cli/cli.h"
40 // Commands to print debugging information to the CLI
41 #define cliDebugPrintLinefeed cliPrintLinefeed
42 #define cliDebugPrintLinef cliPrintLinef
43 #define cliDebugPrintLine cliPrintLine
44 #define cliDebugPrintf cliPrintf
45 #define cliDebugPrint cliPrint
47 #else
48 #error "Do not #include cli_debug_print.h unless you intend to do debugging and also define USE_CLI_DEBUG_PRINT"
49 #endif