Model File Utility (Updated)

More
10 Aug 2015 17:55 - 10 Aug 2015 17:56 #36728 by greenfly
Replied by greenfly on topic Model File Utility (Updated)
OK, MonoDevelop is the integrated development environment that I use to build the exe, but it is not the Mono runtime. You need to install the Mono runtime environment by doing a...

sudo apt-get install mono-complete

Let me know if this helps the situation...
Last edit: 10 Aug 2015 17:56 by greenfly. Reason: Formatting

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

More
10 Aug 2015 19:38 #36739 by Richard96816
Replied by Richard96816 on topic Model File Utility (Updated)

greenfly wrote: OK, MonoDevelop is the integrated development environment that I use to build the exe, but it is not the Mono runtime. You need to install the Mono runtime environment by doing a...

sudo apt-get install mono-complete

Let me know if this helps the situation...


Okay. mono-complete installed. Will try it when I get home this evening. Still morning here now.

Although, since it ran, I suspect I may already have the necessary libraries, etc., loaded. Will see ...

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

More
10 Aug 2015 20:14 #36741 by mwm
Replied by mwm on topic Model File Utility (Updated)

greenfly wrote:

mwm wrote: On a more behavioral note, it would be nice if moving the current model - as specified in tx.ini's default section - updated tx.ini to match. Clearing that model should also be dealt with, but I'm not sure how. Maybe just set current_model to some "reasonable" value and warn the user.


I can do this, but I was thinking more generally. I think I would need to actually have a feature to "set the current model" or figure out an appropriate time to check it for validity. I can do it on closing, but it will not work if you un-mount the TX before exiting the utility.


Yeah, I think that would do it. Especially if it let you pick from the set of model names! Possibly a setting to do that automatically if you move or clear the current model so you could get nudged about it when it was appropriate.

Storing the config file in the directory is a non-started on Unix systems. Maybe I just have to put up with wrapping the thing in a shell function, and somehow making the .exe file appear in multiple different config directories. The Mac is in the same boat. From straight.hs:

getConfigDir = (</> dir) <$> getHomeDirectory where
    dir = case os of
            "darwin"  -> "Library/Preferences/straight"
            "mingw32" -> "AppData\\local" </> "straight"
            otherwise -> ".config/straight" -- Unix or Unix-like

"darwin" is the Mac, and "mingw32" is Windows.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

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

More
10 Aug 2015 20:38 #36745 by greenfly
Replied by greenfly on topic Model File Utility (Updated)
@Richard96816, Thanks for your help.

You may want to try the download with this post. I built everything on a clean Trusty box.


File Attachment:

File Name: DebugRelease.zip
File Size:91 KB



@mwm
You may want to build this version for yourself and test what you were asking for.

Mainly, I have added the ability to pass in the location of the config file to use. Simply add the full file spec to the config file you want to use when you run it. What you will want to do is change the BackupPath setting in each config file to unique locations. For instance, in one file....

    <add key="BackupPath" value="/home/joseph/.config/ModelFileManager/Backups/Tx1" />

and then in another config file...

    <add key="BackupPath" value="/home/joseph/.config/ModelFileManager/Backups/Tx2" />

Of course, you can put the config files themselves in the correct place as well. For example...

     /home/joseph/.config/ModelFileManager/tx1.config
     /home/joseph/.config/ModelFileManager/tx2.config
Attachments:

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

More
11 Aug 2015 02:50 #36767 by greenfly
Replied by greenfly on topic Model File Utility (Updated)
Some interesting news... it runs well on a Raspberry Pi!




I just tested the DebugBuild with my Raspberry Pi 2 running Raspbian. Everything worked without a hitch.
Attachments:

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

More
11 Aug 2015 08:44 #36771 by Richard96816
Replied by Richard96816 on topic Model File Utility (Updated)
Okay, it works pretty well. Just not good at telling you why it fails when it does.

Like when there's no more space left on the device. :-)

Too many models, too little space. When I freed up some space on the flash drive things worked fine. More error checking and reporting seems to be in order.

