mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 17:36:40 +08:00
px4_cli: Added px4_get_parameter_value function overload for float type
This commit is contained in:
@@ -50,3 +50,15 @@
|
||||
* @return 0 on success, -errno otherwise
|
||||
*/
|
||||
int px4_get_parameter_value(const char *option, int &value);
|
||||
|
||||
/**
|
||||
* Parse a CLI argument to a float. There are 2 valid formats:
|
||||
* - 'p:<param_name>'
|
||||
* in this case the parameter is loaded from an integer parameter
|
||||
* - <float>
|
||||
* a floating-point value, so just a string to float conversion is done
|
||||
* @param option CLI argument
|
||||
* @param value returned value
|
||||
* @return 0 on success, -errno otherwise
|
||||
*/
|
||||
int px4_get_parameter_value(const char *option, float &value);
|
||||
|
||||
Reference in New Issue
Block a user