If offset==-1, then the transmission is complete and we set progress bar to 100%.
@@ -136,18 +136,19 @@ void lpc_write_ram(struct lpc_device *dev, const struct sprog_data *d, unsigned
if(j==2)
offset = -1;
} else {
- sprog_error("Received '%s'\n", reply_buf);
offset = last_offset;
i = last_i;
}
} else
break;
-
- sprog_progress((offset*100)/d->size);
+ if(offset!=-1)
+ sprog_progress((offset*100)/d->size);
+ else
+ sprog_progress(100);
- if(offset!=d->size)
sprog_error("Error while writing to RAM\n");