Added EEPROM conversions to YAML
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
#include <string.h>
|
||||
#include "opentx.h"
|
||||
#include "../timers.h"
|
||||
|
||||
#include "storage/eeprom_common.h"
|
||||
#include "storage/eeprom_rlc.h"
|
||||
#include "conversions/conversions.h"
|
||||
|
||||
uint8_t s_write_err = 0; // error reasons
|
||||
@@ -154,6 +157,7 @@ void eepromCheck()
|
||||
ENABLE_SYNC_WRITE(false);
|
||||
}
|
||||
|
||||
#if !defined(SDCARD_RAW) && !defined(SDCARD_YAML)
|
||||
void storageFormat()
|
||||
{
|
||||
ENABLE_SYNC_WRITE(true);
|
||||
@@ -179,6 +183,7 @@ void storageFormat()
|
||||
|
||||
ENABLE_SYNC_WRITE(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool eepromOpen()
|
||||
{
|
||||
@@ -444,7 +449,7 @@ bool RlcFile::copy(uint8_t i_fileDst, uint8_t i_fileSrc)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(SDCARD)
|
||||
#if defined(SDCARD) && !defined(SDCARD_RAW) && !defined(SDCARD_YAML)
|
||||
const char * eeBackupModel(uint8_t i_fileSrc)
|
||||
{
|
||||
char * buf = reusableBuffer.modelsel.mainname;
|
||||
@@ -827,11 +832,16 @@ void eeLoadModelName(uint8_t id, char *name)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(SDCARD_RAW) || defined(SDCARD_YAML)
|
||||
bool eeModelExistsRlc(uint8_t id)
|
||||
#else
|
||||
bool eeModelExists(uint8_t id)
|
||||
#endif
|
||||
{
|
||||
return EFile::exists(FILE_MODEL(id));
|
||||
}
|
||||
|
||||
#if !defined(SDCARD_RAW) && !defined(SDCARD_YAML)
|
||||
void storageCheck(bool immediately)
|
||||
{
|
||||
if (immediately) {
|
||||
@@ -851,6 +861,7 @@ void storageCheck(bool immediately)
|
||||
theFile.writeRlc(FILE_MODEL(g_eeGeneral.currModel), FILE_TYP_MODEL, (uint8_t*)&g_model, sizeof(g_model), immediately);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void eeLoadModelHeader(uint8_t id, ModelHeader *header)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user