From e8e72d2e08e7872a5f891796de5c61d1ed314093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nerijus=20Bend=C5=BEi=C5=ABnas?= Date: Tue, 7 Jun 2022 20:55:05 +0300 Subject: [PATCH] Compile when FSCom is not defined (NodeDB.cpp) --- src/mesh/NodeDB.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 47b9d0bc9..ce3d4d04c 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -308,12 +308,12 @@ static const char *channelfile = "/prefs/channels.proto"; /** Load a protobuf from a file, return true for success */ bool loadProto(const char *filename, size_t protoSize, size_t objSize, const pb_msgdesc_t *fields, void *dest_struct) { + bool okay = false; #ifdef FSCom // static DeviceState scratch; We no longer read into a tempbuf because this structure is 15KB of valuable RAM auto f = FSCom.open(filename); - bool okay = false; if (f) { DEBUG_MSG("Loading %s\n", filename); pb_istream_t stream = {&readcb, &f, protoSize}; @@ -367,12 +367,12 @@ void NodeDB::loadFromDisk() /** Save a protobuf from a file, return true for success */ bool saveProto(const char *filename, size_t protoSize, size_t objSize, const pb_msgdesc_t *fields, const void *dest_struct) { + bool okay = false; #ifdef FSCom // static DeviceState scratch; We no longer read into a tempbuf because this structure is 15KB of valuable RAM String filenameTmp = filename; filenameTmp += ".tmp"; auto f = FSCom.open(filenameTmp.c_str(), FILE_O_WRITE); - bool okay = false; if (f) { DEBUG_MSG("Saving %s\n", filename); pb_ostream_t stream = {&writecb, &f, protoSize};