Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Upload progress wrongly shown on serial monitor #256

Open
Labels
bugSomething isn't working
@dariods8474

Description

@dariods8474

ElegantOTA shows the update progress in the webpage. I wanted it to also show on the device GLCD screen. So I used this callback function to get info

void onOTAProgress(size_t current, size_t final) { // Log every 1 second if (millis() - ota_progress_millis > 1000) { ota_progress_millis = millis(); Serial.printf("OTA Progress Current: %u bytes, Final: %u bytes\n", current, final); } }

When I use ElegantOTA demo.ino, this is what is seen on the serial monitor

OTA update started! Update Received: firmware.bin OTA Progress Current: 1436 bytes, Final: 0 bytes OTA Progress Current: 172320 bytes, Final: 170884 bytes OTA Progress Current: 348948 bytes, Final: 347512 bytes OTA Progress Current: 528448 bytes, Final: 527012 bytes OTA Progress Current: 709384 bytes, Final: 707948 bytes OTA Progress Current: 868780 bytes, Final: 867344 bytes OTA update finished successfully!

The value of variable final being zero throws error restarting the device and the current value being greater than final value does not give real time firmware update progress.
If I used the AsyncDemo.ino the serial monitor shows

OTA update started! Update Received: firmware.bin OTA Progress Current: 1436 bytes, Final: 868780 bytes OTA Progress Current: 172320 bytes, Final: 868780 bytes OTA Progress Current: 348948 bytes, Final: 868780 bytes OTA Progress Current: 528448 bytes, Final: 868780 bytes OTA Progress Current: 709384 bytes, Final: 868780 bytes OTA Progress Current: 867344 bytes, Final: 868780 bytes OTA update finished successfully!

Surprisingly the update progress is shown properly in the webpage for both the example files

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp