Saving/Importing PID configuration

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Saving/Importing PID configuration

Post by kos »

hello,

This feature has been introduced recently, here is the latest revision in sync with the trunk@2012-06-02 :

https://github.com/treymarc/multiwii-conf

Changes :
- no more "you have to use the write to eeprom first" restriction , you can adjust a value and saving to a file without altering the flight controler configuration
- correction for proper error handling (in case you remove your usb drive while saving/importing a file)
- removing unused import (and saving some classLoader memory)

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Saving/Importing PID configuration

Post by kos »

changes :
- confirmation dialog
- error messages displayed in case of errors
- value are preserved when file loading is failing
- checkbox : you can import settings from other multirotor without having your aux settings overwritten

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Saving/Importing PID configuration

Post by Alexinparis »

Hi,
I noticed at least on error: PIDITEMS is now 10

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Saving/Importing PID configuration

Post by kos »

"PIDITEMS = 9 "

in trunk@2012-06-02 file http://multiwii.googlecode.com/svn/trun ... iiConf.pde - is at r826 since Mon May 28 21:18:31 CEST 2012

my fault i was unclear when using the word "trunk" ;)


my changes are in sync with your latest commit to the "stable" branche , they are not in sync with the "shared" .

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Saving/Importing PID configuration

Post by kos »

i check your latest commit there is no impact , my changes could still be merged as is .. if granted to by the project owner, i could do the merge and commit to the multiwii_shared

edit : merged in multiwii_shared

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: Saving/Importing PID configuration

Post by EOSBandi »

Hi Kos,
Could we discuss about the file format that the save/load function is using? I admit that it's quite easy to just dump a property class to an xml file, but the result is quite far from human readable format. I'm proposing a more user friendly format, which eventually can be read and changed by a simple user. It's a little bit more work to implement, but I think it's worth the effort. What do you think ?

My proposal is something like this :

Code: Select all

<?xml version="1.0"?>
<!--MultiWiiWinGUI, Version 1.0.4545.33282-->
<!--MultiWii FC Parameters file-->
<!--MultiWii FC software revision 2.1dev-->
<PARAMETERS>
    <VERSION value="21" />
    <PID id="0" name="Roll" p="42" i="30" d="23" />
    <PID id="1" name="Pitch" p="40" i="30" d="23" />
    <PID id="2" name="Yaw" p="85" i="45" d="0" />
    <PID id="3" name="Altitude" p="16" i="15" d="7" />
    <PID id="4" name="PosHold" p="11" i="2" d="0" />
    <PID id="5" name="PosHoldRate" p="20" i="8" d="45" />
    <PID id="6" name="Navigation Rate" p="14" i="20" d="80" />
    <PID id="7" name="Level" p="70" i="10" d="100" />
    <PID id="8" name="Mag" p="40" i="0" d="0" />
    <PID id="9" name="Velocity" p="0" i="0" d="0" />
    <AUXFUNC id="0" aux1234="0" />
    <AUXFUNC id="1" aux1234="0" />
    <AUXFUNC id="2" aux1234="0" />
    <AUXFUNC id="3" aux1234="0" />
    <AUXFUNC id="4" aux1234="0" />
    <AUXFUNC id="5" aux1234="0" />
    <AUXFUNC id="6" aux1234="0" />
    <AUXFUNC id="7" aux1234="0" />
    <AUXFUNC id="8" aux1234="0" />
    <AUXFUNC id="9" aux1234="0" />
    <AUXFUNC id="10" aux1234="0" />
    <RCRATE value="94" />
    <RCEXPO value="61" />
    <THMID value="51" />
    <THEXPO value="51" />
    <ROLLPITCHRATE value="3" />
    <YAWRATE value="19" />
    <DYNTHRPID value="0" />
    <POWERTRIGGER value="0" />
    <COMMENT value="" />
</PARAMETERS>

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Saving/Importing PID configuration

Post by kos »

xslt is my friend .. any well formated xml will do , what are the possible value for aux1234 ?

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: Saving/Importing PID configuration

Post by EOSBandi »

kos wrote:xslt is my friend .. any well formated xml will do , what are the possible value for aux1234 ?


aux1234 is an unsigned int16; (it's the relevant activation value)

One more question, do we store the pid parameters as they are in the GUI or as they are in the EEPROM ? (4.0 or 40 ?)



Regards,
EOSBAndi

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Saving/Importing PID configuration

Post by kos »

as displayed in the gui .. user editable

User avatar
EOSBandi
Posts: 802
Joined: Sun Jun 19, 2011 11:32 am
Location: Budapest, Hungary
Contact:

Re: Saving/Importing PID configuration

Post by EOSBandi »

kos wrote:as displayed in the gui .. user editable

ok, i'll change my implementation in WinGUI

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Saving/Importing PID configuration

Post by kos »

can you send me several configuration files from your latest gui ?

thanks in advance

edit : all itens, not only the pid :)

User avatar
IceWind
Posts: 115
Joined: Fri Mar 25, 2011 2:11 am
Contact:

Re: Saving/Importing PID configuration

Post by IceWind »

Have you guys reached an agreement in regards to the format?
I'm updating the Android app and I would like to make it use the same as well for the sake of compatibility.
So far I was using a binary format but is no bother to change it to XML.
Thanks.

LenzGr
Posts: 166
Joined: Wed Nov 23, 2011 10:50 am
Location: Hamburg, Germany
Contact:

Re: Saving/Importing PID configuration

Post by LenzGr »

FWIW, I am very happy to see that you guys are collaborating on a cross-GUI format here. Much appreciated!

Post Reply