디버그 로그 레벨 조정 및 주석 정리
This commit is contained in:
@@ -408,13 +408,13 @@ static void adv_restart_handler(struct k_work *work)
|
|||||||
|
|
||||||
if (advertising_restart_suspended)
|
if (advertising_restart_suspended)
|
||||||
{
|
{
|
||||||
DBG_CORE("[BLE] Advertising restart skipped (suspended)\r\n");
|
DBG_PRINTF("[BLE] Advertising restart skipped (suspended)\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((current_conn != NULL) || ble_connection_st)
|
if ((current_conn != NULL) || ble_connection_st)
|
||||||
{
|
{
|
||||||
DBG_CORE("[BLE] Advertising restart skipped (connected)\r\n");
|
DBG_PRINTF("[BLE] Advertising restart skipped (connected)\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -608,7 +608,7 @@ static void connected(struct bt_conn *conn, uint8_t err)
|
|||||||
(void)bt_conn_disconnect(conn, BT_HCI_ERR_AUTH_FAIL);
|
(void)bt_conn_disconnect(conn, BT_HCI_ERR_AUTH_FAIL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DBG_CORE("[BLE] Security requested level=%u\r\n", BLE_REQUIRED_SECURITY_LEVEL);
|
DBG_PRINTF("[BLE] Security requested level=%u\r\n", BLE_REQUIRED_SECURITY_LEVEL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DBG_CORE("[BLE] Connected\r\n");
|
DBG_CORE("[BLE] Connected\r\n");
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ static int ble_tx_power_write(uint8_t handle_type, uint16_t handle, int8_t dbm,
|
|||||||
{
|
{
|
||||||
current_tx_power_dbm = rp->selected_tx_power;
|
current_tx_power_dbm = rp->selected_tx_power;
|
||||||
}
|
}
|
||||||
DBG_CORE("[BLE] TX power %d dBm reason=%s\r\n", rp->selected_tx_power, reason);
|
DBG_PRINTF("[BLE] TX power %d dBm reason=%s\r\n", rp->selected_tx_power, reason);
|
||||||
}
|
}
|
||||||
|
|
||||||
net_buf_unref(rsp);
|
net_buf_unref(rsp);
|
||||||
@@ -281,11 +281,11 @@ void ble_tx_power_on_connected(struct bt_conn *conn)
|
|||||||
|
|
||||||
if (txp_ret == 0)
|
if (txp_ret == 0)
|
||||||
{
|
{
|
||||||
DBG_CORE("[BLE] TX power (current) = %d dBm\r\n", cur_txp);
|
DBG_PRINTF("[BLE] TX power (current) = %d dBm\r\n", cur_txp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBG_CORE("[BLE] TX power read fail ret=%d\r\n", txp_ret);
|
DBG_ERR("[BLE] TX power read fail ret=%d\r\n", txp_ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BLE_RSSI_MONITOR_ENABLED)
|
if (BLE_RSSI_MONITOR_ENABLED)
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ int cmd_mtb(const uint8_t *data, uint8_t data_len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* 측정 파라미터 읽기
|
||||||
* mcf?: piezo measurement parameter read
|
* mcf?: piezo measurement parameter read
|
||||||
*/
|
*/
|
||||||
int cmd_mcf(const uint8_t *data, uint8_t data_len)
|
int cmd_mcf(const uint8_t *data, uint8_t data_len)
|
||||||
@@ -206,6 +207,7 @@ int cmd_mcf(const uint8_t *data, uint8_t data_len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* 측정 파라미터 쓰기
|
||||||
* mcs?: piezo measurement parameter write
|
* mcs?: piezo measurement parameter write
|
||||||
*/
|
*/
|
||||||
int cmd_mcs(const uint8_t *data, uint8_t data_len)
|
int cmd_mcs(const uint8_t *data, uint8_t data_len)
|
||||||
@@ -293,7 +295,7 @@ int cmd_mpa(const uint8_t *data, uint8_t data_len)
|
|||||||
ARG_UNUSED(data);
|
ARG_UNUSED(data);
|
||||||
ARG_UNUSED(data_len);
|
ARG_UNUSED(data_len);
|
||||||
|
|
||||||
DBG_CORE("[MPA] enter\r\n");
|
DBG_PRINTF("[MPA] enter\r\n");
|
||||||
if (piezo_init() != 0)
|
if (piezo_init() != 0)
|
||||||
{
|
{
|
||||||
DBG_ERR("[MPA] piezo_init failed\r\n");
|
DBG_ERR("[MPA] piezo_init failed\r\n");
|
||||||
@@ -301,11 +303,11 @@ int cmd_mpa(const uint8_t *data, uint8_t data_len)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_CORE("[MPA] piezo_init ok\r\n");
|
DBG_PRINTF("[MPA] piezo_init ok\r\n");
|
||||||
piezo_power_on();
|
piezo_power_on();
|
||||||
DBG_CORE("[MPA] power on\r\n");
|
DBG_PRINTF("[MPA] power on\r\n");
|
||||||
cmd_send_response_u16("rpa:", 1);
|
cmd_send_response_u16("rpa:", 1);
|
||||||
DBG_CORE("[MPA] response sent\r\n");
|
DBG_PRINTF("[MPA] response sent\r\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -318,7 +320,7 @@ int cmd_mpb(const uint8_t *data, uint8_t data_len)
|
|||||||
ARG_UNUSED(data);
|
ARG_UNUSED(data);
|
||||||
ARG_UNUSED(data_len);
|
ARG_UNUSED(data_len);
|
||||||
|
|
||||||
DBG_CORE("[MPB] enter\r\n");
|
DBG_PRINTF("[MPB] enter\r\n");
|
||||||
if (piezo_init() != 0)
|
if (piezo_init() != 0)
|
||||||
{
|
{
|
||||||
DBG_ERR("[MPB] piezo_init failed\r\n");
|
DBG_ERR("[MPB] piezo_init failed\r\n");
|
||||||
@@ -326,11 +328,11 @@ int cmd_mpb(const uint8_t *data, uint8_t data_len)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG_CORE("[MPB] piezo_init ok\r\n");
|
DBG_PRINTF("[MPB] piezo_init ok\r\n");
|
||||||
piezo_power_off();
|
piezo_power_off();
|
||||||
DBG_CORE("[MPB] power off\r\n");
|
DBG_PRINTF("[MPB] power off\r\n");
|
||||||
cmd_send_response_u16("rpb:", 1);
|
cmd_send_response_u16("rpb:", 1);
|
||||||
DBG_CORE("[MPB] response sent\r\n");
|
DBG_PRINTF("[MPB] response sent\r\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -130,7 +130,7 @@ int main(void)
|
|||||||
power_control_reset_state();
|
power_control_reset_state();
|
||||||
|
|
||||||
DBG_CORE("\r\n========================================\r\n");
|
DBG_CORE("\r\n========================================\r\n");
|
||||||
DBG_CORE(" TEST BUILD %s (Zephyr)\r\n", FIRMWARE_VERSION);
|
DBG_CORE(" FIRMWARE %s (Zephyr)\r\n", FIRMWARE_VERSION);
|
||||||
DBG_CORE(" BUILD TAG: %s\r\n", CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION);
|
DBG_CORE(" BUILD TAG: %s\r\n", CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION);
|
||||||
DBG_CORE("========================================\r\n");
|
DBG_CORE("========================================\r\n");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user