From bf1e2b852a9a9940e18148a23677115508a67973 Mon Sep 17 00:00:00 2001 From: Roman Terekhov Date: Thu, 15 Oct 2026 20:04:11 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B0=20nRF52=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D0=B0=201.18.0:=20=D1=83=D0=B1=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=20=D0=BD=D0=B5=D1=81=D0=BA=D0=B0=D1=87=D0=B8=D0=B2=D0=B0=D0=B5?= =?UTF-8?q?=D0=BC=D1=8B=D0=B9=20=D0=BF=D0=B8=D0=BD=20=D1=82=D1=83=D0=BB?= =?UTF-8?q?=D1=87=D0=B5=D0=B9=D0=BD=D0=B0,=20=D1=87=D0=B0=D1=81=D1=8B=20?= =?UTF-8?q?=D0=B2=20UI=20=D0=B1=D0=B5=D1=80=D1=91=D0=BC=20=D0=B8=D0=B7=20r?= =?UTF-8?q?tc=5Fclock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/companion_radio/ui-new/UITask.cpp | 10 +++++----- platformio.ini | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index c44c5bb3..f3d57ee7 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -1761,9 +1761,9 @@ void UITask::queueMsg(uint8_t path_len, const char* from_name, const char* text) // Показывать ли входящее сразу: тихие часы и настройка Popups. // Если нет — сообщение только попадает в непрочитанные (счётчик на первом экране). -static bool showIncomingNow(NodePrefs* prefs, mesh::RTCClock* rtc, bool channel_popup) { +static bool showIncomingNow(NodePrefs* prefs, uint32_t utc, bool channel_popup) { if (!prefs->msg_popup) return false; - if (prefs->isQuietNow(rtc->getCurrentTime())) return false; + if (prefs->isQuietNow(utc)) return false; return channel_popup; } @@ -1774,7 +1774,7 @@ void UITask::onMessageRecv(mesh::Packet *pkt, const ContactInfo &from, uint8_t t uint8_t path_len = pkt->isRouteFlood() ? pkt->path_len : 0xFF; queueMsg(path_len, from.name, text); - if (!showIncomingNow(_node_prefs, _rtc, true)) { + if (!showIncomingNow(_node_prefs, rtc_clock.getCurrentTime(), true)) { _msg_pending = true; _next_refresh = 100; // чтобы обновился счётчик на первом экране return; @@ -1812,7 +1812,7 @@ void UITask::onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_det uint8_t path_len = pkt->isRouteFlood() ? pkt->path_len : 0xFF; queueMsg(path_len, channel_details.name, text); - if (!showIncomingNow(_node_prefs, _rtc, ch_mode == CH_MODE_POPUP)) { + if (!showIncomingNow(_node_prefs, rtc_clock.getCurrentTime(), ch_mode == CH_MODE_POPUP)) { _msg_pending = true; _next_refresh = 100; return; @@ -1840,7 +1840,7 @@ void UITask::onChannelMessageRecv(mesh::Packet *pkt, ChannelDetails& channel_det void UITask::onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path_len, const uint8_t* path) { // тихие часы глушат и уведомление о новом контакте - if (!hasConnection() && !_node_prefs->isQuietNow(_rtc->getCurrentTime())) { + if (!hasConnection() && !_node_prefs->isQuietNow(rtc_clock.getCurrentTime())) { notify(UIEventType::newContactMessage); } } diff --git a/platformio.ini b/platformio.ini index f296f838..4615436b 100644 --- a/platformio.ini +++ b/platformio.ini @@ -86,7 +86,6 @@ platform_packages = ; https://github.com/meshcore-dev/MeshCore/pull/1177 ; https://github.com/meshcore-dev/MeshCore/pull/1295 framework-arduinoadafruitnrf52 @ https://github.com/meshcore-dev/Adafruit_nRF52_Arduino#d541301665b40959682252911e57b11df3ee651a - platformio/toolchain-gccarmnoneeabi@^1.140201.0 extra_scripts = create-uf2.py build_flags = ${arduino_base.build_flags} -D NRF52_PLATFORM