lkaino / Triflight

Triflight flight controller firmware for tricopters
http://rcexplorer.se
GNU General Public License v3.0
49 stars 19 forks source link

Reset I at start of flight tailtune #24

Closed Bengt-M closed 8 years ago

Bengt-M commented 8 years ago

So be in steady hover before turning on tailtune to use this feature. If the copter makes a yaw twist the bench tuning of servo middle was bad. If the servo middle was good you shouldn't notice anything.

I think the flight tailtune quality depends on the bench tuning and wanted a way to verify. Before I had tailtune results around 55. Tested with this feature and saw a small twist. After repeating the bench tuning until I couldn't see any twist I got a tailtune result 139, but I only tested once so far. Maybe just a lucky coincident, maybe not. Please try this.

Bengt-M commented 8 years ago

OK. My first thought was that there is no real problem if the user can learn to just not save. But I remember from the RCE forum that people don't read instructions, so you're right. The user who wants to play with 0 I probably knows better what he's doing and can use other ways.

I think the best place to restore would be in triTailTuneStep, inside the second if, just after tailTune.mode = TT_MODE_NONE. That means the var's cannot be local to a function anymore. Would it be good to put them inside struct tailTune_s?

I think wind is a minor issue when you know what you're doing. You can chose a calm day and you can point it into the assumed wind direction, and you can try different headings. For the people who don't read instructions the question is more if this feature can cause any harm. I don't think so.

Bengt-M commented 8 years ago

When I started this I thought I could see servo mid error this way. Now I understand that I see the sum of mid error and thrust factor error and can't distinguish between them. I still think it's good to run a test without the I term but it's already easy to do using a profile. So I Close this PR.