- src/Mesh.cpp	Reverted #ifdef ZEPHCORE_COMPANION block → back to vanilla self_id.copyHashTo
- helpers/ContactInfo.h	Removed OUT_PATH_SENT
- helpers/ui-joystick/joystick_defs.h	Added OUT_PATH_SENT here (with comment clarifying it's UI-only)
- helpers/ui-joystick/joystick_ui_task.h	Removed dead _next_batt_refresh field
- helpers/ui-joystick/joystick_ui_task.cpp	Removed _next_batt_refresh(0) from ctor init list
- helpers/ui-joystick/joystick_screens.h	MsgEntry::origin[80]→[32]; MAX_UNREAD_MSGS 32→16
- Kconfig	DOOM help text now lists both UI activation paths
- ARCHITECTURE.md	Same correction in §8.5
This commit is contained in:
liquidraver
2026-05-20 22:53:02 +02:00
parent 781b4f5a33
commit 83f00ab200
8 changed files with 14 additions and 18 deletions
+1 -1
View File
@@ -502,7 +502,7 @@ Non-blocking RTTTL parser on dedicated work queue. Predefined melodies for start
### 8.5 Doom Easter Egg
Wolf3D-style raycaster on OLED: textured walls, 2 enemy types, shooting, HUD. Bypasses CFB, writes directly to display. ~1.7KB RAM, ~5KB flash. Enabled via `CONFIG_ZEPHCORE_EASTER_EGG_DOOM`. Triple-press ENTER on Messages page to activate.
Wolf3D-style raycaster on OLED: textured walls, 2 enemy types, shooting, HUD. Bypasses CFB, writes directly to display. ~1.7KB RAM, ~5KB flash. Enabled via `CONFIG_ZEPHCORE_EASTER_EGG_DOOM`. Button UI: triple-press ENTER on Messages page. Joystick UI: Tools menu → "Doom".
---
+3 -2
View File
@@ -600,8 +600,9 @@ config ZEPHCORE_EASTER_EGG_DOOM
depends on ZEPHCORE_UI_DISPLAY && ZEPHCORE_UI_BUTTONS
help
Hidden easter egg: Wolf3D-style raycaster on the OLED.
Activate with double-click + single-click joystick center
on the first page. Double-click to exit.
Button UI: triple-press ENTER on the Messages page.
Joystick UI: open the Tools menu and select "Doom".
Press BACK/ESC to exit.
Adds ~5KB flash and ~1.7KB RAM when enabled.
config ZEPHCORE_UI_JOYSTICK
-1
View File
@@ -9,7 +9,6 @@
#include <mesh/MeshCore.h>
#define OUT_PATH_UNKNOWN 0xFF
#define OUT_PATH_SENT 0xFE /* local-only marker */
struct ContactInfo {
mesh::Identity id;
@@ -47,3 +47,9 @@
/* List view constants */
#define UI_RECENT_LIST_SIZE 4 /* max items visible in a scrollable list */
/* UI display marker: this MsgEntry/preview slot represents a message
* WE SENT (vs received). Used only inside the joystick UI's stored-message
* structs — never assigned to ContactInfo::out_path_len, never serialized,
* never sent over the air. */
#define OUT_PATH_SENT 0xFE
@@ -376,12 +376,12 @@ class UnreadScreen : public UIScreen {
struct MsgEntry {
uint32_t timestamp;
char origin[80];
char origin[32];
char msg[240];
bool read;
};
static const int MAX_UNREAD_MSGS = 32;
static const int MAX_UNREAD_MSGS = 16;
MsgEntry _entries[MAX_UNREAD_MSGS];
int _entry_count;
int _visible_unread_count;
@@ -175,7 +175,7 @@ JoystickUITask::JoystickUITask()
#endif
_repeater_admin(nullptr), _curr(nullptr),
_next_refresh(0), _auto_off(0), _screen_off_ms(AUTO_OFF_MILLIS),
_next_batt_refresh(0), _cached_batt_mv(0), _battery_display_mode(0),
_cached_batt_mv(0), _battery_display_mode(0),
_brightness(100), _wake_on_msg(true), _ble_connected(false),
_ble_enabled(true), _msgcount(0), _noise_floor(-120),
_pkt_recv(0), _pkt_sent(0), _pkt_errors(0), _alert_expiry(0),
@@ -230,7 +230,6 @@ private:
uint32_t _next_refresh;
uint32_t _auto_off;
uint32_t _screen_off_ms;
uint32_t _next_batt_refresh;
/* State */
uint16_t _cached_batt_mv;
+1 -10
View File
@@ -92,16 +92,7 @@ DispatcherAction Mesh::routeRecvPacket(Packet *packet)
if (packet->isRouteFlood() && !packet->isMarkedDoNotRetransmit()
&& (n + 1)*packet->getPathHashSize() <= MAX_PATH_SIZE && allowPacketForward(packet)) {
// append this node's hash to 'path'
#ifdef ZEPHCORE_COMPANION
uint8_t prefix[4] = {};
/* Avoid confusions while using offgrid mode with real repeaters and force 01 (MOBILE node) */
prefix[0] = 0x01;
memcpy(&packet->path[n * packet->getPathHashSize()],
prefix,
packet->getPathHashSize());
#else
self_id.copyHashTo(&packet->path[n * packet->getPathHashSize()], packet->getPathHashSize());
#endif
self_id.copyHashTo(&packet->path[n * packet->getPathHashSize()], packet->getPathHashSize());
packet->setPathHashCount(n + 1);
uint32_t h = ContentionTracker::computePacketHash32(packet);
_contention.trackRetransmit(h, (uint32_t)_ms->getMillis());