Always run subsequent upload in fast_mode after bootloader upgrade
This commit is contained in:
parent
ed9e766423
commit
5b9a07c92f
|
@ -405,6 +405,7 @@ void do_upload(char *filename, bool fast_mode){
|
|||
|
||||
void fix_and_upload(char *filename) {
|
||||
char *version = get_version();
|
||||
bool has_new_bootloader = false;
|
||||
if (version && !strcmp(version, "0.3.2.0") ) {
|
||||
// Upload bootloader update payload
|
||||
printf("Bootloader update required, uploading...\n");
|
||||
|
@ -424,11 +425,12 @@ void fix_and_upload(char *filename) {
|
|||
printf("Reseting into new bootloader\n");
|
||||
gpio_ble_req_bootloader();
|
||||
usleep(50000);
|
||||
has_new_bootloader = true;
|
||||
}
|
||||
|
||||
// Do the update
|
||||
printf("Writing %s into slot 1\n", filename);
|
||||
do_upload(filename, image_get_fast_mode());
|
||||
do_upload(filename, image_get_fast_mode() || has_new_bootloader); // If we just updated the BL, it supports fast
|
||||
}
|
||||
|
||||
void image_main(int fd, int argc, char **argv){
|
||||
|
|
Loading…
Reference in New Issue