Merge upstream MeshCore v1.18.0 (tag repeater-v1.18.0) into main
Разрешённые конфликты (12 файлов, из них 4 companion взяты из upstream целиком): - examples/companion_radio/*: взят upstream, companion в форке не собирается - examples/simple_repeater/MyMesh.cpp: убрана наша интеграция вентилятора (setFanPostTxHoldMs/setFanMode) — upstream 1.18.0 сам грузит настройки вентилятора через attachDynamicPrefs, а его CLI (get fan, set fan auto|on|off, set fan.lo/hi) доступен через board.handleCommand из CommonCLI; удалён наш дублирующий блок get fan/set fan. Оставлена наша сигнатура format*StatsReply(char*, size_t) - examples/simple_repeater/MyMesh.h: оставлены наши WebSensorSnapshot/BlacklistEntry/ ChanNameFilter и getCLI() (нужен мастеру настройки), добавлен upstream isHiddenNode(); FIRMWARE_VERSION по умолчанию — v1.18.0 - src/helpers/CommonCLI.h: оставлены наши FanPrefs (совместимость NVS) и добавлен upstream DynamicConfigSerializer custom (getCustom() нужен attachDynamicPrefs) - src/helpers/ESP32Board.h: время восстанавливается сначала из NVS (наша надстройка, переживает отключение питания), затем из RTC-памяти upstream, иначе опорная дата; deep sleep по-прежнему не трогаем - src/helpers/sensors/EnvironmentSensorManager.cpp: взята логика upstream (detected[], один драйвер на тип), поверх возвращено определение адреса платой (boardDetectedI2CSensorAddress) - variants/lilygo_tbeam_1w/*: взят upstream (задача вентилятора, NTC, гистерезис, CLI и сохранение настроек), наши правки перенесены как делегирование его API - README.md: оставлен наш
This commit is contained in:
commit
80d36d20bc
200 files changed
+7197
-1571
No files matched your search
@@ -133,12 +133,18 @@ void setup() {
|
||||
}
|
||||
|
||||
void loop() {
|
||||
#if defined(TBEAM_1W)
|
||||
board.updateFanControl();
|
||||
#endif
|
||||
// Вентилятор T-Beam 1W обслуживает собственная задача платы (upstream 1.18.0),
|
||||
// поэтому ручной опрос из loop() больше не нужен.
|
||||
|
||||
// Handle Serial CLI
|
||||
int len = strlen(command);
|
||||
// `command` must stay NUL-terminated within its bounds. If it ever isn't,
|
||||
// strlen() above can return >= sizeof(command) and the loop below would then
|
||||
// index past the buffer, so clamp defensively.
|
||||
if (len >= (int)sizeof(command)) {
|
||||
command[0] = 0;
|
||||
len = 0;
|
||||
}
|
||||
while (Serial.available() && len < sizeof(command)-1) {
|
||||
char c = Serial.read();
|
||||
if (c != '\n') {
|
||||
@@ -148,8 +154,9 @@ void loop() {
|
||||
}
|
||||
if (c == '\r') break;
|
||||
}
|
||||
if (len == sizeof(command)-1) { // command buffer full
|
||||
command[sizeof(command)-1] = '\r';
|
||||
if (len == sizeof(command)-1) { // buffer full: treat as a completed line
|
||||
command[sizeof(command)-2] = '\r'; // place end-of-line marker inside the buffer
|
||||
command[sizeof(command)-1] = 0; // keep the buffer NUL-terminated
|
||||
}
|
||||
|
||||
if (len > 0 && command[len - 1] == '\r') { // received complete line
|
||||
@@ -171,6 +178,8 @@ void loop() {
|
||||
command[0] = 0; // reset command buffer
|
||||
}
|
||||
|
||||
board.loop(); // let the board feed its watchdog, run periodic housekeeping
|
||||
|
||||
#ifdef ETHERNET_ENABLED
|
||||
ethernet_loop_maintain();
|
||||
if (ethernet_read_line(ethernet_command, sizeof(ethernet_command))) {
|
||||
|
||||
Reference in new issue
Block a user