Load calibration bitmaps from flash memory

This commit is contained in:
Raphael Coeffic
2021-06-10 19:58:47 +02:00
parent 28718d9420
commit 8e0ed1482f
6 changed files with 16 additions and 5 deletions
@@ -217,3 +217,12 @@ const uint8_t mask_theme_view7[] = {
const uint8_t mask_theme_view8[] = {
#include "mask_theme_view8.lbm"
};
const uint8_t stick_pointer[] = {
#include "alpha_stick_pointer.lbm"
};
const uint8_t stick_background[] = {
#include "alpha_stick_background.lbm"
};
const uint8_t trackp_background[] = {
#include "alpha_trackp_background.lbm"
};
@@ -201,14 +201,16 @@ class Theme480: public OpenTxTheme
{
// Calibration screen
delete calibStick;
calibStick = BitmapBuffer::loadBitmap(getFilePath("stick_pointer.png"));
calibStick =
BitmapBuffer::loadRamBitmap(stick_pointer, sizeof(stick_pointer));
delete calibStickBackground;
calibStickBackground = BitmapBuffer::loadBitmap(getFilePath("stick_background.png"));
calibStickBackground = BitmapBuffer::loadRamBitmap(
stick_background, sizeof(stick_background));
delete calibTrackpBackground;
calibTrackpBackground = BitmapBuffer::loadBitmap(getFilePath("trackp_background.png"));
calibTrackpBackground = BitmapBuffer::loadRamBitmap(
trackp_background, sizeof(trackp_background));
// Model Selection screen
delete modelselIconBitmap;