Lots of minor changes
This commit is contained in:
+2122
-2144
File diff suppressed because it is too large
Load Diff
@@ -9,9 +9,9 @@ public:
|
|||||||
tft->setTextColor(TFT_WHITE, background);
|
tft->setTextColor(TFT_WHITE, background);
|
||||||
tft->setTextDatum(TL_DATUM);
|
tft->setTextDatum(TL_DATUM);
|
||||||
auto data = "[" + String(millis() / 1000.0f) + "] " + text;
|
auto data = "[" + String(millis() / 1000.0f) + "] " + text;
|
||||||
tft->fillRect(0, y, tft->textWidth(data), tft->fontHeight(0), background);
|
tft->fillRect(0, y, tft->textWidth(data), tft->fontHeight(2), background);
|
||||||
tft->drawString(data, 0, y, 0);
|
tft->drawString(data, 0, y, 2);
|
||||||
y += tft->fontHeight(0);
|
y += tft->fontHeight(2);
|
||||||
}
|
}
|
||||||
void reset() {
|
void reset() {
|
||||||
y = 0;
|
y = 0;
|
||||||
|
|||||||
+92
-840
File diff suppressed because it is too large
Load Diff
+5
-38
@@ -241,7 +241,6 @@ static const uint16_t default_4bit_palette[] PROGMEM = {
|
|||||||
typedef uint16_t (*getColorCallback)(uint16_t x, uint16_t y);
|
typedef uint16_t (*getColorCallback)(uint16_t x, uint16_t y);
|
||||||
|
|
||||||
class TFT_eSPI { friend class TFT_eSprite;
|
class TFT_eSPI { friend class TFT_eSprite;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void setSPISpeed(uint8_t speed_Mhz);
|
void setSPISpeed(uint8_t speed_Mhz);
|
||||||
TFT_eSPI(int16_t _W = TFT_WIDTH, int16_t _H = TFT_HEIGHT);
|
TFT_eSPI(int16_t _W = TFT_WIDTH, int16_t _H = TFT_HEIGHT);
|
||||||
@@ -266,9 +265,7 @@ class TFT_eSPI { friend class TFT_eSprite;
|
|||||||
void setAddrWindow(int32_t xs, int32_t ys, int32_t w, int32_t h);
|
void setAddrWindow(int32_t xs, int32_t ys, int32_t w, int32_t h);
|
||||||
void setViewport(int32_t x, int32_t y, int32_t w, int32_t h, bool vpDatum = true);
|
void setViewport(int32_t x, int32_t y, int32_t w, int32_t h, bool vpDatum = true);
|
||||||
void resetViewport();
|
void resetViewport();
|
||||||
bool clipWindow(int32_t* xs, int32_t* ys, int32_t* xe, int32_t* ye);
|
|
||||||
void pushColor(uint16_t color, uint32_t len);
|
void pushColor(uint16_t color, uint32_t len);
|
||||||
void pushColors(uint16_t *data, uint32_t len, bool swap = true);
|
|
||||||
void pushBlock(uint16_t color, uint32_t len);
|
void pushBlock(uint16_t color, uint32_t len);
|
||||||
void pushPixels(const void * data_in, uint32_t len);
|
void pushPixels(const void * data_in, uint32_t len);
|
||||||
void fillScreen(uint32_t color),
|
void fillScreen(uint32_t color),
|
||||||
@@ -278,21 +275,12 @@ class TFT_eSPI { friend class TFT_eSprite;
|
|||||||
void drawCircleHelper(int32_t x, int32_t y, int32_t r, uint8_t cornername, uint32_t color),
|
void drawCircleHelper(int32_t x, int32_t y, int32_t r, uint8_t cornername, uint32_t color),
|
||||||
fillCircle(int32_t x, int32_t y, int32_t r, uint32_t color),
|
fillCircle(int32_t x, int32_t y, int32_t r, uint32_t color),
|
||||||
fillCircleHelper(int32_t x, int32_t y, int32_t r, uint8_t cornername, int32_t delta, uint32_t color),
|
fillCircleHelper(int32_t x, int32_t y, int32_t r, uint8_t cornername, int32_t delta, uint32_t color),
|
||||||
drawEllipse(int16_t x, int16_t y, int32_t rx, int32_t ry, uint16_t color),
|
|
||||||
fillEllipse(int16_t x, int16_t y, int32_t rx, int32_t ry, uint16_t color),
|
|
||||||
fillTriangle(int32_t x1,int32_t y1, int32_t x2,int32_t y2, int32_t x3,int32_t y3, uint32_t color);
|
fillTriangle(int32_t x1,int32_t y1, int32_t x2,int32_t y2, int32_t x3,int32_t y3, uint32_t color);
|
||||||
uint16_t drawPixel(int32_t x, int32_t y, uint32_t color, uint8_t alpha, uint32_t bg_color = 0x00FFFFFF);
|
uint16_t drawPixel(int32_t x, int32_t y, uint32_t color, uint8_t alpha, uint32_t bg_color = 0x00FFFFFF);
|
||||||
void drawArc(int32_t x, int32_t y, int32_t r, int32_t ir, uint32_t startAngle, uint32_t endAngle, uint32_t fg_color, uint32_t bg_color, bool smoothArc = true);
|
|
||||||
void drawSmoothCircle(int32_t x, int32_t y, int32_t r, uint32_t fg_color, uint32_t bg_color);
|
|
||||||
void fillSmoothCircle(int32_t x, int32_t y, int32_t r, uint32_t color, uint32_t bg_color = 0x00FFFFFF);
|
|
||||||
void drawSmoothRoundRect(int32_t x, int32_t y, int32_t r, int32_t ir, int32_t w, int32_t h, uint32_t fg_color, uint32_t bg_color = 0x00FFFFFF, uint8_t quadrants = 0xF);
|
|
||||||
void fillSmoothRoundRect(int32_t x, int32_t y, int32_t w, int32_t h, int32_t radius, uint32_t color, uint32_t bg_color = 0x00FFFFFF);
|
|
||||||
void drawWedgeLine(float ax, float ay, float bx, float by, float aw, float bw, uint32_t fg_color, uint32_t bg_color = 0x00FFFFFF);
|
|
||||||
void setSwapBytes(bool swap);
|
void setSwapBytes(bool swap);
|
||||||
bool getSwapBytes();
|
bool getSwapBytes();
|
||||||
void drawBitmap( int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t fgcolor),
|
void drawBitmap( int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t fgcolor),
|
||||||
drawBitmap( int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t fgcolor, uint16_t bgcolor),
|
drawBitmap( int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t fgcolor, uint16_t bgcolor);
|
||||||
setBitmapColor(uint16_t fgcolor, uint16_t bgcolor);
|
|
||||||
void setPivot(int16_t x, int16_t y);
|
void setPivot(int16_t x, int16_t y);
|
||||||
void pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data);
|
void pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data);
|
||||||
void pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data, uint16_t transparent);
|
void pushImage(int32_t x, int32_t y, int32_t w, int32_t h, uint16_t *data, uint16_t transparent);
|
||||||
@@ -323,11 +311,7 @@ class TFT_eSPI { friend class TFT_eSprite;
|
|||||||
setCursor(int16_t x, int16_t y, uint8_t font);
|
setCursor(int16_t x, int16_t y, uint8_t font);
|
||||||
|
|
||||||
void setTextColor(uint16_t color), // Set character (glyph) color only (background not over-written)
|
void setTextColor(uint16_t color), // Set character (glyph) color only (background not over-written)
|
||||||
setTextColor(uint16_t fgcolor, uint16_t bgcolor, bool bgfill = false), // Set character (glyph) foreground and background colour, optional background fill for smooth fonts
|
setTextColor(uint16_t fgcolor, uint16_t bgcolor, bool bgfill = false); // Set character (glyph) foreground and background colour, optional background fill for smooth fonts
|
||||||
setTextSize(uint8_t size); // Set character size multiplier (this increases pixel size)
|
|
||||||
|
|
||||||
void setTextWrap(bool wrapX, bool wrapY = false); // Turn on/off wrapping of text in TFT width and/or height
|
|
||||||
|
|
||||||
void setTextDatum(uint8_t datum); // Set text datum position (default is top left), see Section 5 above
|
void setTextDatum(uint8_t datum); // Set text datum position (default is top left), see Section 5 above
|
||||||
|
|
||||||
void setTextPadding(uint16_t x_width); // Set text padding (background blanking) width in pixels
|
void setTextPadding(uint16_t x_width); // Set text padding (background blanking) width in pixels
|
||||||
@@ -344,7 +328,6 @@ class TFT_eSPI { friend class TFT_eSprite;
|
|||||||
uint16_t decodeUTF8(uint8_t *buf, uint16_t *index, uint16_t remaining),
|
uint16_t decodeUTF8(uint8_t *buf, uint16_t *index, uint16_t remaining),
|
||||||
decodeUTF8(uint8_t c);
|
decodeUTF8(uint8_t c);
|
||||||
|
|
||||||
void spiwrite(uint8_t); // legacy support only
|
|
||||||
void writecommand(uint8_t c); // Send an 8-bit command, function resets DC/RS high ready for data
|
void writecommand(uint8_t c); // Send an 8-bit command, function resets DC/RS high ready for data
|
||||||
void writedata(uint8_t d); // Send data with DC/RS set high
|
void writedata(uint8_t d); // Send data with DC/RS set high
|
||||||
|
|
||||||
@@ -360,8 +343,6 @@ class TFT_eSPI { friend class TFT_eSprite;
|
|||||||
// 16-bit colour alphaBlend with alpha dither (dither reduces colour banding)
|
// 16-bit colour alphaBlend with alpha dither (dither reduces colour banding)
|
||||||
uint16_t alphaBlend(uint8_t alpha, uint16_t fgc, uint16_t bgc, uint8_t dither);
|
uint16_t alphaBlend(uint8_t alpha, uint16_t fgc, uint16_t bgc, uint8_t dither);
|
||||||
|
|
||||||
uint8_t spiBusyCheck = 0; // Number of ESP32 transfer buffers to check
|
|
||||||
|
|
||||||
void writeColor(uint16_t color, uint32_t len); // Deprecated, use pushBlock()
|
void writeColor(uint16_t color, uint32_t len); // Deprecated, use pushBlock()
|
||||||
|
|
||||||
// Global variables
|
// Global variables
|
||||||
@@ -434,19 +415,9 @@ class TFT_eSPI { friend class TFT_eSprite;
|
|||||||
|
|
||||||
void readAddrWindow(int32_t xs, int32_t ys, int32_t w, int32_t h);
|
void readAddrWindow(int32_t xs, int32_t ys, int32_t w, int32_t h);
|
||||||
|
|
||||||
uint8_t readByte();
|
|
||||||
|
|
||||||
void busDir(uint32_t mask, uint8_t mode);
|
|
||||||
|
|
||||||
void gpioMode(uint8_t gpio, uint8_t mode);
|
|
||||||
|
|
||||||
uint8_t sqrt_fraction(uint32_t num);
|
|
||||||
|
|
||||||
float wedgeLineDistance(float pax, float pay, float bax, float bay, float dr);
|
|
||||||
|
|
||||||
getColorCallback getColor = nullptr; // Smooth font callback function pointer
|
getColorCallback getColor = nullptr; // Smooth font callback function pointer
|
||||||
|
|
||||||
void loadMetrics(uint8_t font); // Function of Fear, which is Unhandled Exception, writing to 0x000000000
|
void loadMetrics(uint8_t font); // FoF
|
||||||
uint32_t readInt32();
|
uint32_t readInt32();
|
||||||
|
|
||||||
uint8_t* fontPtr = nullptr;
|
uint8_t* fontPtr = nullptr;
|
||||||
@@ -454,9 +425,7 @@ class TFT_eSPI { friend class TFT_eSprite;
|
|||||||
//-------------------------------------- protected ----------------------------------//
|
//-------------------------------------- protected ----------------------------------//
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
uint8_t spi_write_speed;
|
uint8_t spi_write_speed;
|
||||||
//int32_t win_xe, win_ye; // Window end coords - not needed
|
|
||||||
|
|
||||||
int32_t _init_width, _init_height; // Display w/h as input, used by setRotation()
|
int32_t _init_width, _init_height; // Display w/h as input, used by setRotation()
|
||||||
int32_t _width, _height; // Display w/h as modified by current rotation
|
int32_t _width, _height; // Display w/h as modified by current rotation
|
||||||
int32_t addr_row, addr_col; // Window position - used to minimise window commands
|
int32_t addr_row, addr_col; // Window position - used to minimise window commands
|
||||||
@@ -511,7 +480,6 @@ class TFT_eSprite : public TFT_eSPI {
|
|||||||
void createPalette(const uint16_t *palette = nullptr, uint8_t colors = 16);
|
void createPalette(const uint16_t *palette = nullptr, uint8_t colors = 16);
|
||||||
void setPaletteColor(uint8_t index, uint16_t color);
|
void setPaletteColor(uint8_t index, uint16_t color);
|
||||||
uint16_t getPaletteColor(uint8_t index);
|
uint16_t getPaletteColor(uint8_t index);
|
||||||
void setBitmapColor(uint16_t fg, uint16_t bg);
|
|
||||||
void drawPixel(int32_t x, int32_t y, uint32_t color);
|
void drawPixel(int32_t x, int32_t y, uint32_t color);
|
||||||
void fillSprite(uint32_t color),
|
void fillSprite(uint32_t color),
|
||||||
setWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1),
|
setWindow(int32_t x0, int32_t y0, int32_t x1, int32_t y1),
|
||||||
@@ -570,8 +538,7 @@ class TFT_eSprite : public TFT_eSPI {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <typename T> static inline void transpose(T& a, T& b) { T t = a; a = b; b = t; }
|
template <typename T> static inline void transpose(T& a, T& b) { T t = a; a = b; b = t; }
|
||||||
template <typename A, typename F, typename B> static inline uint16_t fastBlend(A alpha, F fgc, B bgc)
|
template <typename A, typename F, typename B> static inline uint16_t fastBlend(A alpha, F fgc, B bgc) {
|
||||||
{
|
|
||||||
// Split out and blend 5-bit red and blue channels
|
// Split out and blend 5-bit red and blue channels
|
||||||
uint32_t rxb = bgc & 0xF81F;
|
uint32_t rxb = bgc & 0xF81F;
|
||||||
rxb += ((fgc & 0xF81F) - rxb) * (alpha >> 2) >> 6;
|
rxb += ((fgc & 0xF81F) - rxb) * (alpha >> 2) >> 6;
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ RdsPiBuffer::State RdsPiBuffer::add(uint16_t value, bool error) {
|
|||||||
return this->getState(value);
|
return this->getState(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RdsPiBuffer::clear(){
|
void RdsPiBuffer::clear() {
|
||||||
this->fill = 0;
|
this->fill = 0;
|
||||||
this->pos = (uint8_t)-1;
|
this->pos = (uint8_t)-1;
|
||||||
}
|
}
|
||||||
|
|||||||
+156
-166
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -41,9 +41,9 @@ void handleRoot() {
|
|||||||
html += "<img src=\"/logo.png\" alt=\"FMDX website\">";
|
html += "<img src=\"/logo.png\" alt=\"FMDX website\">";
|
||||||
html += "</a>";
|
html += "</a>";
|
||||||
|
|
||||||
html += "<h1>" + String(textUI(283)) + "</h1>";
|
html += "<h1>" + String(textUI(282)) + "</h1>";
|
||||||
html += "<button onclick=\"window.location.href='/downloadCSV'\">" + String(textUI(284)) + "</button>";
|
html += "<button onclick=\"window.location.href='/downloadCSV'\">" + String(textUI(283)) + "</button>";
|
||||||
html += "<button class=\"go-to-bottom\" onclick=\" window.scrollTo(0, document.body.scrollHeight);\">" + String(textUI(286)) + "</button>";
|
html += "<button class=\"go-to-bottom\" onclick=\" window.scrollTo(0, document.body.scrollHeight);\">" + String(textUI(285)) + "</button>";
|
||||||
|
|
||||||
// Sorting function with icons
|
// Sorting function with icons
|
||||||
html += "<script>";
|
html += "<script>";
|
||||||
@@ -143,9 +143,9 @@ void handleRoot() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
file.close();
|
file.close();
|
||||||
} else html += "<tr><td colspan=\"100%\" style=\"text-align: center; color: red;\">" + String(textUI(296)) + "</td></tr>";
|
} else html += "<tr><td colspan=\"100%\" style=\"text-align: center; color: red;\">" + String(textUI(295)) + "</td></tr>";
|
||||||
|
|
||||||
if (!hasData) html += "<tr><td colspan=\"100%\" style=\"text-align: center; color: red;\">" + String(textUI(285)) + "</td></tr>";
|
if (!hasData) html += "<tr><td colspan=\"100%\" style=\"text-align: center; color: red;\">" + String(textUI(284)) + "</td></tr>";
|
||||||
|
|
||||||
html += "</table>";
|
html += "</table>";
|
||||||
html += "</body></html>";
|
html += "</body></html>";
|
||||||
|
|||||||
+28
-22
@@ -274,7 +274,7 @@ void SetTunerPatch() {
|
|||||||
radio.getIdentification(&hw, &sw);
|
radio.getIdentification(&hw, &sw);
|
||||||
TEF = highByte(hw) * 100 + highByte(sw);
|
TEF = highByte(hw) * 100 + highByte(sw);
|
||||||
tft.fillScreen(BackgroundColor);
|
tft.fillScreen(BackgroundColor);
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 0, 255));
|
||||||
|
|
||||||
if(FORBIDDEN_TUNER(TEF)) {
|
if(FORBIDDEN_TUNER(TEF)) {
|
||||||
tftPrint(ACENTER, textUI(32), 150, 78, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(ACENTER, textUI(32), 150, 78, ActiveColor, ActiveColorSmooth, 28);
|
||||||
@@ -327,13 +327,13 @@ void WakeToSleep(bool yes) {
|
|||||||
MuteScreen(1);
|
MuteScreen(1);
|
||||||
break;
|
break;
|
||||||
case LCD_BRIGHTNESS_1_PERCENT:
|
case LCD_BRIGHTNESS_1_PERCENT:
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet / 100, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet / 100, 0, 100, 0, 255));
|
||||||
break;
|
break;
|
||||||
case LCD_BRIGHTNESS_A_QUARTER:
|
case LCD_BRIGHTNESS_A_QUARTER:
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet / 4, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet / 4, 0, 100, 0, 255));
|
||||||
break;
|
break;
|
||||||
case LCD_BRIGHTNESS_HALF:
|
case LCD_BRIGHTNESS_HALF:
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet / 2, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet / 2, 0, 100, 0, 255));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -351,7 +351,7 @@ void WakeToSleep(bool yes) {
|
|||||||
screensavertimer = millis();
|
screensavertimer = millis();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 0, 255));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1167,7 +1167,7 @@ void MuteScreen(bool setting) {
|
|||||||
setupmode = true;
|
setupmode = true;
|
||||||
leave = true;
|
leave = true;
|
||||||
tft.writecommand(0x11);
|
tft.writecommand(0x11);
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 0, 255));
|
||||||
if (band < BAND_GAP) {
|
if (band < BAND_GAP) {
|
||||||
if (afscreen) {
|
if (afscreen) {
|
||||||
BuildAFScreen();
|
BuildAFScreen();
|
||||||
@@ -1191,7 +1191,10 @@ void MuteScreen(bool setting) {
|
|||||||
setupmode = false;
|
setupmode = false;
|
||||||
} else if (setting && !screenmute) {
|
} else if (setting && !screenmute) {
|
||||||
screenmute = true;
|
screenmute = true;
|
||||||
analogWrite(CONTRASTPIN, 0);
|
for(int x = ContrastSet; x > 0; x--) {
|
||||||
|
analogWrite(CONTRASTPIN, map(x, 0, 100, 0, 255));
|
||||||
|
delay(5);
|
||||||
|
}
|
||||||
tft.writecommand(0x10);
|
tft.writecommand(0x10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1290,7 +1293,7 @@ void later_setup_periph() {
|
|||||||
if(fmdeemphasis != DEEMPHASIS_50) radio.setDeemphasis(fmdeemphasis);
|
if(fmdeemphasis != DEEMPHASIS_50) radio.setDeemphasis(fmdeemphasis);
|
||||||
if(fmagc != 92) radio.setAGC(fmagc);
|
if(fmagc != 92) radio.setAGC(fmagc);
|
||||||
if(amagc != 100) radio.setAMAGC(amagc);
|
if(amagc != 100) radio.setAMAGC(amagc);
|
||||||
if (fmsi) radio.setFMSI(2);
|
if(fmsi) radio.setFMSI(2);
|
||||||
|
|
||||||
if(rx_rtc_avail) {
|
if(rx_rtc_avail) {
|
||||||
bool reset = init_rtc();
|
bool reset = init_rtc();
|
||||||
@@ -1316,6 +1319,9 @@ void setup() {
|
|||||||
gpio_set_drive_capability((gpio_num_t) 21, GPIO_DRIVE_CAP_0);
|
gpio_set_drive_capability((gpio_num_t) 21, GPIO_DRIVE_CAP_0);
|
||||||
gpio_set_drive_capability((gpio_num_t) 22, GPIO_DRIVE_CAP_0);
|
gpio_set_drive_capability((gpio_num_t) 22, GPIO_DRIVE_CAP_0);
|
||||||
gpio_set_drive_capability((gpio_num_t) 23, GPIO_DRIVE_CAP_0);
|
gpio_set_drive_capability((gpio_num_t) 23, GPIO_DRIVE_CAP_0);
|
||||||
|
|
||||||
|
analogWriteFrequency(5000);
|
||||||
|
|
||||||
EEPROM.begin(EE_TOTAL_CNT);
|
EEPROM.begin(EE_TOTAL_CNT);
|
||||||
|
|
||||||
setupmode = true;
|
setupmode = true;
|
||||||
@@ -1441,7 +1447,7 @@ void setup() {
|
|||||||
if (rotarymode == 0) rotarymode = 1; else rotarymode = 0;
|
if (rotarymode == 0) rotarymode = 1; else rotarymode = 0;
|
||||||
EEPROM.writeByte(EE_BYTE_ROTARYMODE, rotarymode);
|
EEPROM.writeByte(EE_BYTE_ROTARYMODE, rotarymode);
|
||||||
EEPROM.commit();
|
EEPROM.commit();
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 0, 255));
|
||||||
Infoboxprint(textUI(1));
|
Infoboxprint(textUI(1));
|
||||||
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
||||||
while (digitalRead(BWBUTTON) == LOW) delay(50);
|
while (digitalRead(BWBUTTON) == LOW) delay(50);
|
||||||
@@ -1457,21 +1463,21 @@ void setup() {
|
|||||||
}
|
}
|
||||||
EEPROM.writeByte(EE_BYTE_DISPLAYFLIP, displayflip);
|
EEPROM.writeByte(EE_BYTE_DISPLAYFLIP, displayflip);
|
||||||
EEPROM.commit();
|
EEPROM.commit();
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 0, 255));
|
||||||
Infoboxprint(textUI(3));
|
Infoboxprint(textUI(3));
|
||||||
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
||||||
while (digitalRead(MODEBUTTON) == LOW) delay(50);
|
while (digitalRead(MODEBUTTON) == LOW) delay(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (digitalRead(BWBUTTON) == HIGH && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == LOW) {
|
if (digitalRead(BWBUTTON) == HIGH && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == LOW) {
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 0, 255));
|
||||||
Infoboxprint(textUI(4));
|
Infoboxprint(textUI(4));
|
||||||
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
||||||
while (digitalRead(BANDBUTTON) == LOW) delay(50);
|
while (digitalRead(BANDBUTTON) == LOW) delay(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == LOW && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == HIGH) {
|
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == LOW && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == HIGH) {
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 0, 255));
|
||||||
DefaultSettings();
|
DefaultSettings();
|
||||||
Infoboxprint(textUI(63));
|
Infoboxprint(textUI(63));
|
||||||
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
||||||
@@ -1480,9 +1486,9 @@ void setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == LOW && digitalRead(BANDBUTTON) == HIGH) {
|
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == LOW && digitalRead(BANDBUTTON) == HIGH) {
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 0, 255));
|
||||||
Infoboxprint(textUI(279));
|
Infoboxprint(textUI(278));
|
||||||
tftPrint(ACENTER, textUI(280), 155, 100, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(ACENTER, textUI(279), 155, 100, ActiveColor, ActiveColorSmooth, 28);
|
||||||
tft.calibrateTouch(TouchCalData, PrimaryColor, BackgroundColor, 30);
|
tft.calibrateTouch(TouchCalData, PrimaryColor, BackgroundColor, 30);
|
||||||
EEPROM.writeUInt(EE_UINT16_CALTOUCH1, TouchCalData[0]);
|
EEPROM.writeUInt(EE_UINT16_CALTOUCH1, TouchCalData[0]);
|
||||||
EEPROM.writeUInt(EE_UINT16_CALTOUCH2, TouchCalData[1]);
|
EEPROM.writeUInt(EE_UINT16_CALTOUCH2, TouchCalData[1]);
|
||||||
@@ -1493,7 +1499,7 @@ void setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == LOW) {
|
if (digitalRead(BWBUTTON) == LOW && digitalRead(ROTARY_BUTTON) == HIGH && digitalRead(MODEBUTTON) == HIGH && digitalRead(BANDBUTTON) == LOW) {
|
||||||
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(ContrastSet, 0, 100, 0, 255));
|
||||||
Infoboxprint(textUI(66));
|
Infoboxprint(textUI(66));
|
||||||
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
tftPrint(ACENTER, textUI(2), 155, 130, ActiveColor, ActiveColorSmooth, 28);
|
||||||
invertdisplay = !invertdisplay;
|
invertdisplay = !invertdisplay;
|
||||||
@@ -1511,7 +1517,7 @@ void setup() {
|
|||||||
tft.drawBitmap((tft.width() - 59) / 2, 24, TEFLogo, 59, 23, ActiveColor);
|
tft.drawBitmap((tft.width() - 59) / 2, 24, TEFLogo, 59, 23, ActiveColor);
|
||||||
|
|
||||||
for (int x = 0; x <= ContrastSet; x++) {
|
for (int x = 0; x <= ContrastSet; x++) {
|
||||||
analogWrite(CONTRASTPIN, map(x, 0, 100, 15, 255));
|
analogWrite(CONTRASTPIN, map(x, 0, 100, 0, 255));
|
||||||
delay(5);
|
delay(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2966,10 +2972,10 @@ void ShowFreq(int mode) {
|
|||||||
freqold = freq;
|
freqold = freq;
|
||||||
break;
|
break;
|
||||||
case 1: Infoboxprint(textUI(31)); break;
|
case 1: Infoboxprint(textUI(31)); break;
|
||||||
case 2: Infoboxprint(textUI(287)); break;
|
case 2: Infoboxprint(textUI(286)); break;
|
||||||
case 3: Infoboxprint(textUI(288)); break;
|
case 3: Infoboxprint(textUI(287)); break;
|
||||||
case 4: Infoboxprint(textUI(292)); break;
|
case 4: Infoboxprint(textUI(291)); break;
|
||||||
case 5: Infoboxprint(textUI(281)); break;
|
case 5: Infoboxprint(textUI(280)); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
FrequencySprite.pushSprite(46, 46);
|
FrequencySprite.pushSprite(46, 46);
|
||||||
@@ -3943,7 +3949,7 @@ uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, ui
|
|||||||
|
|
||||||
tft.drawRect(59, 109, 202, 8, FrameColor);
|
tft.drawRect(59, 109, 202, 8, FrameColor);
|
||||||
tft.fillRect(60, 110, 200, 6, GreyoutColor);
|
tft.fillRect(60, 110, 200, 6, GreyoutColor);
|
||||||
tftPrint(ARIGHT, textUI(269), 120, 155, ActiveColor, ActiveColorSmooth, 16);
|
tftPrint(ARIGHT, textUI(268), 120, 155, ActiveColor, ActiveColorSmooth, 16);
|
||||||
|
|
||||||
for (frequency = startfreq * 10; frequency <= stopfreq * 10; frequency += 10) {
|
for (frequency = startfreq * 10; frequency <= stopfreq * 10; frequency += 10) {
|
||||||
if (stopScanning) break;
|
if (stopScanning) break;
|
||||||
|
|||||||
+3
-3
@@ -40,7 +40,7 @@ void ShowAdvancedRDS() {
|
|||||||
tftPrint16(ALEFT, radio.rds.PTYN.getPrev(), 216, 109, BackgroundColor, BackgroundColor);
|
tftPrint16(ALEFT, radio.rds.PTYN.getPrev(), 216, 109, BackgroundColor, BackgroundColor);
|
||||||
}
|
}
|
||||||
if (!radio.rds.hasPTYN) radio.rds.PTYN = "PTYN N/A";
|
if (!radio.rds.hasPTYN) radio.rds.PTYN = "PTYN N/A";
|
||||||
tftPrint16(ALEFT, String(radio.rds.PTYN), 216, 109, RDSColor, RDSColorSmooth); // PTYN is UCS-2, meaning no chinese characters. Americans...
|
tftPrint16(ALEFT, String(radio.rds.PTYN), 216, 109, RDSColor, RDSColorSmooth); // PTYN is UCS-2, meaning no chinese characters. 美国人!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ void ShowAdvancedRDS() {
|
|||||||
if(!screenmute) eonDisplay.update(eonstring, RDSstatus, RDSColor, RDSColorSmooth, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor);
|
if(!screenmute) eonDisplay.update(eonstring, RDSstatus, RDSColor, RDSColorSmooth, RDSDropoutColor, RDSDropoutColorSmooth, BackgroundColor);
|
||||||
|
|
||||||
String rtplusstring;
|
String rtplusstring;
|
||||||
if (radio.rds.hasRTplus) rtplusstring = (radio.rds.rdsplusTag1 != 169 ? String(textUI(radio.rds.rdsplusTag1)) + ": " + String(radio.rds.RTContent1) : "") + (radio.rds.rdsplusTag2 != 169 ? " - " + String(textUI(radio.rds.rdsplusTag2)) + ": " + String(radio.rds.RTContent2) : ""); else rtplusstring = textUI(86);
|
if (radio.rds.hasRTplus) rtplusstring = (radio.rds.rdsplusTag1 != 166 ? String(textUI(radio.rds.rdsplusTag1)) + ": " + String(radio.rds.RTContent1) : "") + (radio.rds.rdsplusTag2 != 169 ? " - " + String(textUI(radio.rds.rdsplusTag2)) + ": " + String(radio.rds.RTContent2) : ""); else rtplusstring = textUI(86);
|
||||||
if (radio.rds.hasRTplus.changed(0)) {
|
if (radio.rds.hasRTplus.changed(0)) {
|
||||||
if (!screenmute) {
|
if (!screenmute) {
|
||||||
if (radio.rds.hasRTplus) tftPrint16(ALEFT, "RT+", 123, 51, RDSColor, RDSColorSmooth); else tftPrint16(ALEFT, "RT+", 123, 51, GreyoutColor, BackgroundColor);
|
if (radio.rds.hasRTplus) tftPrint16(ALEFT, "RT+", 123, 51, RDSColor, RDSColorSmooth); else tftPrint16(ALEFT, "RT+", 123, 51, GreyoutColor, BackgroundColor);
|
||||||
@@ -409,7 +409,7 @@ void showPI() {
|
|||||||
|
|
||||||
void showPTY() {
|
void showPTY() {
|
||||||
if(radio.rds.PTY.changed(0)) {
|
if(radio.rds.PTY.changed(0)) {
|
||||||
String PTYString = (radio.rds.region != 0 ? (radio.rds.region == 0 ? PTY_EU[radio.rds.PTY] : PTY_USA[radio.rds.PTY]) : textUI(225 + radio.rds.PTY));
|
String PTYString = (radio.rds.region != 0 ? (radio.rds.region == 0 ? PTY_EU[radio.rds.PTY] : PTY_USA[radio.rds.PTY]) : textUI(224 + radio.rds.PTY));
|
||||||
GeneralTextSprite.fillSprite(TFT_TRANSPARENT);
|
GeneralTextSprite.fillSprite(TFT_TRANSPARENT);
|
||||||
GeneralTextSprite.fillRect(0, 0, 160, 19, BackgroundColor);
|
GeneralTextSprite.fillRect(0, 0, 160, 19, BackgroundColor);
|
||||||
if(RDSstatus) GeneralTextSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
if(RDSstatus) GeneralTextSprite.setTextColor(RDSColor, RDSColorSmooth, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user