Skip to content

Commit b99cfda

Browse files
committed
menuFirmware: Add otaDisplayPercentage to force percentage display
1 parent dd55086 commit b99cfda

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Firmware/RTK_Surveyor/menuFirmware.ino

+6-1
Original file line numberDiff line numberDiff line change
@@ -626,10 +626,15 @@ void otaUpdate()
626626

627627
// Called while the OTA Pull update is happening
628628
void otaPullCallback(int bytesWritten, int totalLength)
629+
{
630+
otaDisplayPercentage(bytesWritten, totalLength, false);
631+
}
632+
633+
void otaDisplayPercentage(int bytesWritten, int totalLength, bool alwaysDisplay)
629634
{
630635
static int previousPercent = -1;
631636
int percent = 100 * bytesWritten / totalLength;
632-
if (percent != previousPercent)
637+
if (alwaysDisplay || (percent != previousPercent))
633638
{
634639
// Indicate progress
635640
int barWidthInCharacters = 20; // Width of progress bar, ie [###### % complete

0 commit comments

Comments
 (0)