mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 00:05:22 +03:00
improve the way boot logo source image errors are handled to address issue #1077
This commit is contained in:
parent
192e886f30
commit
8322e86b57
3 changed files with 11 additions and 4 deletions
|
@ -80,7 +80,13 @@ LogoManager.init = function (font, logoStartIndex) {
|
|||
var rgbPixel = ctx.getImageData(x, y, 1, 1).data.slice(0, 3),
|
||||
colorKey = rgbPixel.join("-");
|
||||
if (!this.constants.MCM_COLORMAP[colorKey]) {
|
||||
GUI.log(i18n.getMessage("osdSetupCustomLogoColorMapError"));
|
||||
GUI.log(i18n.getMessage("osdSetupCustomLogoColorMapError", {
|
||||
valueR: rgbPixel[0],
|
||||
valueG: rgbPixel[1],
|
||||
valueB: rgbPixel[2],
|
||||
posX: x,
|
||||
posY: y,
|
||||
}));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -162,7 +168,7 @@ LogoManager.openImage = function () {
|
|||
this.showConstraintSatisfied(constraint);
|
||||
} else {
|
||||
this.showConstraintNotSatisfied(constraint);
|
||||
reject();
|
||||
reject("Boot logo image constraint violation");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue