mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-19 08:52:15 +01:00
Implement Do-Not-Verify-After-Upload preference for Serial Uploads
This commit is contained in:
parent
c99ab12446
commit
4b64ef74ba
@ -70,6 +70,7 @@ public abstract class Uploader implements MessageConsumer {
|
||||
}
|
||||
|
||||
protected final boolean verbose;
|
||||
protected final boolean verifyUpload;
|
||||
|
||||
private String error;
|
||||
protected boolean notFoundError;
|
||||
@ -77,11 +78,13 @@ public abstract class Uploader implements MessageConsumer {
|
||||
|
||||
protected Uploader() {
|
||||
this.verbose = PreferencesData.getBoolean("upload.verbose");
|
||||
this.verifyUpload = PreferencesData.getBoolean("upload.verify");
|
||||
init(false);
|
||||
}
|
||||
|
||||
protected Uploader(boolean nup) {
|
||||
this.verbose = PreferencesData.getBoolean("upload.verbose");
|
||||
this.verifyUpload = PreferencesData.getBoolean("upload.verify");
|
||||
init(nup);
|
||||
}
|
||||
|
||||
|
@ -102,6 +102,11 @@ public class SerialUploader extends Uploader {
|
||||
else
|
||||
prefs.put("upload.verbose", prefs.getOrExcept("upload.params.quiet"));
|
||||
|
||||
if (verifyUpload)
|
||||
prefs.put("upload.verify", prefs.get("upload.params.verify", ""));
|
||||
else
|
||||
prefs.put("upload.verify", prefs.get("upload.params.noverify", ""));
|
||||
|
||||
boolean uploadResult;
|
||||
try {
|
||||
String pattern = prefs.getOrExcept("upload.pattern");
|
||||
@ -192,6 +197,11 @@ public class SerialUploader extends Uploader {
|
||||
prefs.put("upload.verbose", prefs.getOrExcept("upload.params.quiet"));
|
||||
}
|
||||
|
||||
if (verifyUpload)
|
||||
prefs.put("upload.verify", prefs.get("upload.params.verify", ""));
|
||||
else
|
||||
prefs.put("upload.verify", prefs.get("upload.params.noverify", ""));
|
||||
|
||||
boolean uploadResult;
|
||||
try {
|
||||
String pattern = prefs.getOrExcept("upload.pattern");
|
||||
@ -318,6 +328,11 @@ public class SerialUploader extends Uploader {
|
||||
else
|
||||
prefs.put("program.verbose", prefs.getOrExcept("program.params.quiet"));
|
||||
|
||||
if (verifyUpload)
|
||||
prefs.put("program.verify", prefs.get("program.params.verify", ""));
|
||||
else
|
||||
prefs.put("program.verify", prefs.get("program.params.noverify", ""));
|
||||
|
||||
try {
|
||||
// if (prefs.get("program.disable_flushing") == null
|
||||
// || prefs.get("program.disable_flushing").toLowerCase().equals("false"))
|
||||
|
@ -97,11 +97,13 @@ tools.avrdude.config.path={path}/etc/avrdude.conf
|
||||
|
||||
tools.avrdude.upload.params.verbose=-v
|
||||
tools.avrdude.upload.params.quiet=-q -q
|
||||
tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"
|
||||
tools.avrdude.upload.params.noverify=-V
|
||||
tools.avrdude.upload.pattern="{cmd.path}" "-C{config.path}" {upload.verbose} {upload.verify} -p{build.mcu} -c{upload.protocol} -P{serial.port} -b{upload.speed} -D "-Uflash:w:{build.path}/{build.project_name}.hex:i"
|
||||
|
||||
tools.avrdude.program.params.verbose=-v
|
||||
tools.avrdude.program.params.quiet=-q -q
|
||||
tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"
|
||||
tools.avrdude.program.params.noverify=-V
|
||||
tools.avrdude.program.pattern="{cmd.path}" "-C{config.path}" {program.verbose} {program.verify} -p{build.mcu} -c{protocol} {program.extra_params} "-Uflash:w:{build.path}/{build.project_name}.hex:i"
|
||||
|
||||
tools.avrdude.erase.params.verbose=-v
|
||||
tools.avrdude.erase.params.quiet=-q -q
|
||||
|
Loading…
x
Reference in New Issue
Block a user