mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 18:27:05 +08:00
Fixed formatting
This commit is contained in:
committed by
Lorenz Meier
parent
4edd12c44a
commit
e284a28e25
@@ -113,10 +113,10 @@ usage(const char *reason)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static unsigned
|
static unsigned
|
||||||
get_parameter_value(const char *option, const char* paramDescription)
|
get_parameter_value(const char *option, const char *paramDescription)
|
||||||
{
|
{
|
||||||
unsigned result_value = 0;
|
unsigned result_value = 0;
|
||||||
|
|
||||||
/* check if this is a param name */
|
/* check if this is a param name */
|
||||||
if (strncmp("p:", option, 2) == 0) {
|
if (strncmp("p:", option, 2) == 0) {
|
||||||
|
|
||||||
@@ -131,9 +131,11 @@ get_parameter_value(const char *option, const char* paramDescription)
|
|||||||
|
|
||||||
if (gret == 0) {
|
if (gret == 0) {
|
||||||
result_value = pwm_parm;
|
result_value = pwm_parm;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
errx(gret, "PARAM '%s' LOAD FAIL", paramDescription);
|
errx(gret, "PARAM '%s' LOAD FAIL", paramDescription);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
errx(1, "PARAM '%s' NAME NOT FOUND", paramName);
|
errx(1, "PARAM '%s' NAME NOT FOUND", paramName);
|
||||||
}
|
}
|
||||||
@@ -228,7 +230,7 @@ pwm_main(int argc, char *argv[])
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'p':
|
case 'p':
|
||||||
pwm_value = get_parameter_value(optarg, "PWM Value");
|
pwm_value = get_parameter_value(optarg, "PWM Value");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user