diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 082576180..e2606a271 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -594,7 +594,7 @@ int http_fn_index(http_request_t* request) { #if defined(PLATFORM_BK7231T) || defined(PLATFORM_BK7231N) if (ota_progress() >= 0) { - hprintf255(request, "
OTA In Progress. Status: %06lXh
", ota_progress()); + hprintf255(request, "
OTA In Progress. Downloaded: %i B Flashed: %06lXh
", ota_total_bytes(), ota_progress()); } #endif diff --git a/src/ota/ota.c b/src/ota/ota.c index 247779627..db0e6e11c 100644 --- a/src/ota/ota.c +++ b/src/ota/ota.c @@ -216,3 +216,8 @@ int ota_progress() return ota_status; } +int ota_total_bytes() +{ + return total_bytes; +} + diff --git a/src/ota/ota.h b/src/ota/ota.h index 8508f4f4f..e923121f5 100644 --- a/src/ota/ota.h +++ b/src/ota/ota.h @@ -25,6 +25,7 @@ void close_ota(); void otarequest(const char *urlin); int ota_progress(); +int ota_total_bytes(); #endif /* __OTA_H__ */