Git commit ID added to stamp

Fixes #2921: getValue() now also returns pilot position
Fixes #3062: Close any Lua open files when radio powers off
Fixes #3095: Lua string library added (only 6k bytes of flash used)
Re #3095: luaGetVersion() also returns version as numbers
(Ported from master 7ef790d3..4d0bd14ad and squashed into one commit)
This commit is contained in:
Damjan Adamic
2015-11-25 18:00:44 +01:00
parent 7e6dc610ac
commit 7538fcfb51
11 changed files with 87 additions and 41 deletions
+4 -3
View File
@@ -845,7 +845,7 @@ FRESULT f_open (FIL * fil, const TCHAR *name, BYTE flag)
fil->fs = (FATFS*)fopen(realPath, (flag & FA_WRITE) ? ((flag & FA_CREATE_ALWAYS) ? "wb+" : "ab+") : "rb+");
fil->fptr = 0;
if (fil->fs) {
TRACE("f_open(%s, %x) = %p", path, flag, (FILE*)fil->fs);
TRACE("f_open(%s, %x) = %p (FIL %p)", path, flag, fil->fs, fil);
return FR_OK;
}
TRACE("f_open(%s) = error %d (%s)", path, errno, strerror(errno));
@@ -894,8 +894,9 @@ UINT f_size(FIL* fil)
FRESULT f_close (FIL * fil)
{
if (fil && fil->fs) {
TRACE("f_close(%p)", (FILE*)fil->fs);
assert(fil);
TRACE("f_close(%p) (FIL:%p)", fil->fs, fil);
if (fil->fs) {
fclose((FILE*)fil->fs);
fil->fs = NULL;
}