jevermeister wrote:I am happy you are joining us.
Nils, my pleasure. I got bored with the current level tuning procedure lately. I read you are close to submitting your version to _shared. So bear with me if what I write has been thought through before (I am late and maybe just catching up).
1. You are right: I compute the offset to the current ideal position and safe it to eeprom.
2. I use acro mode to find the perfect function because I use the failsafe to trigger the offsetmeasurement. I did this to avoid using aux and block other functions.
Problem is: my Aux1 is: OFF, ARM+ACRO ARM+HOVER.
Leveling out in Acromode is pretty easy but I can try your way too. Either use failsafe trigger or an aux switch.
For me, I almost always fly in level and that is when I want this learn-level function.
- writing to eeprom should be done while on the ground, sometimes the cicletime increases drastically and you might crash...
yes, writing to eeprom is slow. You could drastically reduce time required if you only wrote the relevant 4 (?) bytes. Not sure how to compute the relevant offfsets into eeprom.
Can you descirbe you last statement reagird the wind for stupid people like me

.
I thought of flying in windy conditions. To hover stationary, you have to apply some nick/roll constantly. Provided you can keep heading, you could learn-level the neccessary tilt angles by pressing that tx button and from then on use that as your new level-values (and not have to fight the wind as long as you head in same direction)
Let me ramble on and offload some thoughts:
you do use the angle trims for this, right?
Just a thought, we could instead read the deltas for rx-inputs from midrc for yaw,nick,roll. Not sure how that would differ.
Second:
About using the new learnt offsets right after pressing the tx-button:
- need to find a good time for writing to eeprom, or maybe not if it is easy enough to do during flight
- after having learnt the new offsets (either for angles or rx-inputs); should these be applied right after that? Beware, the pilot still gives some tx-input for nick&roll like before; but that is not required anymore -> copter shoots in that direction; maybe not good.
But maybe not too bad, if the original tilts wer not too extreme. So a good idea to instantly use the new learnt offsets.
I would like to have the system learn the yaw value delta from midrc the same way. For TRIs I have made the servo midpoint value a configurable item already (via LCDconfig).
About how to trigger the learning of the offsets to level :
the procedure you have described earlier using failsafe sounds kinda scary to me. It is so contra to usual flight behaviour. I think having an auxN button/switch is much more following the usual user experience. Again, using an auxN switch brings up a question: detect the change of this auxN state and do the learn-level thing once and from then on ignore the auxN status? Or start learning constantly and take the last (averaged?) values before the auxN state is left again?
aux buttons - we are short on those always. So the sequence you described would help with that.
My expectation on a use case would be:
1. fly as much as I want, then fly level (in acro or level mode) and suddenly decide 'want to learn this as level'
2. hit button/flick switch (or trigger another way, but stick combos are no-go during flight)
3. at that moment of positive ramp up of signal take offsets
4. use learnt offset from that moment on (yes, if flying in level mode, expect some unwanted movement before pilot moves sticks back to center)
5. ignore auxN from then on (unless switched off and on again - new positive ramp up)
6. at disarm, write offsets to eeprom
7. if you know you made mistake/do not like the level offsets, then do calib acc; it zeroes out the acc trim values.
What do you think?