mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-10 21:45:29 +00:00
@ -823,7 +823,7 @@ int http_fn_index(http_request_t* request) {
|
||||
#elif PLATFORM_BK7231N || PLATFORM_BK7231T
|
||||
if (ota_progress() >= 0)
|
||||
{
|
||||
hprintf255(request, "<h5>OTA In Progress. Downloaded: %i B Flashed: %06lXh</h5>", ota_total_bytes(), ota_progress());
|
||||
hprintf255(request, "<h5>OTA In Progress. Downloaded: %i B Flashed: %06lXh</h5>", OTA_GetTotalBytes(), ota_progress());
|
||||
}
|
||||
#endif
|
||||
if (bSafeMode) {
|
||||
|
||||
@ -947,7 +947,7 @@ static int http_rest_post_flash(http_request_t* request, int startaddr, int maxa
|
||||
|
||||
int recvLen = 0;
|
||||
int totalLen = 0;
|
||||
//bk_printf("\ntowrite %d writelen=%d\n", towrite, writelen);
|
||||
//printf("\ntowrite %d writelen=%d\n", towrite, writelen);
|
||||
|
||||
do
|
||||
{
|
||||
@ -962,6 +962,8 @@ static int http_rest_post_flash(http_request_t* request, int startaddr, int maxa
|
||||
if (TRUE == tls_fwup_img_header_check(booter))
|
||||
{
|
||||
totalLen = booter->upd_img_len + sizeof(T_BOOTER);
|
||||
OTA_ResetProgress();
|
||||
OTA_SetTotalBytes(totalLen);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1005,8 +1007,9 @@ static int http_rest_post_flash(http_request_t* request, int startaddr, int maxa
|
||||
break;
|
||||
}
|
||||
else {
|
||||
OTA_IncrementProgress(writelen);
|
||||
recvLen += writelen;
|
||||
bk_printf("Downloaded %d / %d\n", recvLen, totalLen);
|
||||
printf("Downloaded %d / %d\n", recvLen, totalLen);
|
||||
}
|
||||
|
||||
towrite -= writelen;
|
||||
|
||||
Reference in New Issue
Block a user