In the “rc.mc_defaults” file that sets the default parameters for multicopters, the PWM_MIN and PWM_MAX values seem to be set twice. First they are set with:
param set PWM_MIN 1075
param set PWM_MAX 1950
But then, there is also this:
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX
What exactly is this “p” in “p:PWM_MIN” and “p:PWM_MAX”? From where is it getting the values to store in PWM_MIN and PWM_MAX and how can I change them?
So can you just write “param set PWM_MIN 1075” and leave it at that? Why do you also need to write “set PWM_MIN p:PWM_MIN”? Are they not setting the same parameter?
Oh I see, so in order to use the parameter values for other calculations down the road, variables called “PWM_MIN” and “PWM_MAX” are also being defined and given the parameter values. Is that correct? If so, why create separate variables at all if you can always just refer to/call the parameter itself when needed?