Perhaps the direct approach isn't the best. Write and rename is usually easy and safe. But not when you're frequently bumping limits on the device. Instead: save the changed file to tertiary storage, *delete the original*, then copy the changed version back. Thus trying not to use the radio as temporary storage.

The suggestion may sound like a bit much. But I seem to be running out of space every time I try to work on a model file now. If MFU could do it's thing without expanding storage on the radio even temporarily that would be very helpful.

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

More
11 Aug 2015 14:44 #36777 by greenfly
Replied by greenfly on topic Model File Utility (Updated)
Let me look at what I can do to minimize using space on the transmitter. I'm not sure if it will help that much though because it uses very little to begin with. As for error-checking, there is already an abundant amount in the app. Any error that is encountered should generate the errors.txt file in the EXE directory.

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

More
11 Aug 2015 15:54 #36780 by Richard96816
Replied by Richard96816 on topic Model File Utility (Updated)

greenfly wrote: Let me look at what I can do to minimize using space on the transmitter. I'm not sure if it will help that much though because it uses very little to begin with. As for error-checking, there is already an abundant amount in the app. Any error that is encountered should generate the errors.txt file in the EXE directory.


Yes, it is a tiny amount of space. You could just check the amount of free space before the operation and complain if there isn't enough.

Though reporting that the operation failed due to insufficient space is better than a non-specific message.

It does work nicely. Most appreciated. Great tool.

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

More
11 Aug 2015 17:20 #36792 by greenfly
Replied by greenfly on topic Model File Utility (Updated)
Unfortunately, that is rather tedious to do. I cannot prepare for every contingency, so that is what the error trapping is for. I'm surprised that no exceptions were thrown in your case. I have unsuccessfully tried to duplicate the problem, so it is hard for me to test any solution.

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

More
11 Aug 2015 21:24 #36810 by Richard96816
Replied by Richard96816 on topic Model File Utility (Updated)

greenfly wrote: Unfortunately, that is rather tedious to do. I cannot prepare for every contingency, so that is what the error trapping is for. I'm surprised that no exceptions were thrown in your case. I have unsuccessfully tried to duplicate the problem, so it is hard for me to test any solution.


Sorry, I should have provided a screen shot or two. The error.txt did reference the no space problem. The pop-up error said the operation failed but didn't say why.

Guess I shouldn't do software testing after working out. Sorry about that.

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

More
11 Aug 2015 23:23 #36814 by greenfly
Replied by greenfly on topic Model File Utility (Updated)
It's all good. :cheer:

I think I will change the messages to be more explanatory. At least add the verbiage to look at the errors.txt file.

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

More
14 Aug 2015 04:52 - 14 Aug 2015 04:56 #36867 by greenfly
Replied by greenfly on topic Model File Utility (Updated)
In case someone might prefer the native Windows version, I have left the original post with the Windows-only version of the utility. For anyone else who prefers the cross-platform version, here is the release that can be used on Linux, Windows and Mac OS X.

Please look at the information in the readme.txt about running a Mono based application on your platform.

File Attachment:

File Name: ModelFileManager4.zip
File Size:98 KB


File Attachment:

File Name: readme-2.txt
File Size:6 KB
Attachments:
Last edit: 14 Aug 2015 04:56 by greenfly.

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

More
21 Oct 2015 13:50 #39099 by mwm
Replied by mwm on topic Model File Utility for Android?
Having finally gotten around to getting some OTG cables, I discover that I can access my Devo's from my android phone. Which begs the question:

Can the model file utility be run on Android?

Care to take a shot at porting it there as weell? If so, maybe blog.xamarin.com/porting-existing-net-apps-to-android/ will help. That's the only link I looked at, though.

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

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

More
21 Oct 2015 17:32 - 21 Oct 2015 17:33 #39104 by greenfly
Replied by greenfly on topic Model File Utility for Android?
@mwm... Once again, you have challenged my boundaries... :ohmy:

