mirror of
https://github.com/pelgraine/Meck.git
synced 2026-03-28 17:42:44 +01:00
Implementing sent message ack functionality into txt-reader branch
This commit is contained in:
@@ -43,4 +43,6 @@ public:
|
||||
virtual void newMsg(uint8_t path_len, const char* from_name, const char* text, int msgcount) = 0;
|
||||
virtual void notify(UIEventType t = UIEventType::none) = 0;
|
||||
virtual void loop() = 0;
|
||||
virtual void showAlert(const char* text, int duration_millis) {}
|
||||
virtual void forceRefresh() {}
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,11 +8,11 @@
|
||||
#define FIRMWARE_VER_CODE 8
|
||||
|
||||
#ifndef FIRMWARE_BUILD_DATE
|
||||
#define FIRMWARE_BUILD_DATE "7 Feb 2026"
|
||||
#define FIRMWARE_BUILD_DATE "8 Feb 2026"
|
||||
#endif
|
||||
|
||||
#ifndef FIRMWARE_VERSION
|
||||
#define FIRMWARE_VERSION "Meck v0.7"
|
||||
#define FIRMWARE_VERSION "Meck v0.7.1"
|
||||
#endif
|
||||
|
||||
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
|
||||
@@ -231,6 +231,19 @@ private:
|
||||
|
||||
#define ADVERT_PATH_TABLE_SIZE 16
|
||||
AdvertPath advert_paths[ADVERT_PATH_TABLE_SIZE]; // circular table
|
||||
|
||||
// Sent message repeat tracking
|
||||
#define SENT_TRACK_SIZE 4
|
||||
#define SENT_FINGERPRINT_SIZE 12
|
||||
#define SENT_TRACK_EXPIRY_MS 30000 // stop tracking after 30 seconds
|
||||
struct SentMsgTrack {
|
||||
uint8_t fingerprint[SENT_FINGERPRINT_SIZE];
|
||||
uint8_t repeat_count;
|
||||
unsigned long sent_millis;
|
||||
bool active;
|
||||
};
|
||||
SentMsgTrack _sent_track[SENT_TRACK_SIZE];
|
||||
int _sent_track_idx; // next slot in circular buffer
|
||||
};
|
||||
|
||||
extern MyMesh the_mesh;
|
||||
@@ -612,6 +612,7 @@ void UITask::begin(DisplayDriver* display, SensorManager* sensors, NodePrefs* no
|
||||
void UITask::showAlert(const char* text, int duration_millis) {
|
||||
strcpy(_alert, text);
|
||||
_alert_expiry = millis() + duration_millis;
|
||||
_next_refresh = millis() + 100; // trigger re-render to show updated text
|
||||
}
|
||||
|
||||
void UITask::notify(UIEventType t) {
|
||||
|
||||
@@ -77,7 +77,8 @@ public:
|
||||
void gotoHomeScreen() { setCurrScreen(home); }
|
||||
void gotoChannelScreen(); // Navigate to channel message screen
|
||||
void gotoTextReader(); // *** NEW: Navigate to text reader ***
|
||||
void showAlert(const char* text, int duration_millis);
|
||||
void showAlert(const char* text, int duration_millis) override;
|
||||
void forceRefresh() override { _next_refresh = 100; }
|
||||
int getMsgCount() const { return _msgcount; }
|
||||
bool hasDisplay() const { return _display != NULL; }
|
||||
bool isButtonPressed() const;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user