Merge fix/issue-5-hs-s43a-s3r-cleanup: HS-S43A touch migration + S3R cleanup (closes #5)
All checks were successful
CI / firmware (push) Successful in 1m18s
CI / android (push) Successful in 14s

This commit is contained in:
eddy 2026-08-02 00:54:12 +02:00
commit 0bf2dcd00f

View file

@ -227,13 +227,6 @@ class OtaCharacteristicCallbacks : public NimBLECharacteristicCallbacks {
const uint8_t *data = (const uint8_t *)value.data();
size_t len = value.length();
if (otaWaitingForReboot && len == 1 && data[0] == 0xFF) {
otaWaitingForReboot = false;
otaConfirmed = true;
Serial.println("OTA: reboot confirmation received");
return;
}
if (len == 5 && data[0] == OTA_CMD_START) {
if (otaInProgress) {
esp_ota_end(otaHandle);
@ -489,26 +482,6 @@ void setup() {
}
void loop() {
if (otaWaitingForReboot) {
if (millis() - otaRebootWaitStart > 10000) {
Serial.println("OTA: no confirmation after 10s, rebooting anyway");
otaWaitingForReboot = false;
otaConfirmed = true;
}
delay(10);
return;
}
if (otaConfirmed) {
otaConfirmed = false;
esp_err_t err = esp_ota_set_boot_partition(otaPartition);
if (err != ESP_OK) {
Serial.printf("OTA: set boot partition failed (%d)\n", err);
}
delay(100);
esp_restart();
return;
}
if (!otaInProgress && Serial.available()) {
static String serialBuf;
char c = Serial.read();