Review fixes: Serial ERROR→ESP_LOGE, heartbeat→ESP_LOGD
All checks were successful
CI / firmware (pull_request) Successful in 1m26s
CI / android (pull_request) Successful in 5s

- Replace remaining Serial.println("ERROR:...") with ESP_LOGE in client.cpp
- Add Serial.println("ERROR") for protocol response where needed
- Downgrade heartbeat from ESP_LOGI to ESP_LOGD (not needed in production)
This commit is contained in:
eddy 2026-08-02 20:56:37 +02:00
commit 4aa2a750d9
2 changed files with 8 additions and 5 deletions

View file

@ -290,7 +290,8 @@ void loop() {
ESP_LOGI(TAG, "BLE: initialized after key provisioning");
}
} else {
Serial.println("ERROR: invalid key format");
ESP_LOGE(TAG, "Invalid key format");
Serial.println("ERROR");
}
} else if (serialBuf.startsWith("SET_ID:")) {
String hex = serialBuf.substring(7);
@ -305,7 +306,8 @@ void loop() {
Serial.println("OK");
Serial.println("UUID stored in NVS");
} else {
Serial.println("ERROR: invalid UUID format");
ESP_LOGE(TAG, "Invalid UUID format");
Serial.println("ERROR");
}
} else if (serialBuf.startsWith("SET_SERVER:")) {
String hex = serialBuf.substring(11);
@ -331,7 +333,8 @@ void loop() {
ESP_LOGI(TAG, "BLE: initialized after server provisioning");
}
} else {
Serial.println("ERROR: invalid server UUID format");
ESP_LOGE(TAG, "Invalid server UUID format");
Serial.println("ERROR");
}
}
serialBuf = "";
@ -451,7 +454,7 @@ void loop() {
static uint32_t heartbeat = 0;
if (millis() - heartbeat > 60000) {
ESP_LOGI(TAG, "[heartbeat] t1=%s t2=%s btn=%s r1=%s r2=%s connected=%s",
ESP_LOGD(TAG, "[heartbeat] t1=%s t2=%s btn=%s r1=%s r2=%s connected=%s",
!t1Active ? "YES" : "no",
!t2Active ? "YES" : "no",
btnActive ? "YES" : "no",