mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 01:05:10 +03:00
Cosmetics
This commit is contained in:
parent
74db396c36
commit
744e3f1ac9
1 changed files with 5 additions and 5 deletions
|
@ -46,7 +46,7 @@ const char * logsOpen()
|
|||
{
|
||||
// Determine and set log file filename
|
||||
FRESULT result;
|
||||
char filename[6 + LEN_MODEL_NAME + 16]; // /LOGS/modelnamexxxxxx_2013-01-01.log
|
||||
char filename[sizeof(LOGS_PATH) + LEN_MODEL_NAME + 16]; // /LOGS/modelnamexxxxxx_2013-01-01.log
|
||||
|
||||
if (!sdMounted())
|
||||
return STR_NO_SDCARD;
|
||||
|
@ -61,13 +61,13 @@ const char * logsOpen()
|
|||
return error;
|
||||
}
|
||||
|
||||
filename[sizeof(LOGS_PATH)-1] = '/';
|
||||
filename[sizeof(LOGS_PATH) - 1] = '/';
|
||||
memcpy(&filename[sizeof(LOGS_PATH)], g_model.header.name, sizeof(g_model.header.name));
|
||||
filename[sizeof(LOGS_PATH)+sizeof(g_model.header.name)] = '\0';
|
||||
filename[sizeof(LOGS_PATH) + LEN_MODEL_NAME] = '\0';
|
||||
|
||||
uint8_t i = sizeof(LOGS_PATH)+sizeof(g_model.header.name)-1;
|
||||
uint8_t i = sizeof(LOGS_PATH) + LEN_MODEL_NAME - 1;
|
||||
uint8_t len = 0;
|
||||
while (i>sizeof(LOGS_PATH)-1) {
|
||||
while (i > sizeof(LOGS_PATH) - 1) {
|
||||
if (!len && filename[i])
|
||||
len = i+1;
|
||||
if (len) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue