AP_Periph: add RC_SPEED parameter to RC_OUT peripherals
Like other vehicles, RC_SPEED is used to set the PWM output rate for outputs whose functions are set to MotorN so that ESCs can be driven at a fast speed (490Hz, usually limited to 400Hz) while servos still run at normal speed (50Hz, controlled by OUT_RATE).
Tested the PWM outputs with real devices and a scope. Just checked that DShot and OneShot looked okay on the scope; I don't have real devices to test.
How would issues manifest?
I'm not a fan of the param name. Feels like it needs a "PWM" in it instead of RC
It is slightly wonky but I took the name from the other vehicles. If we are changing the name I personally would call it ESC_SPEED to fit with the other parameters on periph.
Rebased on top of https://github.com/ArduPilot/ardupilot/pull/27444 . It looks like the call to set_freq probably belongs before SRV_Channels::init as that function makes comments about doing late setup.
In any case, the new version has been tested in flight using both 400Hz Normal PWM and DShot600 with a BLHeli_S ESC and performed great in both cases. I also had a 50Hz servo attached to a different timer on the periph to make sure that functionality still worked. Verified the correct PWM waveforms on the scope too.