diff options
author | Julian Oes <julian@oes.ch> | 2013-10-31 10:29:06 +0100 |
---|---|---|
committer | Julian Oes <julian@oes.ch> | 2013-10-31 10:29:06 +0100 |
commit | 25bf1abecffeb0b4c29386ef6a019b7a60c23899 (patch) | |
tree | 95d06500d28c056464c2ce922f41760e902e4a95 /src/systemcmds/esc_calib | |
parent | 88351f3da178be1c73dad47557d894943e484e34 (diff) | |
download | px4-firmware-25bf1abecffeb0b4c29386ef6a019b7a60c23899.tar.gz px4-firmware-25bf1abecffeb0b4c29386ef6a019b7a60c23899.tar.bz2 px4-firmware-25bf1abecffeb0b4c29386ef6a019b7a60c23899.zip |
pwm_output: Allow PWM values from 900us to 2100us but use a default of 1000us to 2000us
Diffstat (limited to 'src/systemcmds/esc_calib')
-rw-r--r-- | src/systemcmds/esc_calib/esc_calib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/systemcmds/esc_calib/esc_calib.c b/src/systemcmds/esc_calib/esc_calib.c index c40206197..b237b31be 100644 --- a/src/systemcmds/esc_calib/esc_calib.c +++ b/src/systemcmds/esc_calib/esc_calib.c @@ -82,7 +82,7 @@ usage(const char *reason) " [-c <channels>] Supply channels (e.g. 1234)\n" " [-m <chanmask> ] Directly supply channel mask (e.g. 0xF)\n" " [-a] Use all outputs\n" - , PWM_MIN, PWM_MAX); + , PWM_DEFAULT_MIN, PWM_DEFAULT_MAX); } int @@ -100,8 +100,8 @@ esc_calib_main(int argc, char *argv[]) unsigned long channels; unsigned single_ch = 0; - uint16_t pwm_high = PWM_MAX; - uint16_t pwm_low = PWM_MIN; + uint16_t pwm_high = PWM_DEFAULT_MAX; + uint16_t pwm_low = PWM_DEFAULT_MIN; struct pollfd fds; fds.fd = 0; /* stdin */ @@ -148,13 +148,13 @@ esc_calib_main(int argc, char *argv[]) case 'l': /* Read in custom low value */ - if (*ep != '\0' || pwm_low < PWM_MIN || pwm_low > PWM_HIGHEST_MIN) + if (*ep != '\0' || pwm_low < PWM_LOWEST_MIN || pwm_low > PWM_HIGHEST_MIN) usage("low PWM invalid"); break; case 'h': /* Read in custom high value */ pwm_high = strtoul(optarg, &ep, 0); - if (*ep != '\0' || pwm_high > PWM_MAX || pwm_high < PWM_LOWEST_MAX) + if (*ep != '\0' || pwm_high > PWM_HIGHEST_MAX || pwm_high < PWM_LOWEST_MAX) usage("high PWM invalid"); break; default: |