89.9 flash usage

This commit is contained in:
2026-01-06 13:56:00 +01:00
parent ed89ceaac5
commit 41f0140a22
6 changed files with 39 additions and 23 deletions

3
CMakeLists.txt Normal file
View File

@@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 3.16.0)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(TEF6686_ESP32)

9
extra_script.py Normal file
View File

@@ -0,0 +1,9 @@
Import("env")
# Apply C++-only flags
env.Append(
CXXFLAGS=[
"-fno-exceptions",
"-fno-rtti"
]
)

View File

@@ -17,3 +17,16 @@ build_flags =
-Wall
-Wextra
-Wno-unknown-pragmas
-Os
-DCORE_DEBUG_LEVEL=0
-DBOARD_HAS_PSRAM=0
-ffunction-sections
-fdata-sections
-Wl,--gc-sections
-DARDUINO_LOOP_STACK_SIZE=4096
build_unflags =
-fexceptions
-frtti
extra_scripts = pre:extra_script.py

6
src/CMakeLists.txt Normal file
View File

@@ -0,0 +1,6 @@
# This file was automatically generated for projects
# without default 'CMakeLists.txt' file.
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
idf_component_register(SRCS ${app_sources})

View File

@@ -320,7 +320,6 @@ bool isDST(time_t t) {
}
if (month > 3 && month < 10) return true;
return false;
}
@@ -390,9 +389,7 @@ void sendUDPlog() {
String AF = "";
if (radio.rds.hasAF && radio.af_counter > 0) {
for (byte i = 0; i < radio.af_counter; i++) {
AF += String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10) + (i == radio.af_counter - 1 ? "" : ";");
}
for (byte i = 0; i < radio.af_counter; i++) AF += String(radio.af[i].frequency / 100) + "." + String((radio.af[i].frequency % 100) / 10) + (i == radio.af_counter - 1 ? "" : ";");
}
String EON = "";
@@ -419,24 +416,12 @@ void sendUDPlog() {
if (radio.rds.hasRTplus) RTPLUS += radio.rds.RTContent1 + ";" + radio.rds.RTContent2;
// Construct the data row to send via UDP
String row = CHIP + "," +
VERSION + "," +
String(scandxmode) + "," +
currentDateTime + "," +
frequencyFormatted + "," +
String(radio.rds.picode).substring(0, 4) + "," +
signal + "," +
String(radio.getStereoStatus()) + "," +
String(radio.rds.hasTA) + "," +
String(radio.rds.TP) + "," +
String(radio.rds.hasTMC) + "," +
String(radio.rds.PTY) + "," +
ECC + "," +
stationName + "," +
radioTextModified + "," +
AF + "," +
EON + "," +
RTPLUS + "\n";
String row = CHIP + "," + VERSION + "," + String(scandxmode) + "," +
currentDateTime + "," + frequencyFormatted + "," + String(radio.rds.picode).substring(0, 4) + "," +
signal + "," + String(radio.getStereoStatus()) + "," + String(radio.rds.hasTA) + "," +
String(radio.rds.TP) + "," + String(radio.rds.hasTMC) + "," + String(radio.rds.PTY) + "," +
ECC + "," + stationName + "," + radioTextModified + "," +
AF + "," + EON + "," + RTPLUS + "\n";
// Send the data via UDP if it's new
if (UDPlogold != row) {