Skip to content

Progress bar not updating during code upload #306

Open
@stweedo

Description

@stweedo

The progress bar shows but never fills when uploading code. The issue is in serial.js where the uart.writeProgress is defined as an empty function:

  var uart = {
    writeProgress : function() {} // Dummy implementation - actual progress tracked in writeSerialWorker
  };

Fix:

  var lastSent = 0;
  var uart = {
    writeProgress : (sent) => {
      if (!sent) lastSent = 0;
      else if (sent > lastSent) {
        Espruino.Core.Status.incrementProgress(sent - lastSent);
        lastSent = sent;
      }
    }
  };

This tracks the cumulative bytes sent and updates the progress bar with incremental progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions