mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-17 05:15:20 +03:00
initial work on full erase
This commit is contained in:
parent
12364ec087
commit
21b0f447b6
1 changed files with 16 additions and 1 deletions
|
@ -189,7 +189,22 @@ STM32DFU_protocol.prototype.upload_procedure = function(step) {
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
// full erase
|
||||||
|
self.controlTransfer('out', self.request.DNLOAD, 0, 0, 0, [0x41], function() {
|
||||||
|
self.controlTransfer('in', self.request.GETSTATUS, 0, 0, 6, 0, function(data) {
|
||||||
|
if (data[4] == self.state.dfuDNBUSY) { // completely normal
|
||||||
|
// calculate waiting delay from combining data 1 2 3 (3 bytes), wait then continue
|
||||||
|
|
||||||
self.upload_procedure(99);
|
self.upload_procedure(99);
|
||||||
|
} else {
|
||||||
|
// throw some error
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
break;
|
break;
|
||||||
case 99:
|
case 99:
|
||||||
// cleanup
|
// cleanup
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue