mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 18:22:32 +00:00
Build fail fix
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
#include "MessageStore.h"
|
#include "configuration.h"
|
||||||
|
#if HAS_SCREEN
|
||||||
#include "FSCommon.h"
|
#include "FSCommon.h"
|
||||||
|
#include "MessageStore.h"
|
||||||
#include "NodeDB.h"
|
#include "NodeDB.h"
|
||||||
#include "SPILock.h"
|
#include "SPILock.h"
|
||||||
#include "SafeFile.h"
|
#include "SafeFile.h"
|
||||||
#include "configuration.h"
|
|
||||||
#include "gps/RTC.h"
|
#include "gps/RTC.h"
|
||||||
#include "graphics/draw/MessageRenderer.h"
|
#include "graphics/draw/MessageRenderer.h"
|
||||||
|
|
||||||
@@ -132,6 +133,7 @@ void MessageStore::addFromString(uint32_t sender, uint8_t channelIndex, const st
|
|||||||
addLiveMessage(sm);
|
addLiveMessage(sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if ENABLE_MESSAGE_PERSISTENCE
|
||||||
// Save RAM queue to flash (called on shutdown)
|
// Save RAM queue to flash (called on shutdown)
|
||||||
void MessageStore::saveToFlash()
|
void MessageStore::saveToFlash()
|
||||||
{
|
{
|
||||||
@@ -250,6 +252,11 @@ void MessageStore::loadFromFlash()
|
|||||||
logMemoryUsage("loadFromFlash");
|
logMemoryUsage("loadFromFlash");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// Persistence disabled (saves flash space)
|
||||||
|
void MessageStore::saveToFlash() {}
|
||||||
|
void MessageStore::loadFromFlash() {}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Clear all messages (RAM + persisted queue)
|
// Clear all messages (RAM + persisted queue)
|
||||||
void MessageStore::clearAllMessages()
|
void MessageStore::clearAllMessages()
|
||||||
@@ -392,3 +399,4 @@ void MessageStore::upgradeBootRelativeTimestamps()
|
|||||||
|
|
||||||
// Global definition
|
// Global definition
|
||||||
MessageStore messageStore("default");
|
MessageStore messageStore("default");
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,4 +1,17 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if HAS_SCREEN
|
||||||
|
|
||||||
|
// Disable debug logging entirely on release builds
|
||||||
|
#if !defined(DEBUG)
|
||||||
|
#define LOG_DEBUG(...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Disable message persistence to flash if you’re short on space
|
||||||
|
#ifndef ENABLE_MESSAGE_PERSISTENCE
|
||||||
|
#define ENABLE_MESSAGE_PERSISTENCE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "mesh/generated/meshtastic/mesh.pb.h"
|
#include "mesh/generated/meshtastic/mesh.pb.h"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
@@ -101,3 +114,5 @@ class MessageStore
|
|||||||
|
|
||||||
// Global instance (defined in MessageStore.cpp)
|
// Global instance (defined in MessageStore.cpp)
|
||||||
extern MessageStore messageStore;
|
extern MessageStore messageStore;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -758,9 +758,9 @@ void Power::shutdown()
|
|||||||
playShutdownMelody();
|
playShutdownMelody();
|
||||||
#endif
|
#endif
|
||||||
nodeDB->saveToDisk();
|
nodeDB->saveToDisk();
|
||||||
// === Save live messages before powering off ===
|
#if HAS_SCREEN
|
||||||
messageStore.saveToFlash();
|
messageStore.saveToFlash();
|
||||||
|
#endif
|
||||||
#if defined(ARCH_NRF52) || defined(ARCH_ESP32) || defined(ARCH_RP2040)
|
#if defined(ARCH_NRF52) || defined(ARCH_ESP32) || defined(ARCH_RP2040)
|
||||||
#ifdef PIN_LED1
|
#ifdef PIN_LED1
|
||||||
ledOff(PIN_LED1);
|
ledOff(PIN_LED1);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "MessageStore.h" // for StoredMessage
|
#include "MessageStore.h" // for StoredMessage
|
||||||
|
#if HAS_SCREEN
|
||||||
#include "OLEDDisplay.h"
|
#include "OLEDDisplay.h"
|
||||||
#include "OLEDDisplayUi.h"
|
#include "OLEDDisplayUi.h"
|
||||||
#include "graphics/emotes.h"
|
#include "graphics/emotes.h"
|
||||||
@@ -60,3 +61,4 @@ void handleNewMessage(const StoredMessage &sm, const meshtastic_MeshPacket &pack
|
|||||||
|
|
||||||
} // namespace MessageRenderer
|
} // namespace MessageRenderer
|
||||||
} // namespace graphics
|
} // namespace graphics
|
||||||
|
#endif
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#if HAS_SCREEN
|
|
||||||
|
|
||||||
|
#if HAS_SCREEN
|
||||||
#include "DisplayFormatters.h"
|
#include "DisplayFormatters.h"
|
||||||
#include "NodeDB.h"
|
#include "NodeDB.h"
|
||||||
#include "NotificationRenderer.h"
|
#include "NotificationRenderer.h"
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
#include "SystemCommandsModule.h"
|
#include "SystemCommandsModule.h"
|
||||||
#include "meshUtils.h"
|
#include "meshUtils.h"
|
||||||
|
|
||||||
#if HAS_SCREEN
|
#if HAS_SCREEN
|
||||||
|
#include "MessageStore.h"
|
||||||
#include "graphics/Screen.h"
|
#include "graphics/Screen.h"
|
||||||
#include "graphics/SharedUIDisplay.h"
|
#include "graphics/SharedUIDisplay.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "GPS.h"
|
#include "GPS.h"
|
||||||
#include "MeshService.h"
|
#include "MeshService.h"
|
||||||
#include "MessageStore.h"
|
|
||||||
#include "Module.h"
|
#include "Module.h"
|
||||||
#include "NodeDB.h"
|
#include "NodeDB.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
@@ -78,7 +80,9 @@ int SystemCommandsModule::handleInputEvent(const InputEvent *event)
|
|||||||
case INPUT_BROKER_MSG_REBOOT:
|
case INPUT_BROKER_MSG_REBOOT:
|
||||||
IF_SCREEN(screen->showSimpleBanner("Rebooting...", 0));
|
IF_SCREEN(screen->showSimpleBanner("Rebooting...", 0));
|
||||||
nodeDB->saveToDisk();
|
nodeDB->saveToDisk();
|
||||||
|
#if HAS_SCREEN
|
||||||
messageStore.saveToFlash();
|
messageStore.saveToFlash();
|
||||||
|
#endif
|
||||||
rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;
|
rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;
|
||||||
// runState = CANNED_MESSAGE_RUN_STATE_INACTIVE;
|
// runState = CANNED_MESSAGE_RUN_STATE_INACTIVE;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
#include "graphics/Screen.h"
|
#include "graphics/Screen.h"
|
||||||
#include "graphics/draw/MessageRenderer.h"
|
#include "graphics/draw/MessageRenderer.h"
|
||||||
|
|
||||||
TextMessageModule *textMessageModule;
|
TextMessageModule *textMessageModule;
|
||||||
|
|
||||||
ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp)
|
ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp)
|
||||||
@@ -20,10 +19,10 @@ ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp
|
|||||||
// We only store/display messages destined for us.
|
// We only store/display messages destined for us.
|
||||||
devicestate.rx_text_message = mp;
|
devicestate.rx_text_message = mp;
|
||||||
devicestate.has_rx_text_message = true;
|
devicestate.has_rx_text_message = true;
|
||||||
|
#if HAS_SCREEN
|
||||||
// Store in the central message history
|
// Store in the central message history
|
||||||
const StoredMessage &sm = messageStore.addFromPacket(mp);
|
const StoredMessage &sm = messageStore.addFromPacket(mp);
|
||||||
#if HAS_SCREEN
|
|
||||||
// Pass message to renderer (banner + thread switching + scroll reset)
|
// Pass message to renderer (banner + thread switching + scroll reset)
|
||||||
graphics::MessageRenderer::handleNewMessage(sm, mp);
|
graphics::MessageRenderer::handleNewMessage(sm, mp);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ build_flags = ${heltec_mesh_solar_base.build_flags}
|
|||||||
-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates
|
-DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates
|
||||||
-DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
-DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached.
|
||||||
-DEINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting"
|
-DEINK_HASQUIRK_GHOSTING ; Display model is identified as "prone to ghosting"
|
||||||
|
-DENABLE_MESSAGE_PERSISTENCE=0 ; isable flash persistence for space-limited build
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${heltec_mesh_solar_base.lib_deps}
|
${heltec_mesh_solar_base.lib_deps}
|
||||||
https://github.com/meshtastic/GxEPD2/archive/a05c11c02862624266b61599b0d6ba93e33c6f24.zip
|
https://github.com/meshtastic/GxEPD2/archive/a05c11c02862624266b61599b0d6ba93e33c6f24.zip
|
||||||
|
|||||||
Reference in New Issue
Block a user