1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #13077 from haukepetersen/opt_nimble_autoconndbgmessages

pkg/nimble_autoconn: optimize debug output
This commit is contained in:
Hauke Petersen 2020-01-10 16:35:51 +01:00 committed by GitHub
commit 6827472a1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,7 @@ static void _on_scan_evt(uint8_t type, const ble_addr_t *addr, int8_t rssi,
static void _evt_dbg(const char *msg, int handle, const uint8_t *addr)
{
#if ENABLE_DEBUG
printf("%s (%i|", msg, handle);
printf("[autoconn] %s (%i|", msg, handle);
bluetil_addr_print(addr);
puts(")");
#else
@ -162,26 +162,26 @@ static void _on_netif_evt(int handle, nimble_netif_event_t event,
switch (event) {
case NIMBLE_NETIF_CONNECTED_MASTER:
_evt_dbg("[autoconn] CONNECTED master", handle, addr);
_evt_dbg("CONNECTED master", handle, addr);
assert(_state == STATE_CONN);
_state = STATE_IDLE;
break;
case NIMBLE_NETIF_CONNECTED_SLAVE:
_evt_dbg("[autoconn] CONNECTED slave", handle, addr);
_evt_dbg("CONNECTED slave", handle, addr);
break;
case NIMBLE_NETIF_CLOSED_MASTER:
_evt_dbg("[autoconn] CLOSED master", handle, addr);
_evt_dbg("CLOSED master", handle, addr);
break;
case NIMBLE_NETIF_CLOSED_SLAVE:
_evt_dbg("[autoconn] CLOSED slave", handle, addr);
_evt_dbg("CLOSED slave", handle, addr);
break;
case NIMBLE_NETIF_CONNECT_ABORT:
_evt_dbg("[autoconn] ABORTED", handle, addr);
_evt_dbg("ABORTED", handle, addr);
assert(_state == STATE_CONN);
_state = STATE_IDLE;
break;
case NIMBLE_NETIF_CONN_UPDATED:
_evt_dbg("[autoconn] UPDATED", handle, addr);
_evt_dbg("UPDATED", handle, addr);
en = 0;
break;
default: