Nonsense values when using 'Set RC to Param'

I’m having trouble with the ‘Set RC to Param’ feature to control a binary parameter MAV_USEHILGPS. I do the following:

  • Set a radio channel to be ‘PARAM1 tuning channel’ in ‘Radio’ settings
  • Pick the parameter to RC control, and set up its RC to Param settings. I’ve tried a few but scale=1, center=0.5, Min=0, Max=1 seems most appropriate.
  • The parameter then responds to RC control, but not within the set range, for example varying between 0 and 1061624946.
  • When I go back to the RC to Param settings, they’ve changed themselves, for example to center=1065353216, min=2147483648, max=2147483647

Is there any way to make this work correctly?

I’m currently trying something similar and encountered the same problem. The difference is that I added a new parameter, so I have quite a bit of freedom with setting it up. It’s basically a boolean parameter for enable/disable that I want to be able to switch using a 2 state switch on my remote. I tried different values, starting with 0 (diabled) and 1 (enabled), which didn’t really work out. I tried to increase and decrease the upper and lower bounds, also tried to make it symmetrical and then have the center value at zero. But none of that worked completely so far. The only thing that I got to work half way is setting my enable to some high value and leaving disable at 0. Then I can set up param tuning to switch between disable and an unknown state (with a seemingly random number). In any other case, no matter what I enter in the ‘Set RC to Param’ window, it always resets to min=-2147483648, max=2147483647 (upper and lower bound of a 32 bit integer) and a seemingly random center value. So very similar to what the original post stated.

I’m guessing that it’s not really a good practice to switch parameter with two states via remote, but I’d really like to get this to work, so that I can change the parameter in flight. Has anyone ever tried to do this or has experience with the param tuning feature in general?

Sorry to necrobump, but did you ever get this solved?

I want to enable/disable auto-tuning from RC, by mapping a switch via param to MC_AT_TUNE.

I’m also getting INT32_MAX / INT32_MIN or garbage, instead of the values I configured.

The specific garbage value I get when setting the target range to 0…1 is 0x3f800000 in hex, which is seven consecutive high-bits. I’m wondering what might cause this, will dig into the PX4 source code for a bit to investigate.