The short syntax `smix reverse` is meant to print the table. When the logic was checking for parameters it was failing to deal with the null pointer when no parameters were present. Additionally the `smix reverse` was called at the end of a successful command to display the table so even though the command was succeeding it was crashing on the null pointer reference when trying to display the result.
Also some stylistic cleanup
Adds in flight monitoring of the rx frame rate and adapts the filters if the frame rate changes. Primarily to add support for Crossfire with its ability to switch from 150hz to 50hz (and back) under some circumstances. Will work with any protocol - not CRSF specific. So if future receivers add the ability to switch frame rates dynamically the logic should support them.
If the current rx frame rate is more than +-20% from the previously detected rate, then the process will retrain for the next 50 samples as long as the rate continues to be outside the 20% tolerance. Once 50 samples are collected the new frame rate is updated and the filter cutoffs are adjusted. Only filters set with their cutoffs = 0 (auto) will be adjusted. There is a 2 second guard time after a successful update before retraining can start again to prevent rapid switching back and forth.
The logic is optimized to not perform any training if the filters are set to manual cutoffs. So there is an opportunity for advanced users to choose specific cutoffs and reduce the PID loop load slightly. However this is not recommended for Crossfire or other protocols that might change their rx frame rate.
Updated the output of the `rc_smoothing_info` cli command to match the revised logic.
Improved the rx frame rate detection/training by delaying calculation to avoid loop time jitter during flight controller initialization.
For auto cutoffs calculate a value appropriate for BIQUAD or PT1 depending on the configuration.
Added a new rc_smoothing_info cli command to display internal details about its operation.
Presents the user with the default value for reference when displaying a parameter with the "get" command - but only if the current value differs from the default.
Most cli commands give some feedback if the command was successful. However a few did not return a response to provide an indication that the command was successful. This change adds feedback responses for the following commands:
adjrange
color
led
rxrange
serial
servo
vtx
Adds a new parameter mode `MODE_BITSET` that allows associating a cli parameter with a specific bit in a stored value. Bit packed values can be exposed with individual cli parameters for each bit as needed. Supports UINT8, UINT16 and newly added UINT32 data types (UINT32 not supported for other modes at this time).