Missed for Previous Commit
This commit is contained in:
+12
-11
@@ -175,8 +175,18 @@ static void handle_ota_payload(const uint8_t *data, size_t len) {
|
||||
return;
|
||||
}
|
||||
|
||||
ota_feed_result_t r =
|
||||
ota_uart_feed(req_ptr->data.bytes, req_ptr->data.size);
|
||||
ota_feed_result_t r = ota_uart_feed_chunk(req_ptr->seq, req_ptr->data.bytes,
|
||||
req_ptr->data.size);
|
||||
if (r == OTA_FEED_SEQ_GAP) {
|
||||
send_ota_failed(16);
|
||||
return;
|
||||
}
|
||||
if (r == OTA_FEED_SEQ_DUP) {
|
||||
if (ota_uart_block_ready_for_reack()) {
|
||||
send_ota_status(OTA_UART_ST_BLOCK_ACK, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (r == OTA_FEED_ERROR) {
|
||||
send_ota_failed( 13);
|
||||
return;
|
||||
@@ -189,15 +199,6 @@ static void handle_ota_payload(const uint8_t *data, size_t len) {
|
||||
led_ring_show_ota_progress(done, total, OTA_LED_UART_R, OTA_LED_UART_G,
|
||||
OTA_LED_UART_B);
|
||||
send_ota_status(OTA_UART_ST_BLOCK_ACK, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (r == OTA_FEED_OK) {
|
||||
uint32_t total = ota_uart_total_size();
|
||||
if (total > 0) {
|
||||
led_ring_show_ota_progress(ota_uart_bytes_received(), total,
|
||||
OTA_LED_UART_R, OTA_LED_UART_G, OTA_LED_UART_B);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,14 @@ esp_err_t esp_now_core_ensure_broadcast_peer(void);
|
||||
|
||||
esp_err_t esp_now_core_send(const uint8_t *dest_mac,
|
||||
const alox_EspNowMessage *msg);
|
||||
/** Like send but does not wait for esp_now send-done (lower latency). */
|
||||
esp_err_t esp_now_core_send_fast(const uint8_t *dest_mac,
|
||||
const alox_EspNowMessage *msg);
|
||||
esp_err_t esp_now_core_send_wait(const uint8_t *dest_mac,
|
||||
const alox_EspNowMessage *msg);
|
||||
/** OTA payloads: wait for send-done with extra NO_MEM backoff (queue drain). */
|
||||
esp_err_t esp_now_core_send_reliable(const uint8_t *dest_mac,
|
||||
const alox_EspNowMessage *msg);
|
||||
|
||||
esp_err_t esp_now_core_init_radio(uint8_t channel);
|
||||
void esp_now_core_init_send_done(void);
|
||||
|
||||
Reference in New Issue
Block a user