mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-28 17:54:15 +01:00
RM: Fixed initialization of the debug console.
This commit is contained in:
parent
6ed9b63da9
commit
7a930807aa
@ -32,8 +32,8 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
||||||
#define DEBUG_LEVEL 0
|
#define DEBUG_LEVEL 2
|
||||||
#define DEBUG_PRINTF(level, ...) {if(level <= DEBUG_LEVEL && pios_com_aux_id > 0) { PIOS_COM_SendFormattedStringNonBlocking(pios_com_aux_id, __VA_ARGS__); }}
|
#define DEBUG_PRINTF(level, ...) {if(level <= DEBUG_LEVEL && pios_com_debug_id > 0) { PIOS_COM_SendFormattedStringNonBlocking(pios_com_debug_id, __VA_ARGS__); }}
|
||||||
#else
|
#else
|
||||||
#define DEBUG_PRINTF(level, ...)
|
#define DEBUG_PRINTF(level, ...)
|
||||||
#endif /* PIOS_INCLUDE_DEBUG_CONSOLE */
|
#endif /* PIOS_INCLUDE_DEBUG_CONSOLE */
|
||||||
|
@ -58,7 +58,6 @@
|
|||||||
/* Variables related to the RFM22B functionality */
|
/* Variables related to the RFM22B functionality */
|
||||||
#define PIOS_INCLUDE_RFM22B
|
#define PIOS_INCLUDE_RFM22B
|
||||||
#define PIOS_INCLUDE_RFM22B_COM
|
#define PIOS_INCLUDE_RFM22B_COM
|
||||||
#define RFM22_EXT_INT_USE
|
|
||||||
|
|
||||||
/* Select the sensors to include */
|
/* Select the sensors to include */
|
||||||
#define PIOS_INCLUDE_HMC5883
|
#define PIOS_INCLUDE_HMC5883
|
||||||
@ -92,6 +91,8 @@
|
|||||||
/* A really shitty setting saving implementation */
|
/* A really shitty setting saving implementation */
|
||||||
#define PIOS_INCLUDE_FLASH_SECTOR_SETTINGS
|
#define PIOS_INCLUDE_FLASH_SECTOR_SETTINGS
|
||||||
|
|
||||||
|
//#define PIOS_INCLUDE_DEBUG_CONSOLE
|
||||||
|
|
||||||
/* Other Interfaces */
|
/* Other Interfaces */
|
||||||
//#define PIOS_INCLUDE_I2C_ESC
|
//#define PIOS_INCLUDE_I2C_ESC
|
||||||
|
|
||||||
|
@ -529,7 +529,7 @@ void PIOS_Board_Init(void) {
|
|||||||
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
|
case HWSETTINGS_RM_MAINPORT_DEBUGCONSOLE:
|
||||||
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
||||||
{
|
{
|
||||||
PIOS_Board_configure_com(&pios_usart_main_cfg, 0, PIOS_COM_DEBUGCONSOLE_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);
|
PIOS_Board_configure_com(&pios_usart_main_cfg, 0, PIOS_COM_DEBUGCONSOLE_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_debug_id);
|
||||||
}
|
}
|
||||||
#endif /* PIOS_INCLUDE_DEBUG_CONSOLE */
|
#endif /* PIOS_INCLUDE_DEBUG_CONSOLE */
|
||||||
break;
|
break;
|
||||||
@ -592,7 +592,7 @@ void PIOS_Board_Init(void) {
|
|||||||
case HWSETTINGS_RM_FLEXIPORT_DEBUGCONSOLE:
|
case HWSETTINGS_RM_FLEXIPORT_DEBUGCONSOLE:
|
||||||
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
#if defined(PIOS_INCLUDE_DEBUG_CONSOLE)
|
||||||
{
|
{
|
||||||
PIOS_Board_configure_com(&pios_usart_flexi_cfg, 0, PIOS_COM_DEBUGCONSOLE_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_aux_id);
|
PIOS_Board_configure_com(&pios_usart_main_cfg, 0, PIOS_COM_DEBUGCONSOLE_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_debug_id);
|
||||||
}
|
}
|
||||||
#endif /* PIOS_INCLUDE_DEBUG_CONSOLE */
|
#endif /* PIOS_INCLUDE_DEBUG_CONSOLE */
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user