You've already forked TEF6686_ESP32
Merge pull request #116 from ohmytime/Add_Chinese_Support
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
#include "src/WiFiConnect.h"
|
||||
#include "src/WiFiConnectParam.h"
|
||||
#include "src/FONT16.h"
|
||||
#include "src/FONT16_CHS.h"
|
||||
#include "src/FONT28.h"
|
||||
#include "src/FONT28_CHS.h"
|
||||
#include "src/FONT48DEC.h"
|
||||
#include "src/TEF6686.h"
|
||||
#include "src/constants.h"
|
||||
@@ -5927,6 +5929,11 @@ void DefaultSettings() {
|
||||
}
|
||||
|
||||
void tftPrint(int8_t offset, const String & text, int16_t x, int16_t y, int color, int smoothcolor, const uint8_t* font) {
|
||||
if (language == LANGUAGE_CHS) {
|
||||
if (font == FONT16) font = FONT16_CHS;
|
||||
else if (font == FONT28) font = FONT28_CHS;
|
||||
}
|
||||
|
||||
if (currentFont != font || resetFontOnNextCall) {
|
||||
if (currentFont != nullptr) tft.unloadFont();
|
||||
tft.loadFont(font);
|
||||
@@ -5946,6 +5953,11 @@ void tftPrint(int8_t offset, const String & text, int16_t x, int16_t y, int colo
|
||||
}
|
||||
|
||||
void tftReplace(int8_t offset, const String & textold, const String & text, int16_t x, int16_t y, int color, int smoothcolor, const uint8_t* font) {
|
||||
if (language == LANGUAGE_CHS) {
|
||||
if (font == FONT16) font = FONT16_CHS;
|
||||
else if (font == FONT28) font = FONT28_CHS;
|
||||
}
|
||||
|
||||
if (currentFont != font || resetFontOnNextCall) {
|
||||
if (currentFont != nullptr) tft.unloadFont();
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#define BAT_LEVEL_FULL 2270
|
||||
#define BAT_LEVEL_STAGE 4
|
||||
|
||||
#define LANGUAGE_CHS 14
|
||||
|
||||
#define FREQ_MW_STEP_9K 9
|
||||
#define FREQ_MW_STEP_10K 10
|
||||
#define FREQ_SW_STEP_5K 5
|
||||
|
||||
Reference in New Issue
Block a user