I have worked in the Android platform as a hobby, but not via the Xamarin toolset. I was learning how to use the standard Android Dev Studio to develop apps in Java. It never occurred to me to port the app to Android, but I can see the convenience of model management in-the-field.

An Android version is possible for devices that support OTG. Sadly, not all do. My Samsung Galaxy S3 does, but my Nexus (2013) tablet does not. Beyond that... the real challenge is re-factoring the code and UI to be an easy to use Android app. I know Xamarin has some magic that lets you build Android apps, but in my experience these tools are usually limited in some way. It will be a lot more than just a re-compile.

Based on that fact, I get concerned when the next version of Deviation may not store the model files in INI files on the transmitter. This really limits the useful things I can do with the tool.
Last edit: 21 Oct 2015 17:33 by greenfly. Reason: Correction

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

More
21 Oct 2015 20:47 #39107 by mwm
Replied by mwm on topic Model File Utility for Android?

greenfly wrote: @mwm... Once again, you have challenged my boundaries... :ohmy:


Always happy to get other people to improve the deviation world!

Based on that fact, I get concerned when the next version of Deviation may not store the model files in INI files on the transmitter. This really limits the useful things I can do with the tool.


That's certainly going to happen to the 7E. Not to the others - they'll have INI files on the Tx. Possibly my boot loader alternative will delay that some.

I think I need a "Why the 7E makes my life miserable even though I don't own one" thread....

Do not ask me questions via PM. Ask in the forums, where I'll answer if I can.

My remotely piloted vehicle ("drone") is a yacht.

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

More
21 Oct 2015 22:52 #39114 by greenfly
Replied by greenfly on topic Model File Utility for Android?

mwm wrote: I think I need a "Why the 7E makes my life miserable even though I don't own one" thread....


I can empathize... even though the only thing I own is a 7E. :silly:

Anyway, if we can get enough interest, I'll consider taking on the task. Like I mentioned I am already interested in developing Android apps and need a first project.

Who else would like to see an Android application for managing model files?

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

More
22 Oct 2015 17:11 - 22 Oct 2015 17:13 #39132 by blackmoon
Replied by blackmoon on topic Model File Utility for Android?

greenfly wrote: Who else would like to see an Android application for managing model files?


I would like to see one :D, btw avast flags your mono version as malware and don't even let me download it. I checked it with virustotal, and only another (unknown to me) virus scanner flagged it, don't know if you wanna bother mentioning that FP to avast.

Based on that fact, I get concerned when the next version of Deviation may not store the model files in INI files on the transmitter. This really limits the useful things I can do with the tool.


I missed this, where was it mentioned, so I can read about what will happen to my .ini files on my beloved 7E. Thx.
Last edit: 22 Oct 2015 17:13 by blackmoon.

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

More
22 Oct 2015 18:28 #39134 by greenfly
Replied by greenfly on topic Model File Utility (Updated)
@Blackmoon - Regardless of what your AV says, the Mono version is not malware. It even includes the source code for the app in the zip.

Anyway, here is where they discuss the next version...

http://www.deviationtx.com/forum/7-development/4651-ini-handler-gone

It seems that only the 7E will lose the INI files....

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

More
22 Oct 2015 18:43 - 22 Oct 2015 18:45 #39135 by blackmoon
Replied by blackmoon on topic Model File Utility (Updated)
I didn't say it was!
Just that avast flags it, the proof that it is a false positive is that on Virustotal site, all but two (avast, and the other is maybe using the same engine) don't flag it, for all the others it is not a malware. I did think you should be aware of it (maybe some mono component is detected, but again false positive), so you could direct people to Virustotal where they can check for themselves. I'll be downloading from my linux box, no AV there.

Thx for the link.
Last edit: 22 Oct 2015 18:45 by blackmoon.

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

More
22 Oct 2015 19:03 #39137 by greenfly
Replied by greenfly on topic Model File Utility (Updated)
Ahh! Sorry, my mistake.
I run Linux mostly, so the whole anti-virus scene is foreign to me.

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

Time to create page: 0.095 seconds
Powered by Kunena Forum