InFlight tuning of Roll and Pitch is only binary?

Hi,
I have followed the instructions here to setup In flight tuning of the roll and pitch P value.
However, when I vary the CH6 potentiometer on my transmitter to set the initial mid-point to begin the testing, in Mission Planner I only see the P value switch from the high limit (0.20) to the low limit (0.08) in a binary fashion rather than in a continuous fashion. For example, when the pot is at the mid position, I would expect the P value to show as being about 0.14, rather than 0.08.

I have checked in the “Radio Calibration” section of Mission Planner that CH6 does vary continuously as I rotate the potentiometer, and it does.

Is there something else that I need to configure or change, as well?

I am running Copter V3.5.3.

Thanks in advance for any advice and assistance …:smile:

http://ardupilot.org/copter/docs/ac_rollpitchtuning.html :

“Note: while you are moving the tuning knob the values update at 3 times per second. The need to press the Refresh button in the mission planner in steps #6 and #7 above is just because the Copter is not sending the updates to the mission planner in real-time.”

Thanks oldgaxer1. I believe that I am getting the updates back into MP in the correct manner.

For example, if I turn the CH6 knob to the minimum position, and then click on “Refresh Screen” in MP, the value of P is displayed as 0.08, which is correct.

If I turn the CH6 knob to the maximum position, and then click on “Refresh Screen” in MP, the value of P is displayed as 0.20, which is also correct.

However, if I turn the CH6 knob to the mid position, and then click on “Refresh Screen” in MP, the value of P is displayed as either 0.20 or 0.08, depending which side of the exact centre the knob is pointing, which is NOT correct. I should see a value of P that is around 0.14. And I should see different values of P displayed depending upon the different positions of the CH6 knob. But I only ever see the end-point values of 0.20 or 0.08.

It looks to me that Copter V3.5.3 is not converting the CH6 knob position to a proportional value between 0.08 and 0.20, but to 0.08 when the knob is anywhere below mid-point and the 0.20 when the knob is anywhere above mid-point?

Must be your radio then. In Flight Tuning has always worked for me.

On that note, why not just use AutoTune and be done with it?

I don’t think that it is my radio as I have verified in the “Radio Calibration” section of Mission Planner that the value of CH6 does vary continuously from about 990 to 1995 as I rotate the potentiometer.

Are you using V3.5.3 and can you confirm that with InFlight Tuning enabled, as you vary the CH6 potentiomer, that you can see the values for P change proportionally?

Given that InFlight Tuning is not working as documented, then it is possible that AutoTune is also not working as documented.

I would like to verify if this is a bug in V3.5.3 before I proceed any further with tuning.

Sure it does, I use the feature all the time with V3.5.3. If its not being used for tuning purposes it’s set to control the WPNav speed parameter. On the Extended Tuning screen of MP you should see it update when you hit the Refresh Screen button.

[quote=“dkemxr, post:7, topic:21567, full:true”]
Sure it does, I use the feature all the time with V3.5.3.[/quote]
I am not sure what you mean - are you confirming that InFlight tuning works fine for you with V3.5.3?

That is the problem that I have - when I hit the Refresh Screen button, I see the value update, but I only ever get the min value (0.08) or the max value (0.20) returned, even when the pot is in the centre when a value near 0.14 should be returned.

Maybe I haven’t explained the problem very clearly, so here is a more detailed explanation of the issue:

With the Pixhawk connected via USB to Mission Planner, in CONFIG/TUNING >> Extended Tuning, I have set CH6 Opt to “Rate Roll/Pitch kP”, I have set the min value to 0.08 and the max value to 0.20, and then clicked on “Write Params”.

With the CH6 knob on the transmitter turned fully CCW, I clicked on “Refresh Screen” and the value of P changed to 0.08 for both Roll and Pitch, which is correct.

With the CH6 knob on the transmitter turned fully CW, I clicked on “Refresh Screen” and the value of P changed to 0.20 for both Roll and Pitch, which is also correct.

So far, so good …

However, when I turn the CH6 knob on the transmitter to the mid-point and click on “Refresh Screen”, the value of P is displayed as 0.20 for both Roll and Pitch. This is not correct as the value displayed should be around 0.14 (the mid-point between 0.08 and 0.20).

If I use the “Radio Calibration” part of MP to check the value of channel 6 as reported by the Pixhawk, it shows as 1500 uS, which is correct (midway between 1000 uS and 2000 uS).

If I rotate the CH6 knob slightly CCW, so that the “Radio Calibration” reports the channel 6 value as 1450 uS, then when I click on “Refresh Screen”, the value of P is displayed as 0.08 for both Roll and Pitch.

It looks like the code behind the CH6 Opt “Rate Roll/Pitch kP” is interpreting the channel 6 signal as a toggle switch (binary values of 0.20 and 0.08) instead of a variable potentiometer with a wide range of possible values?

So, if I tried to use the channel 6 potentiometer to adjust the value of P for pitch and roll while flying the quadcopter, then all I would be able to do is toggle the value of P from 0.20 to 0.08 to 0.20. But, I need to be able to select any value between 0.08 and 0.20.

Either I am doing something really dumb, or this is a bug in the code behind “Rate Roll/Pitch kP” … :slightly_frowning_face:

There is no bug. When I repeat your exact setup I see Rate roll/pitch P tracking the chan 6 pot I assigned it to for the full range.

That is good to know. Now all I have to figure out is what is wrong with my setup, or what am I doing wrong … :open_mouth:

Yes, all works fine in 3.5.3, tested two days ago.

Just checking,because I’ve not done it before now,did you move the pot during the radio calibration ?

I can also verify that In Flight Tuning and AutoTune work. I have tested both functions on 3 separate Pixhawks in three different aircraft.

Yes, that is required…

Success, at last … :grinning:

The clue was radio calibration.

When I conducted the initial radio calibration, channel 6 had nothing connected to it in the transmitter. After I had configured channel 6 to be a pot in the transmitter, and although a check of the “Radio Calibration” screen in Mission Planner showed that Radio 6 green bar moved back and forth as the CH6 pot was rotated, ArduPilot still treated that signal as a switch (the default value?) and hence the binary results that I was seeing.

Now that I have run the Radio Calibration again, ArduPilot knows there is a pot connected to channel 6 and the InFlight tuning values change in direct response to the channel 6 potentiomer position …

Thank you to everyone who persevered with me - it was something dumb that I was doing, or hadn’t done … :roll_eyes: