LTS: firmware matcher needs to learn to migrate

#5015

only rename "I suggest proteus_f7 is "bundle target"
This commit is contained in:
rusefi 2023-01-30 08:21:23 -05:00
parent 648c5326d8
commit 1d10a3bd69
4 changed files with 12 additions and 12 deletions

View File

@ -35,15 +35,15 @@ public class DfuHelper {
String bundleName = BundleUtil.readBundleFullName(); String bundleName = BundleUtil.readBundleFullName();
if (bundleName != null && s != null) { if (bundleName != null && s != null) {
String signatureWithPrefix; String signatureWithPrefix;
if ("all".equals(s.getBundle())) { if ("all".equals(s.getBundleTarget())) {
signatureWithPrefix = PREFIX; signatureWithPrefix = PREFIX;
} else { } else {
signatureWithPrefix = PREFIX + "_" + s.getBundle(); signatureWithPrefix = PREFIX + "_" + s.getBundleTarget();
} }
// hack: QC firmware self-identifies as "normal" not QC firmware :( // hack: QC firmware self-identifies as "normal" not QC firmware :(
if (!bundleName.equalsIgnoreCase(signatureWithPrefix) && !bundleName.contains("_QC_")) { if (!bundleName.equalsIgnoreCase(signatureWithPrefix) && !bundleName.contains("_QC_")) {
String message = String.format("You have \"%s\" controller does not look right to program it with \"%s\"", s.getBundle(), bundleName); String message = String.format("You have \"%s\" controller does not look right to program it with \"%s\"", s.getBundleTarget(), bundleName);
log.info(message); log.info(message);
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {

View File

@ -12,6 +12,6 @@ public class SignatureHelperTest {
RusEfiSignature s = SignatureHelper.parse("rusEFI master.2021.09.22.all.3378169541"); RusEfiSignature s = SignatureHelper.parse("rusEFI master.2021.09.22.all.3378169541");
assertEquals("master", s.getBranch()); assertEquals("master", s.getBranch());
assertEquals("all", s.getBundle()); assertEquals("all", s.getBundleTarget());
} }
} }

View File

@ -5,15 +5,15 @@ public class RusEfiSignature {
private final String year; private final String year;
private final String month; private final String month;
private final String day; private final String day;
private final String bundle; private final String bundleTarget;
private final String hash; private final String hash;
public RusEfiSignature(String branch, String year, String month, String day, String bundle, String hash) { public RusEfiSignature(String branch, String year, String month, String day, String bundleTarget, String hash) {
this.branch = branch; this.branch = branch;
this.year = year; this.year = year;
this.month = month; this.month = month;
this.day = day; this.day = day;
this.bundle = bundle; this.bundleTarget = bundleTarget;
this.hash = hash; this.hash = hash;
} }
@ -33,8 +33,8 @@ public class RusEfiSignature {
return day; return day;
} }
public String getBundle() { public String getBundleTarget() {
return bundle; return bundleTarget;
} }
public String getHash() { public String getHash() {

View File

@ -24,7 +24,7 @@ public class SignatureHelper {
return new Pair("https://rusefi.com/online/ini/rusefi/" + s.getBranch() + SLASH + s.getYear() + SLASH + return new Pair("https://rusefi.com/online/ini/rusefi/" + s.getBranch() + SLASH + s.getYear() + SLASH +
s.getMonth() + SLASH + s.getMonth() + SLASH +
s.getDay() + SLASH + s.getDay() + SLASH +
s.getBundle() + SLASH + s.getBundleTarget() + SLASH +
fileName, fileName); fileName, fileName);
} }
@ -62,9 +62,9 @@ public class SignatureHelper {
String year = elements[1]; String year = elements[1];
String month = elements[2]; String month = elements[2];
String day = elements[3]; String day = elements[3];
String bundle = elements[4]; String bundleTarget = elements[4];
String hash = elements[5]; String hash = elements[5];
return new RusEfiSignature(branch, year, month, day, bundle, hash); return new RusEfiSignature(branch, year, month, day, bundleTarget, hash);
} }
} }