1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2026-08-18 18:32:30 +02:00

Activate color map

This commit is contained in:
norbert-walter
2026-03-12 19:32:10 +01:00
parent cd84e427a3
commit 64f9058f85
2 changed files with 22 additions and 16 deletions
+18 -12
View File
@@ -15,7 +15,7 @@ ImageDecoder decoder; // Define image decoder
#ifdef DISPLAY_ST7796 #ifdef DISPLAY_ST7796
// Set to true to render a generated RGB565 color-bar test image. // Set to true to render a generated RGB565 color-bar test image.
static constexpr bool kShowRgb565StripeTestImage = true; static constexpr bool kShowRgb565StripeTestImage = false;
static void drawRgb565Image(int16_t x, int16_t y, const uint16_t *img, int16_t w, int16_t h) { static void drawRgb565Image(int16_t x, int16_t y, const uint16_t *img, int16_t w, int16_t h) {
if (img == nullptr || w <= 0 || h <= 0) { if (img == nullptr || w <= 0 || h <= 0) {
@@ -402,22 +402,28 @@ bool showValues = false; // Show values HDT, SOG, DBT in navigation map
// URL to OBP Maps Converter // URL to OBP Maps Converter
// For more details see: https://github.com/norbert-walter/maps-converter // For more details see: https://github.com/norbert-walter/maps-converter
String url = String("http://") + server + ":" + port + // OBP Server String url = String("http://") + server + ":" + port + // OBP Server
String("/get_image_json?") + // Service: Output B&W picture as JSON (Base64 + gzip) String("/get_image_json?") + // Service: Output B&W picture as JSON (Base64 + gzip)
"zoom=" + zoom + // Default zoom level: 15 // "oformat=4" + // Image output format in JSON: 4=b/w 1-Bit format
"oformat=3" + // Image output format in JSON: 3=RGB565 format
"&zoom=" + zoom + // Default zoom level: 15
"&lat=" + String(latitude, 6) + // Latitude "&lat=" + String(latitude, 6) + // Latitude
"&lon=" + String(longitude, 6) + // Longitude "&lon=" + String(longitude, 6) + // Longitude
"&mrot=" + mapRot + // Rotation angle navigation map in degree "&mrot=" + mapRot + // Rotation angle navigation map in degree
"&mtype=" + mType + // Default Map: Open Street Map "&mtype=" + mType + // Default Map: Open Street Map
"&dtype=" + dType + // Dithering type: Atkinson dithering "&itype=1" + // Image type: 1=Color
"&width=400" + // With navigation map // "&itype=2" + // Image type: 2=Gray scale
"&height=250" + // Height navigation map // "&itype=4" + // Image type: 4=b/w with dithering
"&cutout=0" + // No picture cutouts "&dtype=" + dType + // Dithering type: Atkinson dithering (only activ when itype=4 otherwise inactive)
"&tab=0" + // No tab size "&width=400" + // With navigation map
"&border=2" + // Border line size: 2 pixel "&height=250" + // Height navigation map
"&symbol=2" + // Symbol: Triangle "&cutout=0" + // No picture cutouts (tab, border and alpha are unused when cutout=0)
"&tab=0" + // No tab size (only available when sqare cutouts selected coutout=3...7)
"&border=2" + // Border line size: 2 pixel (only available when sqare cutouts selected)
"&alpha=80" + // Alpha for tabs: 80% visible (only available when sqare cutouts selected)
"&symbol=2" + // Symbol: Triangle
"&srot=" + symbolRot + // Symbol rotation angle "&srot=" + symbolRot + // Symbol rotation angle
"&ssize=15" + // Symbole size: 15 pixel "&ssize=15" + // Symbole size: 15 pixel (center pointer)
"&grid=" + mapGrid // Show grid: On "&grid=" + mapGrid // Show grid: On
; ;
// Draw page // Draw page
+4 -4
View File
@@ -55,12 +55,12 @@ build_flags=
# -D HARDWARE_V20 #OBP60 hardware revision V2.0 # -D HARDWARE_V20 #OBP60 hardware revision V2.0
-D HARDWARE_V21 #OBP60 hardware revision V2.1 -D HARDWARE_V21 #OBP60 hardware revision V2.1
# -D DISPLAY_GDEW042T2 #old E-Ink display from GoodDisplay (Waveshare), R10 0.47 ohm - very good # -D DISPLAY_GDEW042T2 #old E-Ink display from GoodDisplay (Waveshare), R10 0.47 ohm - very good
-D DISPLAY_GDEY042T81 #new E-Ink display from GoodDisplay (Waveshare), R10 2.2 ohm - good (contast lost by shunshine) # -D DISPLAY_GDEY042T81 #new E-Ink display from GoodDisplay (Waveshare), R10 2.2 ohm - good (contast lost by shunshine)
# -D DISPLAY_GYE042A87 #alternativ E-Ink display from Genyo Optical, R10 2.2 ohm - medium # -D DISPLAY_GYE042A87 #alternativ E-Ink display from Genyo Optical, R10 2.2 ohm - medium
# -D DISPLAY_SE0420NQ04 #alternativ E-Ink display from SID Technology, R10 2.2 ohm - bad (burn in effects) # -D DISPLAY_SE0420NQ04 #alternativ E-Ink display from SID Technology, R10 2.2 ohm - bad (burn in effects)
# -D DISPLAY_ST7796 #ST7796 TFT LCD display (480x320 color display) -D DISPLAY_ST7796 #ST7796 TFT LCD display (480x320 color display)
# -D OBP_TFT_ENABLE_SCALING=1 #TFT scaling on/off (1=scale to max Y=320, 0=no scaling) -D OBP_TFT_ENABLE_SCALING=1 #TFT scaling on/off (1=scale to max Y=320, 0=no scaling)
# -D OBP_TFT_SCALE_ANTIALIAS=1 #Antialiasing for TFT scaling (1=on, 0=off) -D OBP_TFT_SCALE_ANTIALIAS=1 #Antialiasing for TFT scaling (1=on, 0=off)
# -D DISPLAY_ZJY400300-042CAAMFGN #alternativ E-Ink display from ZZE Technology, R10 2.2 ohm - very good # -D DISPLAY_ZJY400300-042CAAMFGN #alternativ E-Ink display from ZZE Technology, R10 2.2 ohm - very good
# -D ENABLE_PATCHES #enable patching of gateway code # -D ENABLE_PATCHES #enable patching of gateway code
${env.build_flags} ${env.build_flags}