move some things around

This commit is contained in:
2026-02-18 10:38:19 +01:00
parent 9cf4593517
commit 21fd8d00ec
13 changed files with 1391 additions and 1411 deletions

View File

@@ -4,6 +4,7 @@
#include "nonvolatile.h"
#include <Hash.h>
#include "core.h"
#include "gui.h"
void Communication();
void XDRGTKRoutine();

View File

@@ -51,7 +51,7 @@
#define DELAY_BUTTON_DEBOUNCE_MS 50
#define DELAY_BUTTON_DEBOUNCE_EXTRA_MS 75
#define DELAY_KEYPAD_TIMEOUT_MS 2000
#define DELAY_RDS_READ_MS 50
#define DELAY_RDS_READ_MS 60
#define DELAY_TOUCH_REPEAT_MS 500
#define TOT_MULTIPLIER_MS 60000
#define NTP_UPDATE_INTERVAL_MS 1800000

View File

@@ -1,21 +1,15 @@
#pragma once
#include <stdint.h>
#include <Arduino.h>
#include "graphics.h"
void tftPrint(int8_t offset, const String & text, int16_t x, int16_t y, int color, int smoothcolor, uint8_t fontsize);
void tftPrint16(int8_t offset, const String & text, int16_t x, int16_t y, int color, int smoothcolor, bool force_font = true, bool font = false);
void tftReplace(int8_t offset, const String & textold, const String & text, int16_t x, int16_t y, int color, int smoothcolor, int background, uint8_t fontsize);
void tftReplace16(int8_t offset, const String & textold, const String & text, int16_t x, int16_t y, int color, int smoothcolor, int background, bool force_font = true, bool font = false);
const char* textUI(uint16_t number);
uint8_t doAutoMemory(uint16_t startfreq, uint16_t stopfreq, uint8_t startmem, uint8_t stopmem, bool rdsonly, uint8_t doublepi);
void showAutoSquelch(bool mode);
void UpdateFonts();
void setAutoSpeedSPI();
void DoMemoryPosTune();
void startFMDXScan();
void endMenu();
void TuneUp();
void ShowStepSize();
void ShowFreq(int mode);
void ShowMemoryPos();
void TuneDown();
@@ -23,12 +17,8 @@ void ShowTuneMode();
void SelectBand();
void doBW();
void ModeButtonPress();
void updateEQ();
void updateiMS();
void Seek(bool mode);
void MuteScreen(bool setting);
void cancelDXScan();
void doStereoToggle();
void updateBW();
void ShowRDSLogo(bool RDSstatus);
void DataPrint(String string);

9
include/graphics.h Normal file
View File

@@ -0,0 +1,9 @@
#pragma once
#include "globals.h"
void tftPrint(int8_t offset, const String & text, int16_t x, int16_t y, int color, int smoothcolor, uint8_t fontsize);
void tftPrint16(int8_t offset, const String & text, int16_t x, int16_t y, int color, int smoothcolor, bool force_font = true, bool font = false);
void tftReplace(int8_t offset, const String & textold, const String & text, int16_t x, int16_t y, int color, int smoothcolor, int background, uint8_t fontsize);
void tftReplace16(int8_t offset, const String & textold, const String & text, int16_t x, int16_t y, int color, int smoothcolor, int background, bool force_font = true, bool font = false);
void UpdateFonts();

View File

@@ -25,6 +25,12 @@ void drawButton(const char* text, byte button_number, bool active, bool selected
String shortLine(String text);
void showMenuOpenTouchButtons();
void showBWSelector();
void ShowRDSLogo(bool RDSstatus);
void showAutoSquelch(bool mode);
void updateEQ();
void updateiMS();
void updateBW();
void ShowStepSize();
extern void ShowBandSelectionFM(bool notglanceview, bool normaldisplay);
extern void ShowBandSelectionAM(bool notglanceview, bool normaldisplay);

View File

@@ -24,7 +24,7 @@ Process:
}
*/
static const char* const myLanguage[22][297] PROGMEM = {
static const char* const Languages[22][297] PROGMEM = {
{ "English", // English
"Rotary direction changed", // 1
"Please release button", // 2

View File

@@ -8,9 +8,28 @@ extern RTC_DATA_ATTR bool gpio_chip;
extern RTC_DATA_ATTR bool tef_found;
template<typename... Args>
void panic(Args... args);
void panic(Args... args) {
radio.power(true);
tft.fillScreen(TFT_RED);
console.reset();
(console.print(args), ...);
while (true);
}
void Round30K(unsigned int freq);
void Round50K(unsigned int freq);
void Round100K(unsigned int freq);
void Round200K(unsigned int freq);
void WakeToSleep(bool yes);
void BANDBUTTONPress();
void BWButtonPress();
void doBandToggle();
int GetNum();
void NumpadProcess(int num);
bool isSignalQualityGood(int usn, int wam, int ostatus, int threshold_multiplier = SCAN_SIGNAL_THRESHOLD_USN_MULTIPLIER, int ostatus_threshold = SCAN_SIGNAL_THRESHOLD_OSTATUS);
void deepSleep();
inline bool IsStationEmpty() {
return presets[memorypos].band == BAND_FM && presets[memorypos].frequency == EE_PRESETS_FREQUENCY;
}

View File

@@ -9,6 +9,7 @@
#include "NTPupdate.h"
#include "rtc.hpp"
#include "core.h"
#include "gui.h"
void ShowAdvancedRDS();
void readRds();