Skip to content

Commit 552795f

Browse files
committed
Added #if around variable used only by log_i
1 parent 23421a6 commit 552795f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: libraries/BluetoothSerial/src/BluetoothSerial.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -973,10 +973,12 @@ bool BluetoothSerial::connect(uint8_t remoteAddress[], int channel, esp_spp_sec_
973973
log_i("master : remoteAddress");
974974
xEventGroupClearBits(_spp_event_group, SPP_CLOSED);
975975
if (channel > 0) {
976+
#if (ARDUHAL_LOG_LEVEL >= ARDUHAL_LOG_LEVEL_INFO)
976977
char bda_str[18];
977978
log_i("spp connect to remote %s channel %d",
978979
bda2str(_peer_bd_addr, bda_str, sizeof(bda_str)),
979980
channel);
981+
#endif
980982
if(esp_spp_connect(sec_mask, role, channel, _peer_bd_addr) != ESP_OK ) {
981983
log_e("spp connect failed");
982984
return false;

0 commit comments

Comments
 (0)