- add storage for ringtone

- Refactor file load and save
- fix a size error in Canned Messages
This commit is contained in:
Thomas Göttgens
2022-12-29 16:53:36 +01:00
parent 1a949b7ca6
commit 3c5710e65b
5 changed files with 81 additions and 12 deletions

View File

@@ -367,7 +367,7 @@ static const char *oemConfigFile = "/oem/oem.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 NodeDB::loadProto(const char *filename, size_t protoSize, size_t objSize, const pb_msgdesc_t *fields, void *dest_struct)
{
bool okay = false;
#ifdef FSCom
@@ -450,7 +450,7 @@ void NodeDB::loadFromDisk()
}
/** Save a protobuf from a file, return true for success */
bool saveProto(const char *filename, size_t protoSize, const pb_msgdesc_t *fields, const void *dest_struct)
bool NodeDB::saveProto(const char *filename, size_t protoSize, const pb_msgdesc_t *fields, const void *dest_struct)
{
bool okay = false;
#ifdef FSCom