show flashing progress bar

This commit is contained in:
liamcottle
2024-07-14 19:54:34 +12:00
parent b7d1146960
commit a56842685d
2 changed files with 16 additions and 21 deletions

View File

@@ -175,18 +175,16 @@ class Nrf52DfuFlasher {
console.log("Sending DFU init packet");
await this.sendInitPacket(init_packet);
console.log("Sending firmware file")
console.log("Sending firmware");
await this.sendFirmware(firmware, progressCallback);
// close port
console.log("Closing Port");
console.log("Closing serial port");
await this.serialPort.close();
// todo
// sleep(self.dfu_transport.get_activate_wait_time())
console.log("Done");
}
/**
@@ -399,11 +397,6 @@ class Nrf52DfuFlasher {
...this.int32ToBytes(this.DFU_STOP_DATA_PACKET),
]));
// send final progress
if(progressCallback){
progressCallback(100);
}
}
/**