From c3542b3394e885434de1b03c30e62a93f8524229 Mon Sep 17 00:00:00 2001 From: Roman Terekhov Date: Thu, 15 Oct 2026 20:33:46 +0300 Subject: [PATCH] =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81:=20=D1=80=D0=B5=D0=B6?= =?UTF-8?q?=D0=B8=D0=BC=20=D1=83=D0=B2=D0=B5=D0=B4=D0=BE=D0=BC=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B9=20=D0=BA=D0=B0=D0=BD=D0=B0=D0=BB=D0=B0=20?= =?UTF-8?q?=D1=87=D0=B8=D1=82=D0=B0=D0=BB=D1=81=D1=8F=20=D1=83=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B2=D0=BE=D0=B3=D0=BE=20=D0=BA=D0=B0=D0=BD=D0=B0?= =?UTF-8?q?=D0=BB=D0=B0=20=E2=80=94=20getChannel()=20=D0=B7=D0=B0=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D0=B0=D0=BB=20=D0=B8=D0=BD=D0=B4=D0=B5=D0=BA=D1=81?= =?UTF-8?q?=20=D0=BA=D0=B0=D0=BD=D0=B0=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/companion_radio/MyMesh.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/companion_radio/MyMesh.cpp b/examples/companion_radio/MyMesh.cpp index 649fd3d7..bc0385e1 100644 --- a/examples/companion_radio/MyMesh.cpp +++ b/examples/companion_radio/MyMesh.cpp @@ -590,10 +590,12 @@ void MyMesh::onChannelMessageRecv(const mesh::GroupChannel &channel, mesh::Packe if (_listener) { // Get the channel name from the channel index ChannelDetails channel_details; - channel_details.channel_idx = channel_idx; // UI использует индекс для настроек по каналам if (!getChannel(channel_idx, channel_details)) { strcpy(channel_details.name, "Unknown"); } + // ВАЖНО: индекс канала ставим ПОСЛЕ getChannel — она копирует структуру целиком + // и затирает всё, что записано до неё (иначе UI читал режим первого канала). + channel_details.channel_idx = channel_idx; _listener->onChannelMessageRecv(pkt, channel_details, text); _listener->onQueueSizeChanged(offline_queue_len); }