i2c raw control

This commit is contained in:
2026-02-14 22:39:21 +01:00
parent d79358fa48
commit 5e6371b409
7 changed files with 180 additions and 8 deletions

View File

@@ -9,6 +9,7 @@ void Communication();
void XDRGTKRoutine();
void passwordcrypt();
void tryWiFi();
void total_pc_control();
extern void BuildDisplay();
extern void BuildAdvancedRDS();

View File

@@ -336,6 +336,9 @@ extern bool rds_settings_changed;
extern const size_t language_totalnumber;
extern const size_t language_entrynumber;
extern volatile bool i2c_pc_control;
extern volatile bool i2c_pc_control_init;
extern mem presets[EE_PRESETS_CNT];
extern TEF6686 radio;

View File

@@ -2,6 +2,8 @@
#include <Arduino.h>
#include <TFT_eSPI.h>
#define CONSOLE_FONT 2
class Console {
public:
explicit Console(TFT_eSPI* display) : tft(display), y(0) {}
@@ -9,9 +11,9 @@ public:
tft->setTextColor(TFT_WHITE, background);
tft->setTextDatum(TL_DATUM);
auto data = "[" + String(millis() / 1000.0f) + "] " + text;
tft->fillRect(0, y, tft->textWidth(data), tft->fontHeight(2), background);
tft->drawString(data, 0, y, 2);
y += tft->fontHeight(2);
tft->fillRect(0, y, tft->textWidth(data, CONSOLE_FONT), tft->fontHeight(CONSOLE_FONT), background);
tft->drawString(data, 0, y, CONSOLE_FONT);
y += tft->fontHeight(CONSOLE_FONT);
}
void reset() {
y = 0;