mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-04 14:15:53 +00:00
Compare commits
No commits in common. "d1f7739bbea229049ac92d32022888fbd8b8e382" and "3b40fe9805041a69381442bce1b2273bdd91b99d" have entirely different histories.
d1f7739bbe
...
3b40fe9805
@ -4,7 +4,7 @@ platform = platformio/nordicnrf52@^10.7.0
|
|||||||
extends = arduino_base
|
extends = arduino_base
|
||||||
platform_packages =
|
platform_packages =
|
||||||
; our custom Git version until they merge our PR
|
; our custom Git version until they merge our PR
|
||||||
framework-arduinoadafruitnrf52 @ https://github.com/meshtastic/Adafruit_nRF52_Arduino.git#e13f5820002a4fb2a5e6754b42ace185277e5adf
|
framework-arduinoadafruitnrf52 @ https://github.com/geeksville/Adafruit_nRF52_Arduino.git
|
||||||
toolchain-gccarmnoneeabi@~1.90301.0
|
toolchain-gccarmnoneeabi@~1.90301.0
|
||||||
|
|
||||||
build_type = debug
|
build_type = debug
|
||||||
|
@ -8,8 +8,9 @@ static File openFile(const char *filename, bool fullAtomic)
|
|||||||
concurrency::LockGuard g(spiLock);
|
concurrency::LockGuard g(spiLock);
|
||||||
LOG_DEBUG("Opening %s, fullAtomic=%d", filename, fullAtomic);
|
LOG_DEBUG("Opening %s, fullAtomic=%d", filename, fullAtomic);
|
||||||
#ifdef ARCH_NRF52
|
#ifdef ARCH_NRF52
|
||||||
FSCom.remove(filename);
|
File file = FSCom.open(filename, FILE_O_WRITE);
|
||||||
return FSCom.open(filename, FILE_O_WRITE);
|
file.seek(0);
|
||||||
|
return file;
|
||||||
#endif
|
#endif
|
||||||
if (!fullAtomic)
|
if (!fullAtomic)
|
||||||
FSCom.remove(filename); // Nuke the old file to make space (ignore if it !exists)
|
FSCom.remove(filename); // Nuke the old file to make space (ignore if it !exists)
|
||||||
@ -58,6 +59,9 @@ bool SafeFile::close()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
spiLock->lock();
|
spiLock->lock();
|
||||||
|
#ifdef ARCH_NRF52
|
||||||
|
f.truncate();
|
||||||
|
#endif
|
||||||
f.close();
|
f.close();
|
||||||
spiLock->unlock();
|
spiLock->unlock();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user