mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-02 10:16:11 +00:00
fix(ui): DM marker stuck at ✗ for on-device sends
isAckPending() only tracks app/serial-initiated DMs (expected_ack_table); a DM composed on the device UI registers in BaseChatMesh's own ack table, so gating the UI notification on that table left every on-device DM timing out to ✗. Notify the UI on every ACK and let it match the crc against its own pending tag; APC SNR sampling stays gated on isAckPending(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
d064a617e0
commit
0e2e149e18
@@ -1186,7 +1186,12 @@ void MyMesh::onAckRecv(mesh::Packet* packet, uint32_t ack_crc) {
|
|||||||
bool mine = isAckPending(ack_crc);
|
bool mine = isAckPending(ack_crc);
|
||||||
BaseChatMesh::onAckRecv(packet, ack_crc);
|
BaseChatMesh::onAckRecv(packet, ack_crc);
|
||||||
if (mine && _prefs.tx_apc) apcSampleSnr(radio_driver.getLastSNR());
|
if (mine && _prefs.tx_apc) apcSampleSnr(radio_driver.getLastSNR());
|
||||||
if (mine && _ui) _ui->onMsgAck(ack_crc); // drive DM delivery-status marker
|
// Drive the DM delivery-status marker. Note isAckPending() only covers
|
||||||
|
// app/serial-initiated sends (expected_ack_table); a DM composed on the
|
||||||
|
// device UI registers in BaseChatMesh's own ack table instead, so gating on
|
||||||
|
// `mine` here would leave every on-device DM stuck at ✗. The UI matches the
|
||||||
|
// crc against its own pending tag, so an unrelated/overheard ACK is ignored.
|
||||||
|
if (_ui) _ui->onMsgAck(ack_crc);
|
||||||
}
|
}
|
||||||
|
|
||||||
MyMesh::MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMeshTables &tables, DataStore& store, AbstractUITask* ui)
|
MyMesh::MyMesh(mesh::Radio &radio, mesh::RNG &rng, mesh::RTCClock &rtc, SimpleMeshTables &tables, DataStore& store, AbstractUITask* ui)
|
||||||
|
|||||||
Reference in New Issue
Block a user