Files
DigiRadio/Software/components/services/ota/include/ota/OtaError.hpp
T
micheleandCursor b0cff8369e Add ESP32 OTA firmware update with rollback confirmation.
Stream application binaries to the inactive OTA slot via POST /api/system/ota,
validate the esp_app_desc project name in core, and cancel rollback after a
healthy network boot through OtaService::confirmBoot().

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 09:41:29 +02:00

52 lines
1.0 KiB
C++

/**
* @file OtaError.hpp
* @brief Failure causes for ESP32 OTA streaming updates.
*
* DigiRadio firmware — https://github.com/manvalan/DigiRadio
*
* Copyright 2026 Michele Bigi
* SPDX-License-Identifier: Apache-2.0
*
* @author Michele Bigi
* @date 2026-07-07
*/
#pragma once
namespace ota {
/**
* @brief OtaError — OTA session and flash write failures.
*
* @dname OtaError
* @return n/a (type)
* @pubstate n/a
*
* @author Michele Bigi
* @date 2026-07-07
*/
enum class OtaError {
SessionActive,
NoUpdatePartition,
BeginFailed,
WriteFailed,
EndFailed,
ImageTooLarge,
SetBootFailed,
ConfirmFailed,
};
/**
* @brief otaErrorToken — stable API/JSON error string.
*
* @dname otaErrorToken
* @param error OTA failure from the service layer.
* @return Short token without secrets or image bytes.
* @pubstate none
*
* @author Michele Bigi
* @date 2026-07-07
*/
[[nodiscard]] const char* otaErrorToken(OtaError error) noexcept;
} // namespace ota