Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save LuczaGyuri/c60b1742a66cb7e27a02f9d803c346bf to your computer and use it in GitHub Desktop.
Save LuczaGyuri/c60b1742a66cb7e27a02f9d803c346bf to your computer and use it in GitHub Desktop.
eRadio in hungarian language
#ifndef FONT5X7_H
#define FONT5X7_H
#ifdef __AVR__
#include <avr/io.h>
#include <avr/pgmspace.h>
#elif defined(ESP8266)
#include <pgmspace.h>
#else
#define PROGMEM
#endif
// Standard ASCII + hungarian 5x7 font by Lucza Gyuri
static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, // \000
0x20, 0x20, 0x00, 0x10, 0x10, // \001 rssi 00__
0x08, 0x08, 0x00, 0x04, 0x04, // \002 rssi __00
0x60, 0x60, 0x00, 0x10, 0x10, // \003 rssi 10__
0x60, 0x60, 0x00, 0x70, 0x70, // \004 rssi 11__
0x78, 0x78, 0x00, 0x04, 0x04, // \005 rssi __10
0x78, 0x78, 0x00, 0x7C, 0x7C, // \006 rssi __11
0x00, 0x1C, 0x1C, 0x1C, 0x00, // \007 weather div
0x7E, 0x00, 0x7E, 0x12, 0x1E, // \010 ip (L.Gy.: Az "iP"-t átírtam "IP"-re... :)
0x06, 0x09, 0x09, 0x06, 0x00, // \011 degree
0x7F, 0x63, 0x6B, 0x63, 0x7F,
0x30, 0x48, 0x4D, 0x33, 0x07,
0x06, 0x29, 0x79, 0x29, 0x06,
0x20, 0x50, 0x3F, 0x02, 0x0C,
0x60, 0x7F, 0x05, 0x35, 0x3F, // \016 note
0x2A, 0x1C, 0x77, 0x1C, 0x2A,
0x00, 0x7F, 0x3E, 0x1C, 0x08, // \020 next/play
0x08, 0x1C, 0x3E, 0x7F, 0x00, // \021 prev
0x14, 0x22, 0x7F, 0x22, 0x14,
0x00, 0x00, 0x18, 0x3C, 0x7E, // \023 speaker
0x18, 0x00, 0x00, 0x00, 0x00, // \024 25%
0x18, 0x42, 0x3C, 0x00, 0x00, // \025 50%
0x18, 0x42, 0x3C, 0x42, 0x3C, // \026 100%
0x54, 0x62, 0x7F, 0x62, 0x54,
0x08, 0x04, 0x7E, 0x04, 0x08,
0x08, 0x10, 0x3F, 0x10, 0x08,
0x08, 0x08, 0x2A, 0x1C, 0x08,
0x08, 0x1C, 0x2A, 0x08, 0x08,
0x7F, 0x7F, 0x00, 0x7F, 0x7F, // \034 pause
0x55, 0x00, 0x55, 0x55, 0x55, // \035 list
0x30, 0x3C, 0x3F, 0x3C, 0x30,
0x06, 0x1E, 0x7E, 0x1E, 0x06,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x5F, 0x00, 0x00,
0x00, 0x07, 0x00, 0x07, 0x00,
0x14, 0x7F, 0x14, 0x7F, 0x14,
0x24, 0x2A, 0x7F, 0x2A, 0x12,
0x23, 0x13, 0x08, 0x64, 0x62,
0x36, 0x49, 0x56, 0x20, 0x50,
0x00, 0x00, 0x07, 0x00, 0x00,
0x00, 0x1C, 0x22, 0x41, 0x00,
0x00, 0x41, 0x22, 0x1C, 0x00,
0x14, 0x08, 0x3E, 0x08, 0x14,
0x08, 0x08, 0x3E, 0x08, 0x08,
0x00, 0xA0, 0x60, 0x00, 0x00,
0x08, 0x08, 0x08, 0x08, 0x08,
0x00, 0x60, 0x60, 0x00, 0x00,
0x20, 0x10, 0x08, 0x04, 0x02,
0x3E, 0x51, 0x49, 0x45, 0x3E, //0
0x44, 0x42, 0x7F, 0x40, 0x40,
0x42, 0x61, 0x51, 0x49, 0x46,
0x21, 0x41, 0x45, 0x4B, 0x31,
0x18, 0x14, 0x12, 0x7F, 0x10,
0x27, 0x45, 0x45, 0x45, 0x39,
0x3C, 0x4A, 0x49, 0x49, 0x30,
0x01, 0x71, 0x09, 0x05, 0x03,
0x36, 0x49, 0x49, 0x49, 0x36,
0x06, 0x49, 0x49, 0x29, 0x1E,
0x00, 0x6C, 0x6C, 0x00, 0x00,
0x00, 0xAC, 0x6C, 0x00, 0x00,
0x08, 0x14, 0x22, 0x41, 0x00,
0x14, 0x14, 0x14, 0x14, 0x14,
0x00, 0x41, 0x22, 0x14, 0x08,
0x02, 0x01, 0x51, 0x09, 0x06,
0x3E, 0x41, 0x5D, 0x55, 0x5E,
0x7C, 0x12, 0x11, 0x12, 0x7C, //A
0x7F, 0x49, 0x49, 0x49, 0x36,
0x3E, 0x41, 0x41, 0x41, 0x22,
0x7F, 0x41, 0x41, 0x22, 0x1C,
0x7F, 0x49, 0x49, 0x49, 0x41,
0x7F, 0x09, 0x09, 0x09, 0x01,
0x3E, 0x41, 0x49, 0x49, 0x7A,
0x7F, 0x08, 0x08, 0x08, 0x7F,
0x00, 0x41, 0x7F, 0x41, 0x00,
0x20, 0x40, 0x41, 0x3F, 0x01,
0x7F, 0x08, 0x14, 0x22, 0x41,
0x7F, 0x40, 0x40, 0x40, 0x60,
0x7F, 0x02, 0x0C, 0x02, 0x7F,
0x7F, 0x04, 0x08, 0x10, 0x7F,
0x3E, 0x41, 0x41, 0x41, 0x3E,
0x7F, 0x09, 0x09, 0x09, 0x06,
0x3E, 0x41, 0x51, 0x21, 0x5E,
0x7F, 0x09, 0x19, 0x29, 0x46,
0x46, 0x49, 0x49, 0x49, 0x31,
0x03, 0x01, 0x7F, 0x01, 0x03,
0x3F, 0x40, 0x40, 0x40, 0x3F,
0x1F, 0x20, 0x40, 0x20, 0x1F,
0x3F, 0x40, 0x3C, 0x40, 0x3F,
0x63, 0x14, 0x08, 0x14, 0x63,
0x07, 0x08, 0x70, 0x08, 0x07,
0x61, 0x51, 0x49, 0x45, 0x43,
0x00, 0x7F, 0x41, 0x41, 0x00,
0x02, 0x04, 0x08, 0x10, 0x20,
0x00, 0x41, 0x41, 0x7F, 0x00,
0x04, 0x02, 0x01, 0x02, 0x04,
0x40, 0x40, 0x40, 0x40, 0x40,
0x00, 0x01, 0x02, 0x04, 0x00,
0x20, 0x54, 0x54, 0x54, 0x78,
0x7F, 0x48, 0x44, 0x44, 0x38,
0x38, 0x44, 0x44, 0x44, 0x48,
0x38, 0x44, 0x44, 0x48, 0x7F,
0x38, 0x54, 0x54, 0x54, 0x18,
0x08, 0x7E, 0x09, 0x01, 0x02,
0x08, 0x54, 0x54, 0x58, 0x3C,
0x7F, 0x08, 0x04, 0x04, 0x78,
0x00, 0x44, 0x7D, 0x40, 0x00,
0x20, 0x40, 0x44, 0x3D, 0x00,
0x7F, 0x10, 0x10, 0x28, 0x44,
0x00, 0x41, 0x7F, 0x40, 0x00,
0x7C, 0x04, 0x78, 0x04, 0x78,
0x7C, 0x08, 0x04, 0x04, 0x78,
0x38, 0x44, 0x44, 0x44, 0x38,
0x7C, 0x14, 0x14, 0x14, 0x08,
0x08, 0x14, 0x14, 0x0C, 0x7C,
0x7C, 0x08, 0x04, 0x04, 0x08,
0x48, 0x54, 0x54, 0x54, 0x24,
0x04, 0x3F, 0x44, 0x40, 0x20,
0x3C, 0x40, 0x40, 0x20, 0x7C,
0x1C, 0x20, 0x40, 0x20, 0x1C,
0x3C, 0x40, 0x38, 0x40, 0x3C,
0x44, 0x28, 0x10, 0x28, 0x44,
0x0C, 0x50, 0x50, 0x50, 0x3C,
0x44, 0x64, 0x54, 0x4C, 0x44,
0x00, 0x08, 0x36, 0x41, 0x00,
0x00, 0x00, 0x7F, 0x00, 0x00,
0x00, 0x41, 0x36, 0x08, 0x00, //}
0x02, 0x01, 0x02, 0x04, 0x02, //126 ~
0x70, 0x48, 0x44, 0x48, 0x70,
0x1E, 0xA1, 0xA1, 0x61, 0x12, //128 //Kiterjesztett ASCII
0x3A, 0x40, 0x40, 0x20, 0x7A, //129 *ü
0x38, 0x54, 0x56, 0x55, 0x08, //130 *é
0x21, 0x55, 0x55, 0x79, 0x41, //131 â
0x22, 0x54, 0x54, 0x78, 0x42, //132 ä
0x21, 0x55, 0x54, 0x78, 0x40, //133 à
0x20, 0x54, 0x56, 0x79, 0x40, //134 *á
0x0C, 0x1E, 0x52, 0x72, 0x12, //135
0x39, 0x55, 0x55, 0x55, 0x59, //136 ê
0x39, 0x54, 0x54, 0x54, 0x59, //137 ë
0x39, 0x55, 0x54, 0x54, 0x58, //138 è
0x38, 0x42, 0x41, 0x22, 0x79, //139 *ű
0x00, 0x40, 0x7A, 0x41, 0x00, //140 *í
0x00, 0x44, 0x7E, 0x45, 0x00, //141 *Í
0x7D, 0x12, 0x11, 0x12, 0x7D, //142 Ä
0x78, 0x14, 0x16, 0x15, 0x78, //143 *Á
0x7C, 0x54, 0x56, 0x55, 0x44, //144 *É
0x20, 0x54, 0x54, 0x7C, 0x54, //145
0x7C, 0x0A, 0x09, 0x7F, 0x49, //146 Æ
0x30, 0x4A, 0x49, 0x4A, 0x31, //147 *ő
0x3A, 0x44, 0x44, 0x44, 0x3A, //148 *ö
0x38, 0x44, 0x46, 0x45, 0x38, //149 *Ó
0x30, 0x48, 0x4A, 0x49, 0x30, //150 *ó
0x38, 0x40, 0x42, 0x21, 0x78, //151 *ú
0x3C, 0x42, 0x41, 0x42, 0x3D, //152 *Ű
0x3D, 0x42, 0x42, 0x42, 0x3D, //153 *Ö
0x3D, 0x40, 0x40, 0x40, 0x3D, //154 *Ü
0x38, 0x46, 0x45, 0x46, 0x39, //155 *Ő
0x3C, 0x40, 0x42, 0x41, 0x3C, //156 *Ú
0x2B, 0x2F, 0xFC, 0x2F, 0x2B, //157
0xFF, 0x09, 0x29, 0xF6, 0x20, //158
0xC0, 0x88, 0x7E, 0x09, 0x03, //159
0x20, 0x54, 0x54, 0x79, 0x41, //160
0x00, 0x00, 0x44, 0x7D, 0x41, //161
0x30, 0x48, 0x48, 0x4A, 0x32, //162
0x38, 0x40, 0x40, 0x22, 0x7A, //163
0x00, 0x7A, 0x0A, 0x0A, 0x72, //164
0x7D, 0x0D, 0x19, 0x31, 0x7D, //165
0x26, 0x29, 0x29, 0x2F, 0x28, //166
0x26, 0x29, 0x29, 0x29, 0x26, //167
0x30, 0x48, 0x4D, 0x40, 0x20, //168
0x38, 0x08, 0x08, 0x08, 0x08, //169
0x08, 0x08, 0x08, 0x08, 0x38, //170
0x2F, 0x10, 0xC8, 0xAC, 0xBA, //171
0x2F, 0x10, 0x28, 0x34, 0xFA, //172
0x00, 0x00, 0x7B, 0x00, 0x00, //173
0x08, 0x14, 0x2A, 0x14, 0x22, //174
0x22, 0x14, 0x2A, 0x14, 0x08, //175
0x55, 0x00, 0x55, 0x00, 0x55, //176
0xAA, 0x55, 0xAA, 0x55, 0xAA, //177 -mozaik
0xFF, 0x55, 0xFF, 0x55, 0xFF, //178
0x00, 0x00, 0x00, 0xFF, 0x00, //179
0x10, 0x10, 0x10, 0xFF, 0x00, //180
0x14, 0x14, 0x14, 0xFF, 0x00, //181
0x10, 0x10, 0xFF, 0x00, 0xFF, //182
0x10, 0x10, 0xF0, 0x10, 0xF0, //183
0x14, 0x14, 0x14, 0xFC, 0x00, //184
0x14, 0x14, 0xF7, 0x00, 0xFF, //185
0x00, 0x00, 0xFF, 0x00, 0xFF, //186
0x14, 0x14, 0xF4, 0x04, 0xFC, //187
0x14, 0x14, 0x17, 0x10, 0x1F, //188
0x10, 0x10, 0x1F, 0x10, 0x1F, //189
0x14, 0x14, 0x14, 0x1F, 0x00, //190
0x10, 0x10, 0x10, 0xF0, 0x00, //191
0x00, 0x00, 0x00, 0x1F, 0x10, //192
0x10, 0x10, 0x10, 0x1F, 0x10, //193
0x10, 0x10, 0x10, 0xF0, 0x10, //194
0x00, 0x00, 0x00, 0xFF, 0x10, //195
0x10, 0x10, 0x10, 0x10, 0x10, //196
0x10, 0x10, 0x10, 0xFF, 0x10, //197
0x00, 0x00, 0x00, 0xFF, 0x14, //198
0x00, 0x00, 0xFF, 0x00, 0xFF, //199
0x00, 0x00, 0x1F, 0x10, 0x17, //200
0x00, 0x00, 0xFC, 0x04, 0xF4, //201
0x14, 0x14, 0x17, 0x10, 0x17, //202
0x14, 0x14, 0xF4, 0x04, 0xF4, //203
0x00, 0x00, 0xFF, 0x00, 0xF7, //204
0x14, 0x14, 0x14, 0x14, 0x14, //205
0x14, 0x14, 0xF7, 0x00, 0xF7, //206
0x14, 0x14, 0x14, 0x17, 0x14, //207
0x10, 0x10, 0x1F, 0x10, 0x1F, //208
0x14, 0x14, 0x14, 0xF4, 0x14, //209
0x10, 0x10, 0xF0, 0x10, 0xF0, //210
0x00, 0x00, 0x1F, 0x10, 0x1F, //211
0x00, 0x00, 0x00, 0x1F, 0x14, //212
0x00, 0x00, 0x00, 0xFC, 0x14, //213
0x00, 0x00, 0xF0, 0x10, 0xF0, //214
0x10, 0x10, 0xFF, 0x10, 0xFF, //215
0x14, 0x14, 0x14, 0xFF, 0x14, //216
0x10, 0x10, 0x10, 0x1F, 0x00, //217
0x00, 0x00, 0x00, 0xF0, 0x10, //218
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, //219
0xF0, 0xF0, 0xF0, 0xF0, 0xF0, //220
0xFF, 0xFF, 0xFF, 0x00, 0x00, //221
0x00, 0x00, 0x00, 0xFF, 0xFF, //222
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, //223
0x38, 0x44, 0x44, 0x38, 0x44, //224
0xFC, 0x4A, 0x4A, 0x4A, 0x34, //225
0x7E, 0x02, 0x02, 0x06, 0x06, //226
0x02, 0x7E, 0x02, 0x7E, 0x02, //227
0x63, 0x55, 0x49, 0x41, 0x63, //228
0x38, 0x44, 0x44, 0x3C, 0x04, //229
0x40, 0x7E, 0x20, 0x1E, 0x20, //230
0x06, 0x02, 0x7E, 0x02, 0x02, //231
0x99, 0xA5, 0xE7, 0xA5, 0x99, //232
0x1C, 0x2A, 0x49, 0x2A, 0x1C, //233
0x4C, 0x72, 0x01, 0x72, 0x4C, //234
0x30, 0x4A, 0x4D, 0x4D, 0x30, //235
0x30, 0x48, 0x78, 0x48, 0x30, //236
0xBC, 0x62, 0x5A, 0x46, 0x3D, //237
0x3E, 0x49, 0x49, 0x49, 0x00, //238
0x7E, 0x01, 0x01, 0x01, 0x7E, //239
0x2A, 0x2A, 0x2A, 0x2A, 0x2A, //240
0x44, 0x44, 0x5F, 0x44, 0x44, //241
0x40, 0x51, 0x4A, 0x44, 0x40, //242
0x40, 0x44, 0x4A, 0x51, 0x40, //243
0x00, 0x00, 0xFF, 0x01, 0x03, //244
0xE0, 0x80, 0xFF, 0x00, 0x00, //245
0x08, 0x08, 0x6B, 0x6B, 0x08, //246
0x36, 0x12, 0x36, 0x24, 0x36, //247
0x06, 0x0F, 0x09, 0x0F, 0x06, //248
0x00, 0x00, 0x18, 0x18, 0x00, //249
0x00, 0x00, 0x10, 0x10, 0x00, //250
0x30, 0x40, 0xFF, 0x01, 0x01, //251
0x00, 0x1F, 0x01, 0x01, 0x1E, //252
0x00, 0x19, 0x1D, 0x17, 0x12, //253
0x00, 0x3C, 0x3C, 0x3C, 0x3C, //254
0x00, 0x00, 0x00, 0x00, 0x00 //255
};
static inline void avoid_unused_const_variable_compiler_warning(void) {
(void)font;
}
#endif // FONT5X7_H
#ifndef dsp_full_loc
#define dsp_full_loc
#include <pgmspace.h>
/*************************************************************************************
HOWTO:
Copy this file to yoRadio/locale/displayL10n_custom.h
and modify it
*************************************************************************************/
const char mon[] PROGMEM = "hé";
const char tue[] PROGMEM = "ke";
const char wed[] PROGMEM = "sz";
const char thu[] PROGMEM = "cs";
const char fri[] PROGMEM = "pé";
const char sat[] PROGMEM = "SZ";
const char sun[] PROGMEM = "VA";
const char monf[] PROGMEM = "hétfő";
const char tuef[] PROGMEM = "kedd";
const char wedf[] PROGMEM = "szerda";
const char thuf[] PROGMEM = "csütörtök";
const char frif[] PROGMEM = "péntek";
const char satf[] PROGMEM = "szombat";
const char sunf[] PROGMEM = "vasárnap";
const char jan[] PROGMEM = "január";
const char feb[] PROGMEM = "február";
const char mar[] PROGMEM = "március";
const char apr[] PROGMEM = "április";
const char may[] PROGMEM = "május";
const char jun[] PROGMEM = "június";
const char jul[] PROGMEM = "július";
const char aug[] PROGMEM = "augusztus";
const char sep[] PROGMEM = "szeptember";
const char oct[] PROGMEM = "október";
const char nov[] PROGMEM = "november";
const char dec[] PROGMEM = "december";
const char wn_N[] PROGMEM = "észak";
const char wn_NNE[] PROGMEM = "észak-északkelet";
const char wn_NE[] PROGMEM = "északkelet";
const char wn_ENE[] PROGMEM = "kelet-északkelet";
const char wn_E[] PROGMEM = "kelet";
const char wn_ESE[] PROGMEM = "kelet-délkelet";
const char wn_SE[] PROGMEM = "délkelet";
const char wn_SSE[] PROGMEM = "délkelet-dél";
const char wn_S[] PROGMEM = "dél";
const char wn_SSW[] PROGMEM = "dél-délnyugat";
const char wn_SW[] PROGMEM = "délnyugat";
const char wn_WSW[] PROGMEM = "nyugat-délnyugat";
const char wn_W[] PROGMEM = "nyugat";
const char wn_WNW[] PROGMEM = "nyugat-északnyugat";
const char wn_NW[] PROGMEM = "északnyugat";
const char wn_NNW[] PROGMEM = "északnyugat-nyugat";
const char* const dow[] PROGMEM = { sun, mon, tue, wed, thu, fri, sat };
const char* const dowf[] PROGMEM = { sunf, monf, tuef, wedf, thuf, frif, satf };
const char* const mnths[] PROGMEM = { jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec };
const char* const wind[] PROGMEM = { wn_N, wn_NNE, wn_NE, wn_ENE, wn_E, wn_ESE, wn_SE, wn_SSE, wn_S, wn_SSW, wn_SW, wn_WSW, wn_W, wn_WNW, wn_NW, wn_NNW, wn_N };
const char const_PlReady[] PROGMEM = "[kész]";
const char const_PlStopped[] PROGMEM = "[stop]";
const char const_PlConnect[] PROGMEM = "[csatlakozás]";
const char const_DlgVolume[] PROGMEM = "Hangerő";
const char const_DlgLost[] PROGMEM = "* LESZAKADT *";
const char const_DlgUpdate[] PROGMEM = "* FRISSÍTES *";
const char const_DlgNextion[] PROGMEM = "* NEXTION *";
const char const_getWeather[] PROGMEM = "";
const char const_waitForSD[] PROGMEM = "INDEX SD";
const char apNameTxt[] PROGMEM = "WiFi AP";
const char apPassTxt[] PROGMEM = "Jelszó";
const char bootstrFmt[] PROGMEM = "Csatlakozás: %s";
const char apSettFmt[] PROGMEM = "A rádió elérhetősége: HTTP://%s/";
#if EXT_WEATHER
const char weatherFmt[] PROGMEM = "%s, %.1f\011C \007 hőérzet: %.1f\011C \007 légnyomás: %d mmHg \007 páratartalom: %s%% \007 szélsebesség: %.1f m/s [%s]";
#else
const char weatherFmt[] PROGMEM = "%s, %.1f\011C \007 légnyomás: %d mmHg \007 páratartalom: %s%%";
#endif
const char weatherUnits[] PROGMEM = "metric"; /* standard, metric, imperial */
const char weatherLang[] PROGMEM = "hu"; /* https://openweathermap.org/current#multi */
#endif
// A nyelvet oroszra kell állítani, mert abban van UTF-8 támogatás!
#define L10N_LANGUAGE RU /* Language (EN, RU). More info in yoRadio/locale/displayL10n_(en|ru).h */
// Ezeket értelemszerűen a saját kijelződhöz tartozó fájlban kell módosítanod!
// Az alábbi hét sorban az uppercase értékekkel lehet beállítani, hogy hol szeretnéd a nagybetűsítést engedélyezni:
// false = nem nagybetűsíti a szöveget
// true = mindenből nagybetűt csinál
// Ezzel a módosítással mindenhol engedélyeztem a kisbetűk megjelenítését is, de a hónap (dátum) uppercase valahol máshol van...
/* SROLLS */ /* {{ left, top, fontsize, align }, buffsize, uppercase, width, scrolldelay, scrolldelta, scrolltime } */
const ScrollConfig metaConf PROGMEM = {{ TFT_FRAMEWDT, TFT_FRAMEWDT, 3, WA_LEFT }, 140, false, MAX_WIDTH, 5000, 5, 30 };
const ScrollConfig title1Conf PROGMEM = {{ TFT_FRAMEWDT, 50, 2, WA_LEFT }, 140, false, MAX_WIDTH-TITLE_FIX, 5000, 4, 30 };
const ScrollConfig title2Conf PROGMEM = {{ TFT_FRAMEWDT, 70, 2, WA_LEFT }, 140, false, MAX_WIDTH-TITLE_FIX, 5000, 4, 30 };
const ScrollConfig playlistConf PROGMEM = {{ TFT_FRAMEWDT, 112, 2, WA_LEFT }, 140, false, MAX_WIDTH, 1000, 4, 30 };
const ScrollConfig apTitleConf PROGMEM = {{ TFT_FRAMEWDT, TFT_FRAMEWDT, 3, WA_CENTER }, 140, false, MAX_WIDTH, 0, 4, 20 };
const ScrollConfig apSettConf PROGMEM = {{ TFT_FRAMEWDT, 240-TFT_FRAMEWDT-16, 2, WA_LEFT }, 140, false, MAX_WIDTH, 0, 4, 30 };
const ScrollConfig weatherConf PROGMEM = {{ 8, 87, 2, WA_LEFT }, 140, false, MAX_WIDTH, 0, 4, 30 };
// change date format: "1 MÁRCIUS 2024" > "2024. március 1."
// find it in your own display file / ezt keresd meg a saját display fájlodban:
sprintf(_buffordate, "%2d %s %d", network.timeinfo.tm_mday,mnths[network.timeinfo.tm_mon], network.timeinfo.tm_year+1900);
strlcpy(_dateBuf, utf8Rus(_buffordate, true), sizeof(_dateBuf));
// then replace it / aztán cseréld ki erre:
sprintf(_buffordate, "%d. %s %2d.", network.timeinfo.tm_year+1900, mnths[network.timeinfo.tm_mon], network.timeinfo.tm_mday);
strlcpy(_dateBuf, utf8Rus(_buffordate, false), sizeof(_dateBuf)); // false = hónap neve kisbetűvel, true = nagybetűvel
#ifndef utf8RusGFX_h
#define utf8RusGFX_h
// Hungarian chars: áíűőüöúóé ÁÍŰŐÜÖÚÓÉ
char* DspCore::utf8Rus(const char* str, bool uppercase) {
int index = 0;
static char strn[BUFLEN];
strlcpy(strn, str, BUFLEN);
if (uppercase) { // Umschalten Groß- Kleinschreibung
for (char *iter = strn; *iter != '\0'; ++iter)
*iter = toupper(*iter);
}
if(L10N_LANGUAGE==EN) return strn;
while (strn[index])
{
if (strn[index] == 0xC3) // Amelyik UTF-8 karakterek első bájtja C3, azokat mind ebbe a csoportba tedd!
{
switch (strn[index + 1]) {
case 0xA1: {
if (!uppercase){
strn[index] = 0x86;} // *á
else {
strn[index] = 0x8F;} // *Á
break;
}
case 0x81: {
strn[index] = 0x8F; // *Á
break;
}
case 0xAD: {
if (!uppercase){
strn[index] = 0x8C;} // *í
else {
strn[index] = 0x8D;} // *Í
break;
}
case 0x8D: {
strn[index] = 0x8D; // *Í
break;
}
case 0xBC: {
if (!uppercase){
strn[index] = 0x81;} // *ü
else {
strn[index] = 0x9A;} // *Ü
break;
}
case 0x9C: {
strn[index] = 0x9A; // *Ü
break;
}
case 0xB6: {
if (!uppercase){
strn[index] = 0x94;} // *ö
else {
strn[index] = 0x99;} // *Ö
break;
}
case 0x96: {
strn[index] = 0x99; // *Ö
break;
}
case 0xBA: {
if (!uppercase){
strn[index] = 0x97;} // *ú
else {
strn[index] = 0x9C;} // *Ú
break;
}
case 0x9A: {
strn[index] = 0x9C; // *Ú
break;
}
case 0xB3: {
if (!uppercase){
strn[index] = 0x96;} // *ó
else {
strn[index] = 0x95;} // *Ó
break;
}
case 0x93: {
strn[index] = 0x95; // *Ó
break;
}
case 0xA9: {
if (!uppercase){
strn[index] = 0x82;} // *é
else {
strn[index] = 0x90;} // *É
break;
}
case 0x89: {
strn[index] = 0x90; // *É
break;
}
}
int sind = index + 2;
while (strn[sind]) {
strn[sind - 1] = strn[sind];
sind++;
}
strn[sind - 1] = 0;
}
if (strn[index] == 0xC5) // Amelyik UTF-8 karakterek első bájtja C5, azokat mind ebbe a csoportba tedd!
{
switch (strn[index + 1]) {
case 0xB1: {
if (!uppercase){
strn[index] = 0x8B;} // *ű
else {
strn[index] = 0x98;} // *Ű
break;
}
case 0xB0 : {
strn[index] = 0x98; // *Ű
break;
}
case 0x91: {
if (!uppercase){
strn[index] = 0x93;} // *ő
else {
strn[index] = 0x9B;} // *Ő
break;
}
case 0x90: {
strn[index] = 0x9B; // *Ő
break;
}
}
int sind = index + 2;
while (strn[sind]) {
strn[sind - 1] = strn[sind];
sind++;
}
strn[sind - 1] = 0;
}
// ab hier deine Anpassung einfühgen
index++;
}
return strn;
}
#endif