mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 13:05:20 -05:00
refactor: Remove v1 logging vestiges.
This commit is contained in:
committed by
Pete Johanson
parent
e84b4299b5
commit
062f94d014
@@ -377,8 +377,8 @@ static bool split_central_eir_found(struct bt_data *data, void *user_data) {
|
||||
bt_uuid_to_str(&uuid.uuid, uuid_str, sizeof(uuid_str));
|
||||
bt_uuid_to_str(BT_UUID_DECLARE_128(ZMK_SPLIT_BT_SERVICE_UUID), service_uuid_str,
|
||||
sizeof(service_uuid_str));
|
||||
LOG_DBG("UUID %s does not match split UUID: %s", log_strdup(uuid_str),
|
||||
log_strdup(service_uuid_str));
|
||||
LOG_DBG("UUID %s does not match split UUID: %s", uuid_str,
|
||||
service_uuid_str);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ static void split_central_device_found(const bt_addr_le_t *addr, int8_t rssi, ui
|
||||
char dev[BT_ADDR_LE_STR_LEN];
|
||||
|
||||
bt_addr_le_to_str(addr, dev, sizeof(dev));
|
||||
LOG_DBG("[DEVICE]: %s, AD evt type %u, AD data len %u, RSSI %i", log_strdup(dev), type, ad->len,
|
||||
LOG_DBG("[DEVICE]: %s, AD evt type %u, AD data len %u, RSSI %i", dev, type, ad->len,
|
||||
rssi);
|
||||
|
||||
/* We're only interested in connectable events */
|
||||
@@ -469,7 +469,7 @@ static void split_central_connected(struct bt_conn *conn, uint8_t conn_err) {
|
||||
}
|
||||
|
||||
if (conn_err) {
|
||||
LOG_ERR("Failed to connect to %s (%u)", log_strdup(addr), conn_err);
|
||||
LOG_ERR("Failed to connect to %s (%u)", addr, conn_err);
|
||||
|
||||
release_peripheral_slot_for_conn(conn);
|
||||
|
||||
@@ -477,7 +477,7 @@ static void split_central_connected(struct bt_conn *conn, uint8_t conn_err) {
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_DBG("Connected: %s", log_strdup(addr));
|
||||
LOG_DBG("Connected: %s", addr);
|
||||
|
||||
confirm_peripheral_slot_conn(conn);
|
||||
split_central_process_connection(conn);
|
||||
@@ -489,7 +489,7 @@ static void split_central_disconnected(struct bt_conn *conn, uint8_t reason) {
|
||||
|
||||
bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));
|
||||
|
||||
LOG_DBG("Disconnected: %s (reason %d)", log_strdup(addr), reason);
|
||||
LOG_DBG("Disconnected: %s (reason %d)", addr, reason);
|
||||
|
||||
err = release_peripheral_slot_for_conn(conn);
|
||||
|
||||
@@ -579,7 +579,7 @@ int zmk_split_bt_invoke_behavior(uint8_t source, struct zmk_behavior_binding *bi
|
||||
if (strlcpy(payload.behavior_dev, binding->behavior_dev, payload_dev_size) >=
|
||||
payload_dev_size) {
|
||||
LOG_ERR("Truncated behavior label %s to %s before invoking peripheral behavior",
|
||||
log_strdup(binding->behavior_dev), log_strdup(payload.behavior_dev));
|
||||
binding->behavior_dev, payload.behavior_dev);
|
||||
}
|
||||
|
||||
struct zmk_split_run_behavior_payload_wrapper wrapper = {.source = source, .payload = payload};
|
||||
|
||||
@@ -59,7 +59,7 @@ static void disconnected(struct bt_conn *conn, uint8_t reason) {
|
||||
|
||||
bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));
|
||||
|
||||
LOG_DBG("Disconnected from %s (reason 0x%02x)", log_strdup(addr), reason);
|
||||
LOG_DBG("Disconnected from %s (reason 0x%02x)", addr, reason);
|
||||
|
||||
is_connected = false;
|
||||
|
||||
@@ -73,9 +73,9 @@ static void security_changed(struct bt_conn *conn, bt_security_t level, enum bt_
|
||||
bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));
|
||||
|
||||
if (!err) {
|
||||
LOG_DBG("Security changed: %s level %u", log_strdup(addr), level);
|
||||
LOG_DBG("Security changed: %s level %u", addr, level);
|
||||
} else {
|
||||
LOG_ERR("Security failed: %s level %u err %d", log_strdup(addr), level, err);
|
||||
LOG_ERR("Security failed: %s level %u err %d", addr, level, err);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ static void le_param_updated(struct bt_conn *conn, uint16_t interval, uint16_t l
|
||||
|
||||
bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr));
|
||||
|
||||
LOG_DBG("%s: interval %d latency %d timeout %d", log_strdup(addr), interval, latency, timeout);
|
||||
LOG_DBG("%s: interval %d latency %d timeout %d", addr, interval, latency, timeout);
|
||||
}
|
||||
|
||||
static struct bt_conn_cb conn_callbacks = {
|
||||
|
||||
@@ -60,7 +60,7 @@ static ssize_t split_svc_run_behavior(struct bt_conn *conn, const struct bt_gatt
|
||||
.param2 = payload->data.param2,
|
||||
.behavior_dev = payload->behavior_dev,
|
||||
};
|
||||
LOG_DBG("%s with params %d %d: pressed? %d", log_strdup(binding.behavior_dev),
|
||||
LOG_DBG("%s with params %d %d: pressed? %d", binding.behavior_dev,
|
||||
binding.param1, binding.param2, payload->data.state);
|
||||
struct zmk_behavior_binding_event event = {.position = payload->data.position,
|
||||
.timestamp = k_uptime_get()};
|
||||
@@ -72,7 +72,7 @@ static ssize_t split_svc_run_behavior(struct bt_conn *conn, const struct bt_gatt
|
||||
}
|
||||
|
||||
if (err) {
|
||||
LOG_ERR("Failed to invoke behavior %s: %d", log_strdup(binding.behavior_dev), err);
|
||||
LOG_ERR("Failed to invoke behavior %s: %d", binding.behavior_dev, err);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user