Horus: add receiver number check (#5841)

* add receiver number check for Horus

* find the first free model ID on LONG ENTER

* use the next free model ID for new models

* improve free model ID support for std LCD as well

* fixed “duplicate model”

* fixed ModelsList::isModelIdUnique()
This commit is contained in:
Raphael Coeffic
2018-05-21 19:03:51 +02:00
committed by Bertrand Songis
parent ea898e5122
commit 7379f6064e
16 changed files with 918 additions and 325 deletions
@@ -20,6 +20,7 @@
#include <stdio.h>
#include "opentx.h"
#include "storage/modelslist.h"
#define REFRESH_FILES() do { reusableBuffer.sdmanager.offset = 65535; currentBitmapIndex = -1; } while (0)
#define NODE_TYPE(fname) fname[SD_SCREEN_FILE_LENGTH+1]
@@ -126,6 +127,8 @@ void onSdManagerMenu(const char * result)
}
else if (result == STR_ASSIGN_BITMAP) {
memcpy(g_model.header.bitmap, line, sizeof(g_model.header.bitmap));
if(modelslist.getCurrentModel())
modelslist.getCurrentModel()->resetBuffer();
storageDirty(EE_MODEL);
}
else if (result == STR_ASSIGN_SPLASH) {