diff --git a/radio/src/bitmaps/horus/CMakeLists.txt b/radio/src/bitmaps/horus/CMakeLists.txt index 5d45db11c..540f6d091 100644 --- a/radio/src/bitmaps/horus/CMakeLists.txt +++ b/radio/src/bitmaps/horus/CMakeLists.txt @@ -7,8 +7,9 @@ add_truetype_font_target(horus xxlsize "DejaVu Sans" 48 False) add_custom_target(ttf_horus_fonts DEPENDS ttf_horus_tinsize ttf_horus_smlsize ttf_horus_stdsize ttf_horus_midsize ttf_horus_dblsize ttf_horus_xxlsize) add_bitmaps_target(horus_bitmaps "${RADIO_SRC_DIRECTORY}/bitmaps/horus/bmp_*.png" 480 5/6/5) +add_bitmaps_target(horus_calibration_bitmaps "${RADIO_SRC_DIRECTORY}/bitmaps/horus/calibration/bmp_*.png" 480 5/6/5) add_bitmaps_target(horus_alpha_bitmaps "${RADIO_SRC_DIRECTORY}/bitmaps/horus/alpha_*.png" 480 5/6/5/8) add_bitmaps_target(horus_masks ${RADIO_SRC_DIRECTORY}/bitmaps/horus/mask_*.png 480 8bits) add_bitmaps_target(horus_slider_masks "${RADIO_SRC_DIRECTORY}/bitmaps/horus/slider/*.png" 480 8bits) add_bitmaps_target(horus_fonts ${RADIO_SRC_DIRECTORY}/fonts/horus/*.png 480 8bits) -add_dependencies(horus_bitmaps horus_alpha_bitmaps horus_masks horus_slider_masks horus_fonts) +add_dependencies(horus_bitmaps horus_calibration_bitmaps horus_alpha_bitmaps horus_masks horus_slider_masks horus_fonts) diff --git a/radio/src/bitmaps/horus/calibration/horus_img.png b/radio/src/bitmaps/horus/calibration/horus_img.png deleted file mode 100644 index a4dd81310..000000000 Binary files a/radio/src/bitmaps/horus/calibration/horus_img.png and /dev/null differ diff --git a/radio/src/bitmaps/horus/calibration/stickbase_bg.img.png b/radio/src/bitmaps/horus/calibration/stickbase_bg.img.png deleted file mode 100644 index 903430723..000000000 Binary files a/radio/src/bitmaps/horus/calibration/stickbase_bg.img.png and /dev/null differ diff --git a/radio/src/bitmaps/horus/slider/bar_left.png b/radio/src/bitmaps/horus/slider/bar_left.png new file mode 100644 index 000000000..fb4589b99 Binary files /dev/null and b/radio/src/bitmaps/horus/slider/bar_left.png differ diff --git a/radio/src/bitmaps/horus/slider/bar_right.png b/radio/src/bitmaps/horus/slider/bar_right.png new file mode 100644 index 000000000..a57626974 Binary files /dev/null and b/radio/src/bitmaps/horus/slider/bar_right.png differ diff --git a/radio/src/bitmaps/horus/slider/point_in.png b/radio/src/bitmaps/horus/slider/point_in.png new file mode 100644 index 000000000..539b5cf8f Binary files /dev/null and b/radio/src/bitmaps/horus/slider/point_in.png differ diff --git a/radio/src/bitmaps/horus/slider/point_mid.png b/radio/src/bitmaps/horus/slider/point_mid.png new file mode 100644 index 000000000..40002c2f8 Binary files /dev/null and b/radio/src/bitmaps/horus/slider/point_mid.png differ diff --git a/radio/src/bitmaps/horus/slider/point_out.png b/radio/src/bitmaps/horus/slider/point_out.png new file mode 100644 index 000000000..2d89c27a2 Binary files /dev/null and b/radio/src/bitmaps/horus/slider/point_out.png differ diff --git a/radio/src/gui/horus/bitmaps.cpp b/radio/src/gui/horus/bitmaps.cpp index c4c75866f..e84ac5cd7 100644 --- a/radio/src/gui/horus/bitmaps.cpp +++ b/radio/src/gui/horus/bitmaps.cpp @@ -228,6 +228,18 @@ const uint8_t LBM_STAR1[] __DMA = { #include "mask_library_star_1.lbm" }; +/* + * Calibration screen + */ + +const uint8_t LBM_HORUS[] __DMA = { +#include "bmp_horus.lbm" +}; + +const uint8_t LBM_STICK_BACKGROUND[] __DMA = { +#include "bmp_stick_background.lbm" +}; + /* * Other */ @@ -284,3 +296,4 @@ const uint8_t LBM_SLIDER_POINT_IN[] __DMA = { #include "point_in.lbm" }; + diff --git a/radio/src/gui/horus/gui.h b/radio/src/gui/horus/gui.h index 3b993d0ca..d7c8f6bc9 100644 --- a/radio/src/gui/horus/gui.h +++ b/radio/src/gui/horus/gui.h @@ -125,6 +125,10 @@ extern const uint8_t LBM_SCORE1[]; extern const uint8_t LBM_STAR0[]; extern const uint8_t LBM_STAR1[]; +// Calibration screen +extern const uint8_t LBM_HORUS[]; +extern const uint8_t LBM_STICK_BACKGROUND[]; + // Other icons extern const uint8_t LBM_SPLASH[]; extern const uint8_t LBM_ASTERISK[]; diff --git a/radio/src/gui/horus/lcd.h b/radio/src/gui/horus/lcd.h index 2de4fb1d9..732eaae78 100644 --- a/radio/src/gui/horus/lcd.h +++ b/radio/src/gui/horus/lcd.h @@ -82,7 +82,7 @@ #define TO5BITS(x) ((x) >> 3) #define TO6BITS(x) ((x) >> 2) #define RGB(r, g, b) ((TO5BITS(r) << 11) + (TO6BITS(g) << 5) + (TO5BITS(b) << 0)) -#define WHITE RGB(0xF0, 0xF0, 0xF0) +#define WHITE RGB(0xFF, 0xFF, 0xFF) #define BLACK RGB(0, 0, 0) #define YELLOW RGB(0xF0, 0xD0, 0x10) #define BLUE RGB(0x30, 0xA0, 0xE0) diff --git a/radio/src/gui/horus/widgets.cpp b/radio/src/gui/horus/widgets.cpp index 41d059f20..823649a3f 100644 --- a/radio/src/gui/horus/widgets.cpp +++ b/radio/src/gui/horus/widgets.cpp @@ -256,19 +256,19 @@ void drawSlider(coord_t x, coord_t y, uint8_t value, uint8_t max, uint8_t attr) const int width = 100; // The bar - lcdDrawBitmapPattern(x, y + 10, LBM_SLIDER_BAR_LEFT, value <= 0 ? LINE_COLOR : TEXT_INVERTED_BGCOLOR); + lcdDrawBitmapPattern(x, y + 8, LBM_SLIDER_BAR_LEFT, value <= 0 ? LINE_COLOR : TEXT_INVERTED_BGCOLOR); int w = value * (width - 8) / max; if (value > 0) - lcdDrawSolidFilledRect(x + 4, y + 10, w, 4, TEXT_INVERTED_BGCOLOR); + lcdDrawSolidFilledRect(x + 4, y + 8, w, 4, TEXT_INVERTED_BGCOLOR); if (value < max) - lcdDrawSolidFilledRect(x + 4 + w, y + 10, width - 8 - w, 4, LINE_COLOR); - lcdDrawBitmapPattern(x + width - 4, y + 10, LBM_SLIDER_BAR_RIGHT, value >= max ? TEXT_INVERTED_BGCOLOR : LINE_COLOR); + lcdDrawSolidFilledRect(x + 4 + w, y + 8, width - 8 - w, 4, LINE_COLOR); + lcdDrawBitmapPattern(x + width - 4, y + 8, LBM_SLIDER_BAR_RIGHT, value >= max ? TEXT_INVERTED_BGCOLOR : LINE_COLOR); // The point - lcdDrawBitmapPattern(x + w - 4, y + 5, LBM_SLIDER_POINT_OUT, TEXT_COLOR); - lcdDrawBitmapPattern(x + w - 4, y + 5, LBM_SLIDER_POINT_MID, TEXT_BGCOLOR); + lcdDrawBitmapPattern(x + w - 4, y + 3, LBM_SLIDER_POINT_OUT, TEXT_COLOR); + lcdDrawBitmapPattern(x + w - 4, y + 3, LBM_SLIDER_POINT_MID, TEXT_BGCOLOR); if (attr && (!(attr & BLINK) || !BLINK_ON_PHASE)) - lcdDrawBitmapPattern(x + w - 4, y + 5, LBM_SLIDER_POINT_IN, TEXT_INVERTED_BGCOLOR); + lcdDrawBitmapPattern(x + w - 4, y + 3, LBM_SLIDER_POINT_IN, TEXT_INVERTED_BGCOLOR); } #if defined(GVARS)