Removing null/Zero padding in model.ini files

More
05 Aug 2019 17:04 #74832 by GeoffS
Is the null/zero padding in the ini files necessary for the TX to use them?

I'm using git to manage changes to my models and it would be much easier to track changes without the null/zeros.

If the TX needs them, I can write a quick import/export utility, but I'd rather avoid it if it's not necessary.

Please Log in or Create an account to join the conversation.

More
08 Aug 2019 03:14 #74840 by hexfet
The filesystem code in deviation cannot create or resize files. If you never make any model file changes on the radio that would result in an attempt to write a larger model file than was allocated in the filesystem there won't be a problem. That's hard to guarantee with all protocols, for example those that add a ground level value in the model for altitude telemetry.

Please share the utility :)

Please Log in or Create an account to join the conversation.

More
08 Aug 2019 18:31 #74844 by GeoffS

hexfet wrote: The filesystem code in deviation cannot create or resize files....


Ah, I knew about the "can't create" but I didn't know about the inability to resize.
That explains the padding.
Many thanks!

I take it the file can get larger/smaller (?) or does it always have to be a fixed size?
(ex. by editing it on a computer and then replacing the file on the SD card)

Someday I really should look at the Deviation code... :unsure:

Please Log in or Create an account to join the conversation.

More
09 Aug 2019 22:28 #74849 by hexfet
You could resize it on the computer, but deviation can't change the size. Don't know what happens on the tx if the file size is not big enough to hold the model file if the tx tries to write it.

Please Log in or Create an account to join the conversation.

More
12 Aug 2019 03:32 #74854 by YJ
You'll start to see that changes to/settings in the main screen section don't get saved, followed by weird trim behavior... basically if the "new" file gets bigger than the original size, whatever at the tail of the file gets chopped off.

I learned this when trying to set up my Blade230S V2 when the file size gets over 4k. I had to pad the file on the computer to a larger size for Deviationtx to work again.

Please Log in or Create an account to join the conversation.

More
13 Aug 2019 17:01 #74869 by GeoffS

YJ wrote: You'll start to see that changes to/settings in the main screen section don't get saved, followed by weird trim behavior... I had to pad the file on the computer to a larger size for Deviationtx to work again.


Thanks for the info.
I'll probably look into write a simple pair of programs that un-pad files for editing and archiving and then re-pad them for upload to the TX.

I think there is an existing utility of managing model files that may already do this (?).

Please Log in or Create an account to join the conversation.

Time to create page: 0.032 seconds
Powered by Kunena Forum