Merge pull request #1312 from opentx/projectkk2glider/issue_115

Fixes issue #115
This commit is contained in:
Bertrand Songis
2014-06-19 07:31:03 +02:00
3 changed files with 14 additions and 3 deletions
+6 -1
View File
@@ -582,7 +582,7 @@ const pm_char * eeBackupModel(uint8_t i_fileSrc)
len = i+1;
if (len) {
if (buf[i])
buf[i] = idx2char(buf[i]);
buf[i] = idx2char(buf[i]);
else
buf[i] = '_';
}
@@ -597,6 +597,11 @@ const pm_char * eeBackupModel(uint8_t i_fileSrc)
len = sizeof(MODELS_PATH) + PSIZE(TR_MODEL) + 2;
}
#if defined(RTCLOCK)
char * tmp = strAppendDate(&buf[len], true);
len = tmp - buf;
#endif
strcpy_P(&buf[len], STR_MODELS_EXT);
#ifdef SIMU
+1 -1
View File
@@ -1514,7 +1514,7 @@ union ReusableBuffer
uint16_t eepromfree;
#if defined(SDCARD)
char menu_bss[MENU_MAX_LINES][MENU_LINE_LENGTH];
char mainname[42]; // because reused for SD backup / restore
char mainname[45]; // because reused for SD backup / restore, max backup filename 44 chars: "/MODELS/MODEL0134353-2014-06-19-04-51-27.bin"
#else
char mainname[LEN_MODEL_NAME];
#endif
+7 -1
View File
@@ -39,6 +39,9 @@
#include <fcntl.h>
#include <stdarg.h>
#include <sys/stat.h>
#if defined(RTCLOCK)
#include <time.h>
#endif
#if defined WIN32 || !defined __GNUC__
#include <direct.h>
@@ -352,7 +355,10 @@ void StartMainThread(bool tests)
#endif
g_tmr10ms = 0;
#if defined(RTCLOCK)
g_rtcTime = time(0);
#endif
main_thread_running = (tests ? 1 : 2);
pthread_create(&main_thread_pid, NULL, &main_thread, NULL);
}