Skip to content

Commit 04783c0

Browse files
author
Victor Tchistiak
committed
20190916 - Small log change to improve log sequencing
1 parent c786489 commit 04783c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/BluetoothSerial/src/BluetoothSerial.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,25 +228,25 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
228228
break;
229229

230230
case ESP_SPP_SRV_OPEN_EVT://Server connection open
231+
log_i("ESP_SPP_SRV_OPEN_EVT");
231232
if (!_spp_client){
232233
_spp_client = param->open.handle;
233234
} else {
234235
secondConnectionAttempt = true;
235236
esp_spp_disconnect(param->open.handle);
236237
}
237238
xEventGroupSetBits(_spp_event_group, SPP_CONNECTED);
238-
log_i("ESP_SPP_SRV_OPEN_EVT");
239239
break;
240240

241241
case ESP_SPP_CLOSE_EVT://Client connection closed
242+
log_i("ESP_SPP_CLOSE_EVT");
242243
if(secondConnectionAttempt) {
243244
secondConnectionAttempt = false;
244245
} else {
245246
_spp_client = 0;
246247
xEventGroupSetBits(_spp_event_group, SPP_DISCONNECTED);
247248
}
248249
xEventGroupClearBits(_spp_event_group, SPP_CONNECTED);
249-
log_i("ESP_SPP_CLOSE_EVT");
250250
break;
251251

252252
case ESP_SPP_CONG_EVT://connection congestion status changed
@@ -290,14 +290,14 @@ static void esp_spp_cb(esp_spp_cb_event_t event, esp_spp_cb_param_t *param)
290290
}
291291
break;
292292
case ESP_SPP_OPEN_EVT://Client connection open
293+
log_i("ESP_SPP_OPEN_EVT");
293294
if (!_spp_client){
294295
_spp_client = param->open.handle;
295296
} else {
296297
secondConnectionAttempt = true;
297298
esp_spp_disconnect(param->open.handle);
298299
}
299300
xEventGroupSetBits(_spp_event_group, SPP_CONNECTED);
300-
log_i("ESP_SPP_OPEN_EVT");
301301
break;
302302
case ESP_SPP_START_EVT://server started
303303
log_i("ESP_SPP_START_EVT");

0 commit comments

Comments
 (0)