1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-22 07:45:14 +03:00

Trims to Offsets re-implemented (still untested)

FrSky flash saving
This commit is contained in:
bsongis 2012-03-27 17:56:43 +00:00
parent ee1bd73788
commit 2acfb7df3d
15 changed files with 854 additions and 1773 deletions

View file

@ -296,7 +296,6 @@ void EFile::rm(uint8_t i_fileId)
EeFsFlushDirEnt(i_fileId);
if (i) EeFsFree(i); //chain in
s_sync_write = false;
}
uint16_t EFile::size()
@ -710,7 +709,7 @@ void eeLoadModel(uint8_t id)
}
#endif
if (sz == 0) {
if (sz < 256) {
// alert("Error Loading Model");
modelDefault(id);
eeCheck(true);
@ -725,17 +724,6 @@ void eeLoadModel(uint8_t id)
}
}
int8_t eeFindEmptyModel(uint8_t id, bool down)
{
int8_t i = id;
for (;;) {
i = (MAX_MODELS + (down ? i+1 : i-1)) % MAX_MODELS;
if (!EFile::exists(FILE_MODEL(i))) break;
if (i == id) return -1; // no free space in directory left
}
return i;
}
void eeReadAll()
{
if(!EeFsOpen() ||