8000 lorapf: fix warnings · pycom/pycom-micropython-sigfox@b822a70 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit b822a70

Browse files
committed
lorapf: fix warnings
1 parent 58db509 commit b822a70

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

esp32/pygate/lora_pkt_fwd/lora_pkt_fwd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ static struct lgw_tx_gain_lut_s txlut; /* TX gain table */
230230
static uint32_t tx_freq_min[LGW_RF_CHAIN_NB]; /* lowest frequency supported by TX chain */
231231
static uint32_t tx_freq_max[LGW_RF_CHAIN_NB]; /* highest frequency supported by TX chain */
232232

233-
int debug_level = INFO_;
233+
int debug_level = LORAPF_INFO_;
234234

235235
/* -------------------------------------------------------------------------- */
236236
/* --- PRIVATE FUNCTIONS DECLARATION ---------------------------------------- */
@@ -1358,8 +1358,8 @@ void TASK_lora_gw(void *pvParameters) {
13581358
}
13591359

13601360
/* display a report */
1361-
#if DEBUG_LEVEL >= INFO_
1362-
if ( debug_level >= INFO_){
1361+
#if LORAPF_DEBUG_LEVEL >= LORAPF_INFO_
1362+
if ( debug_level >= LORAPF_INFO_){
13631363
MSG_INFO("[main] report\n##### %s #####\n", stat_timestamp);
13641364
mp_printf(&mp_plat_print, "### [UPSTREAM] ###\n");
13651365
mp_printf(&mp_plat_print, "# RF packets received by concentrator: %u\n", cp_nb_rx_rcv);

esp32/pygate/lora_pkt_fwd/trace.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,42 +32,42 @@ Maintainer: Michael Coracin
3232
#include "py/mpprint.h"
3333

3434
// debug levels
35-
#define DEBUG 4
36-
#define INFO_ 3
37-
#define WARN_ 2
38-
#define ERROR 1
35+
#define LORAPF_DEBUG 4
36+
#define LORAPF_INFO_ 3
37+
#define LORAPF_WARN_ 2
38+
#define LORAPF_ERROR 1
3939

4040
// run time debug level
4141
extern int debug_level;
4242
// compile time debug level
43-
#define DEBUG_LEVEL INFO_
43+
#define LORAPF_DEBUG_LEVEL LORAPF_INFO_
4444

4545
#define MSG_DX(LEVEL, fmt, ...) \
4646
do { \
4747
if (debug_level >= LEVEL) \
48-
mp_printf(&mp_plat_print, "[%u] lorapf: " #LEVEL " " fmt, mp_hal_ticks_ms(), ##__VA_ARGS__); \
48+
mp_printf(&mp_plat_print, "[%u] " #LEVEL ":" fmt, mp_hal_ticks_ms(), ##__VA_ARGS__); \
4949
} while (0)
5050

51-
#if DEBUG_LEVEL >= DEBUG
52-
#define MSG_DEBUG(...) MSG_DX(DEBUG, __VA_ARGS__)
51+
#if LORAPF_DEBUG_LEVEL >= LORAPF_DEBUG
52+
#define MSG_DEBUG(...) MSG_DX(LORAPF_DEBUG, __VA_ARGS__)
5353
#else
5454
#define MSG_DEBUG(...) (void)0
5555
#endif
5656

57-
#if DEBUG_LEVEL >= INFO_
58-
#define MSG_INFO(...) MSG_DX(INFO_, __VA_ARGS__)
57+
#if LORAPF_DEBUG_LEVEL >= LORAPF_INFO_
58+
#define MSG_INFO(...) MSG_DX(LORAPF_INFO_, __VA_ARGS__)
5959
#else
6060
#define MSG_INFO(...) (void)0
6161
#endif
6262

63-
#if DEBUG_LEVEL >= WARN_
64-
#define MSG_WARN(...) MSG_DX(WARN_, __VA_ARGS__)
63+
#if LORAPF_DEBUG_LEVEL >= LORAPF_WARN_
64+
#define MSG_WARN(...) MSG_DX(LORAPF_WARN_, __VA_ARGS__)
6565
#else
6666
#define MSG_WARN(...) (void)0
6767
#endif
6868

69-
#if DEBUG_LEVEL >= ERROR
70-
#define MSG_ERROR(...) MSG_DX(ERROR, __VA_ARGS__)
69+
#if LORAPF_DEBUG_LEVEL >= LORAPF_ERROR
70+
#define MSG_ERROR(...) MSG_DX(LORAPF_ERROR, __VA_ARGS__)
7171
#else
7272
#define MSG_ERROR(...) (void)0
7373
#endif

0 commit comments

Comments
 (0)
0