1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 00:35:26 +03:00

Merge pull request #2332 from haslinghuis/fix_osd_preview

Fix drawStickOverlayPreview in OSD
This commit is contained in:
Michael Keller 2020-12-13 10:11:57 +01:00 committed by GitHub
commit 8b006c48db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,12 +81,6 @@ SYM.loadSymbols = function() {
}
};
const STICK_OVERLAY_SPRITE = [
SYM.STICK_OVERLAY_SPRITE_HIGH,
SYM.STICK_OVERLAY_SPRITE_MID,
SYM.STICK_OVERLAY_SPRITE_LOW,
];
FONT.initData = function() {
if (FONT.data) {
return;
@ -371,6 +365,12 @@ OSD.drawStickOverlayPreview = function() {
return Math.floor(Math.random() * Math.floor(count));
}
const STICK_OVERLAY_SPRITE = [
SYM.STICK_OVERLAY_SPRITE_HIGH,
SYM.STICK_OVERLAY_SPRITE_MID,
SYM.STICK_OVERLAY_SPRITE_LOW,
];
const OVERLAY_WIDTH = 7;
const OVERLAY_HEIGHT = 5;