Skip to content

Commit

Permalink
backward compatible fw upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
onlykey committed Jun 7, 2021
1 parent 909f648 commit 0bd08ef
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions app/scripts/onlyKey/OnlyKeyComm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2257,8 +2257,8 @@ function checkForNewFW(checkForNewFW, fwUpdateSupport, version) {
//var latestver = testupgradeurl.split("/tag/v"); //end of redirected URL is the version
var latestver = this.uri.href.split("/tag/v");
latestver = latestver[1];
console.info(version);
console.info(latestver);
console.info("Current verion", version);
console.info("Latest verion", latestver);

var thisver_maj = version.slice(1, 2) * 100;
console.info(thisver_maj);
Expand All @@ -2270,15 +2270,20 @@ function checkForNewFW(checkForNewFW, fwUpdateSupport, version) {
var thisver_pat = version.slice(5, 6);
}
var thisver_mod = version.slice(11, 12);
console.info(thisver_mod);
console.info("Current verion mod", thisver_mod);
var latestversplit = latestver.split(".")
console.info(latestversplit);
var latestver_maj = latestversplit[0] * 100;
console.info(latestver_maj);
console.info("Latest verion maj", latestver_maj);
var latestver_min = latestversplit[1] * 10;
console.info(latestver_min);
var latestver_pat = latestversplit[2].split("-");
console.info("Latest verion min", latestver_min);
if (latestver_maj == 0) {
var latestver_pat = latestver.slice(10, 11);
} else {
var latestver_pat = latestversplit[2].split("-");
}
latestver_pat = latestver_pat[0];
console.info(latestver_pat);
console.info("Latest verion pat", latestver_pat);

if (
thisver_maj + thisver_min + thisver_pat <
Expand Down

0 comments on commit 0bd08ef

Please sign in to comment.