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 e44d4c2ae1
commit ba0527a905
4 changed files with 12 additions and 12 deletions

View File

@ -35,15 +35,15 @@ public class DfuHelper {
String bundleName = BundleUtil.readBundleFullName();
if (bundleName != null && s != null) {
String signatureWithPrefix;
if ("all".equals(s.getBundle())) {
if ("all".equals(s.getBundleTarget())) {
signatureWithPrefix = PREFIX;
} else {
signatureWithPrefix = PREFIX + "_" + s.getBundle();
signatureWithPrefix = PREFIX + "_" + s.getBundleTarget();
}
// hack: QC firmware self-identifies as "normal" not QC firmware :(
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);
SwingUtilities.invokeLater(() -> {

View File

@ -12,6 +12,6 @@ public class SignatureHelperTest {
RusEfiSignature s = SignatureHelper.parse("rusEFI master.2021.09.22.all.3378169541");
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 month;
private final String day;
private final String bundle;
private final String bundleTarget;
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.year = year;
this.month = month;
this.day = day;
this.bundle = bundle;
this.bundleTarget = bundleTarget;
this.hash = hash;
}
@ -33,8 +33,8 @@ public class RusEfiSignature {
return day;
}
public String getBundle() {
return bundle;
public String getBundleTarget() {
return bundleTarget;
}
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 +
s.getMonth() + SLASH +
s.getDay() + SLASH +
s.getBundle() + SLASH +
s.getBundleTarget() + SLASH +
fileName, fileName);
}
@ -62,9 +62,9 @@ public class SignatureHelper {
String year = elements[1];
String month = elements[2];
String day = elements[3];
String bundle = elements[4];
String bundleTarget = elements[4];
String hash = elements[5];
return new RusEfiSignature(branch, year, month, day, bundle, hash);
return new RusEfiSignature(branch, year, month, day, bundleTarget, hash);
}
}