Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/MessageStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ void MessageStore::clearAllMessages()
resetMessagePool();

#ifdef FSCom
concurrency::LockGuard guard(spiLock);
SafeFile f(filename.c_str(), false);
uint8_t count = 0;
f.write(&count, 1); // write "0 messages"
Expand Down
4 changes: 4 additions & 0 deletions src/mesh/NodeDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "FSCommon.h"
#include "MeshRadio.h"
#include "MeshService.h"
#include "MessageStore.h"
#include "NodeDB.h"
#include "PacketHistory.h"
#include "PowerFSM.h"
Expand Down Expand Up @@ -524,6 +525,9 @@ bool NodeDB::factoryReset(bool eraseBleBonds)
if (transmitHistory) {
transmitHistory->clear();
}
#if HAS_SCREEN
messageStore.clearAllMessages();
#endif
Comment thread
jp-bennett marked this conversation as resolved.
Resolved
// second, install default state (this will deal with the duplicate mac address issue)
installDefaultNodeDatabase();
installDefaultDeviceState();
Expand Down
12 changes: 10 additions & 2 deletions src/modules/CannedMessageModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ void CannedMessageModule::LaunchWithDestination(NodeNum newDest, uint8_t newChan
// Do NOT override explicit broadcast replies
// Only reuse lastDest in LaunchRepeatDestination()

dest = newDest;
if (newDest == 0) {
dest = NODENUM_BROADCAST;
} else {
dest = newDest;
}
channel = newChannel;

lastDest = dest;
Expand Down Expand Up @@ -123,7 +127,11 @@ void CannedMessageModule::LaunchFreetextWithDestination(NodeNum newDest, uint8_t
// Do NOT override explicit broadcast replies
// Only reuse lastDest in LaunchRepeatDestination()

dest = newDest;
if (newDest == 0) {
dest = NODENUM_BROADCAST;
} else {
dest = newDest;
}
channel = newChannel;

lastDest = dest;
Expand Down
2 changes: 2 additions & 0 deletions src/modules/StatusLEDModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ int32_t StatusLEDModule::runOnce()
CHARGE_LED_state = LED_STATE_OFF;
}
}
} else {
CHARGE_LED_state = LED_STATE_OFF;
Comment thread
jp-bennett marked this conversation as resolved.
Resolved
}
// If we want a LED to be dedicated to the simple hearbeat, we can use that instead of the charge LED
#if defined(LED_HEARTBEAT)
Expand Down
4 changes: 3 additions & 1 deletion variants/esp32s3/ELECROW-ThinkNode-M5/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#define BATTERY_PIN 8
#define ADC_CHANNEL ADC1_GPIO8_CHANNEL

#define ADC_MULTIPLIER 2.0 // 2.0 + 10% for correction of display undervoltage.
#define ADC_MULTIPLIER 2.0

#define OCV_ARRAY 4180, 4050, 3990, 3890, 3800, 3720, 3630, 3530, 3420, 3300, 3100

#define PIN_BUZZER 9

Expand Down
Loading