mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-01 09:46:22 +00:00
feat(ui): DM auto-resend + incoming dedup + channel relay ring
DM auto-resend (delivery status follow-up): - New pref dm_resend_count (0-5, default 2), Settings › Messages › Resend. Schema sentinel 0xC0DE0009 → 0xC0DE000A; old files clamp to the default. - When a pending on-device DM passes its ACK deadline, tickDmResends() (driven from UITask::loop, so it runs in the background regardless of the active screen) re-sends with the next attempt# reusing the original timestamp, refreshing ack_tag/deadline, until resends run out → then ✗. - dmEffectiveStatus keeps the entry pending while resends remain. Incoming DM dedup: - A retry reuses the sender timestamp + text but has a fresh packet hash, so the mesh dup-filter passes it. addDMMsg now takes sender_timestamp and drops copies matching prefix+timestamp+text. sender_timestamp plumbed from MyMesh::queueMessage through AbstractUITask/UITask. Channel relay ring: - Replace the single-slot relayed-into-mesh tracker with a 4-slot ring so a quick burst of channel sends are each matched to their repeater echo. Receive-path hashing still gated (now on _relay_active) so the hot flood path is untouched when idle. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
54b53f7f0f
commit
aa4bb490d0
@@ -131,11 +131,16 @@ struct NodePrefs { // persisted to file
|
||||
// below the ceiling, so disabling restores the user's configured power.
|
||||
uint8_t tx_apc;
|
||||
|
||||
// Auto-resend for on-device DMs: number of extra send attempts (0..5) made when
|
||||
// no end-to-end ACK arrives before the deadline, before the delivery marker
|
||||
// shows ✗. 0 = no auto-resend (single attempt). Default 2.
|
||||
uint8_t dm_resend_count;
|
||||
|
||||
// Tail sentinel written at the end of /new_prefs. Bump the low byte when
|
||||
// adding/removing/reordering fields in DataStore::savePrefs/loadPrefsInt so
|
||||
// older saves are detected on load and skipped (zero-init defaults kept).
|
||||
// High 24 bits identify the file format; low byte is the schema revision.
|
||||
static const uint32_t SCHEMA_SENTINEL = 0xC0DE0009;
|
||||
static const uint32_t SCHEMA_SENTINEL = 0xC0DE000A;
|
||||
|
||||
// Bit-index for each home page. Used by page_order (entries store bit+1) and
|
||||
// by home_pages_mask. Single source of truth — both HomeScreen::pageBit/bitToPage
|
||||
|
||||
Reference in New Issue
Block a user