mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-19 16:29:31 +00:00
Compare commits
No commits in common. "f9c8434529e4b75db5061dfbe0bad1b1de0fb7c1" and "a3bc029700055cca56f678bf1ad9f71456b8afb2" have entirely different histories.
f9c8434529
...
a3bc029700
@ -328,14 +328,14 @@ void listDir(const char *dirname, uint8_t levels, bool del)
|
||||
void rmDir(const char *dirname)
|
||||
{
|
||||
#ifdef FSCom
|
||||
|
||||
spiLock->lock();
|
||||
#if (defined(ARCH_ESP32) || defined(ARCH_RP2040) || defined(ARCH_PORTDUINO))
|
||||
listDir(dirname, 10, true);
|
||||
#elif defined(ARCH_NRF52)
|
||||
// nRF52 implementation of LittleFS has a recursive delete function
|
||||
FSCom.rmdir_r(dirname);
|
||||
#endif
|
||||
|
||||
spiLock->unlock();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -361,8 +361,6 @@ void setup()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
initSPI();
|
||||
|
||||
OSThread::setup();
|
||||
|
||||
ledPeriodic = new Periodic("Blink", ledBlinker);
|
||||
@ -647,6 +645,8 @@ void setup()
|
||||
rp2040Setup();
|
||||
#endif
|
||||
|
||||
initSPI(); // needed here before reading from littleFS
|
||||
|
||||
// We do this as early as possible because this loads preferences from flash
|
||||
// but we need to do this after main cpu init (esp32setup), because we need the random seed set
|
||||
nodeDB = new NodeDB;
|
||||
|
@ -352,9 +352,8 @@ bool NodeDB::factoryReset(bool eraseBleBonds)
|
||||
{
|
||||
LOG_INFO("Perform factory reset!");
|
||||
// first, remove the "/prefs" (this removes most prefs)
|
||||
spiLock->lock();
|
||||
rmDir("/prefs"); // this uses spilock internally...
|
||||
|
||||
spiLock->lock();
|
||||
#ifdef FSCom
|
||||
if (FSCom.exists("/static/rangetest.csv") && !FSCom.remove("/static/rangetest.csv")) {
|
||||
LOG_ERROR("Could not remove rangetest.csv file");
|
||||
|
Loading…
Reference in New Issue
Block a user