#include "ota_session.h" #include "ota_espnow.h" #include "ota_uart.h" #include "uart_messages.pb.h" bool ota_session_busy(void) { return ota_uart_is_active() || ota_espnow_distribution_active(); } bool ota_session_uart_cmd_allowed(uint16_t msg_id) { if (!ota_session_busy()) { return true; } switch ((alox_MessageType)msg_id) { case alox_MessageType_OTA_START: case alox_MessageType_OTA_PAYLOAD: case alox_MessageType_OTA_END: case alox_MessageType_OTA_START_ESPNOW: case alox_MessageType_OTA_SLAVE_PROGRESS: return true; default: return false; } }