Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 79e4339

Browse filesBrowse files
luc-githubme-no-dev
authored andcommitted
Remove warnings if no debug enabled (espressif#3334)
1 parent a35035f commit 79e4339
Copy full SHA for 79e4339

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed

‎libraries/BluetoothSerial/src/BluetoothSerial.cpp

Copy file name to clipboardExpand all lines: libraries/BluetoothSerial/src/BluetoothSerial.cpp
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ typedef struct {
7676
uint8_t data[];
7777
} spp_packet_t;
7878

79+
#if (ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO)
7980
static char *bda2str(esp_bd_addr_t bda, char *str, size_t size)
8081
{
8182
if (bda == NULL || str == NULL || size < 18) {
@@ -87,6 +88,7 @@ static char *bda2str(esp_bd_addr_t bda, char *str, size_t size)
8788
p[0], p[1], p[2], p[3], p[4], p[5]);
8889
return str;
8990
}
91+
#endif
9092

9193
static bool get_name_from_eir(uint8_t *eir, char *bdname, uint8_t *bdname_len)
9294
{
@@ -325,8 +327,10 @@ static void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *pa
325327
switch(event){
326328
case ESP_BT_GAP_DISC_RES_EVT:
327329
log_i("ESP_BT_GAP_DISC_RES_EVT");
330+
#if (ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO)
328331
char bda_str[18];
329332
log_i("Scanned device: %s", bda2str(param->disc_res.bda, bda_str, 18));
333+
#endif
330334
for (int i = 0; i < param->disc_res.num_prop; i++) {
331335
uint8_t peer_bdname_len;
332336
char peer_bdname[ESP_BT_GAP_MAX_BDNAME_LEN + 1];

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.