Max number of models
- FDR
- Offline
Less
More
07 Feb 2017 11:42 #58869
by FDR
I suppose that this timeout is the watchdog, isn't it?
What if we were reseting that in the file read cycle?
Replied by FDR on topic Max number of models
If I got it right, the reboot happens on other transmitters as well, if there are mode then 200 model files.Moeder wrote: This would for sure not fit on the 7e.
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
I suppose that this timeout is the watchdog, isn't it?
What if we were reseting that in the file read cycle?
Please Log in or Create an account to join the conversation.
- FDR
- Offline
07 Feb 2017 11:56 #58871
by FDR
Replied by FDR on topic Max number of models
That would be a call to CLOCK_ResetWatchdog() if I'm not mistaken...
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
Less
More
- Posts: 3333
07 Feb 2017 17:25 #58877
by vlad_vy
Replied by vlad_vy on topic Max number of models
At any case files check by FS_ReadDir(filename) doesn't work. It looks like files are unsorted.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
07 Feb 2017 20:06 #58880
by FDR
Replied by FDR on topic Max number of models
The model_count works fine with CLOCK_ResetWatchdog().
I could load the model220.ini, changed and saved it, and could reload after that without rebooting.
Pull request is sent...
I could load the model220.ini, changed and saved it, and could reload after that without rebooting.
Pull request is sent...
Please Log in or Create an account to join the conversation.
- FDR
- Offline
07 Feb 2017 20:19 #58881
by FDR
Replied by FDR on topic Max number of models
...and merged, so it will be in the next nightly.
Please Log in or Create an account to join the conversation.
- vlad_vy
- Offline
Less
More
- Posts: 3333
08 Feb 2017 07:11 - 08 Feb 2017 07:29 #58901
by vlad_vy
Replied by vlad_vy on topic Max number of models
It works, but I'm in doubt that number of models can be 255: guiObject_t *GUI_CreateScrollable(guiScrollable_t *scrollable, u16 x, u16 y, u16 width, u16 height, u8 row_height, u8 item_count, ...
layouts + models <=255 and u8 total_items but not u16 total_items
For example, I have 7 layouts, so for me max number of models can be <= 248. For safety, will be better limit number of models to 200.
...
case LOAD_LAYOUT:
selected = count_files("layout", ".ini", "default.ini");
mp->file_state = mp->total_items;
mp->total_items += model_count();
break;
...
struct model_page {
char iconstr[24];
char fixed_id[7];
u8 file_state;
u8 last_mixermode;
u8 last_txpower;
/*Load save */
u16 total_items;
u8 menu_type;
enum ModelType modeltype;
};
layouts + models <=255 and u8 total_items but not u16 total_items
For example, I have 7 layouts, so for me max number of models can be <= 248. For safety, will be better limit number of models to 200.
Last edit: 08 Feb 2017 07:29 by vlad_vy.
Please Log in or Create an account to join the conversation.
- FDR
- Offline
08 Feb 2017 10:10 #58916
by FDR
Replied by FDR on topic Max number of models
Yes, ATM it only works if the layouts + models <= 255, but usually we only have a few layouts.
However I wonder why doesn't the compiler give a warning when we supply an integer to a u8 parameter?!
However I wonder why doesn't the compiler give a warning when we supply an integer to a u8 parameter?!
Please Log in or Create an account to join the conversation.
- Sero
- Topic Author
- Offline
- RC-addicted
Less
More
- Posts: 106
12 Feb 2017 15:43 #59092
by Sero
A day without flying can't be called a day.
Replied by Sero on topic Max number of models
I'd like to say a biiig thank you to all the great people involved! Now my next problem is, what to get next, so bloody many choices
A day without flying can't be called a day.
Please Log in or Create an account to join the conversation.
Time to create page: 0.159 seconds
- Home
- Forum
- General
- General Discussions
- Max number of models