- Posts: 106
Max number of models
- Sero
- Topic Author
- Offline
- RC-addicted
A day without flying can't be called a day.
Please Log in or Create an account to join the conversation.
- HappyHarry
- Offline
- Posts: 1136
Please Log in or Create an account to join the conversation.
- Arnold
- Offline
- Posts: 304
Sero wrote: What is the maximal number of models that can be stored on a Devo 6s? ...
The Deviation User Manual, in the Overview section says,
Deviation can store up to 255 different models ...
This can be limited by storage space available on the radio and the sizes of the various model configuration files being stored.
Too many hobbies & too many Devos!
Who knows where the time goes?
Please Log in or Create an account to join the conversation.
- Sero
- Topic Author
- Offline
- RC-addicted
- Posts: 106
A day without flying can't be called a day.
Please Log in or Create an account to join the conversation.
- Arnold
- Offline
- Posts: 304
If that fails, I think my last resort would be to format the Devo (using the installation tool of your choice - not by using the computer's tools) and reinstall deviation.
* It should be obvious that you would want to back up those items on the radio that you want to be sure to save. *
Too many hobbies & too many Devos!
Who knows where the time goes?
Please Log in or Create an account to join the conversation.
- Sero
- Topic Author
- Offline
- RC-addicted
- Posts: 106
A day without flying can't be called a day.
Please Log in or Create an account to join the conversation.
- Arnold
- Offline
- Posts: 304
Lucky guy!
Too many hobbies & too many Devos!
Who knows where the time goes?
Please Log in or Create an account to join the conversation.
- hexfet
- Away
- Posts: 1892
Can't get the test build upload link to work. A devo6 dfu is attached.
Please Log in or Create an account to join the conversation.
- Fernandez
- Offline
- Posts: 983
Please Log in or Create an account to join the conversation.
- FDR
- Offline
hexfet wrote: Can't get the test build upload link to work. A devo6 dfu is attached.
Would you try to upload it again?
PB has fixed the upload:
the user-upload code should auto-update, but if it does not, download the latest copy manually. you need 0.9.6
Please Log in or Create an account to join the conversation.
- hexfet
- Away
- Posts: 1892
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
Problems:
1. I think that model_count() function work too slow with large number of models and we get reboot by timeout.
2. We can't have 255 model limit, since main screen "Layout" templates list show templates and models: templates + models <=255. More real models limit will be about 200.
If change num_models = model_count(); to num_models = count_files("models", ".ini", NULL) - 1;, it work well, but it's not strict verification: we can skip model files, have arbitrary names and so on.
I think will be better to revert commit "Increase maximum number of model files from 100 to 255".
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
int model_count()
{
int num_models = count_files("models", ".ini", NULL) - 1;
if(num_models > 200)
num_models = 200;
//check if model file is missing or >200 model files
sprintf(tempstring, "models/model%d.ini", num_models + 1);
if (fexists(tempstring))
num_models = 0;
return num_models;
}
It doesn't check/verify every model file, but missing model files and >200 model files only. In such case user will get empty models list. It work fine with any number of model files (<= 255).
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Have you tried if the "fexists" is faster then the "fopen/fclose" was in the original implementation?
Like this:
int model_count()
{
int num_models;
for (num_models = 1; num_models <= 255; num_models++) {
sprintf(tempstring, "models/model%d.ini", num_models);
if (fexists(tempstring))
break;
}
num_models--;
return num_models;
}
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
I've tested with missing file, it works but can't be saved. With check, if any model file skipped you will get empty models list.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
- Posts: 3333
int model_count()
{
int num_models = 0;
if (FS_OpenDir("models")) {
char filename[13];
int type;
while((type = FS_ReadDir(filename)) != 0) {
if (type == 1 && strncasecmp(filename + strlen(filename) - 4, ".ini", 4) == 0) {
if(strncasecmp(filename, "default.ini", 11) != 0) {
num_models++;
sprintf(tempstring, "model%03d.ini", num_models);
if(strncasecmp(filename, tempstring, 12) != 0) {
num_models--;
break;
}
if(num_models >= 200) {
num_models = 200;
break;
}
}
}
}
FS_CloseDir();
}
return num_models;
}
Please Log in or Create an account to join the conversation.
- FDR
- Offline
Please Log in or Create an account to join the conversation.
- Fernandez
- Offline
- Posts: 983
also usefull if we could add annotation in the label. Model001_SuperCP_Walkera etc,
would make way more easy to find and or exchange model files.
Please Log in or Create an account to join the conversation.
- Moeder
- Offline
- Posts: 796
Vlad,just make the code change to 255 an option not available on 7e...I'd say any user with 100+ models won't stick with a 7e
Please Log in or Create an account to join the conversation.
- FDR
- Offline
The minimalist filesystem used in deviation can't create, copy or rename files, only can use the existing ones, that's why they are named as modelXX.ini...Fernandez wrote: if we can group models, or store in folders would that help? That way can keep more organized, go to heli >select the heli.
also usefull if we could add annotation in the label. Model001_SuperCP_Walkera etc,
would make way more easy to find and or exchange model files.
Please Log in or Create an account to join the conversation.
- Home
- Forum
- General
- General Discussions
- Max number of models