mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 17:23:34 +08:00
Fixed spelling - onshot->oneshot
This commit is contained in:
committed by
Lorenz Meier
parent
e04d43218a
commit
5abdb8fbe9
@@ -363,7 +363,7 @@ __EXPORT extern int up_pwm_servo_set_rate_group_update(unsigned group, unsigned
|
|||||||
/**
|
/**
|
||||||
* Trigger all timer's channels in Oneshot mode to fire
|
* Trigger all timer's channels in Oneshot mode to fire
|
||||||
* the oneshot with updated values.
|
* the oneshot with updated values.
|
||||||
* Nothing is none if not in onshot mode.
|
* Nothing is none if not in oneshot mode.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
__EXPORT extern void up_pwm_update(void);
|
__EXPORT extern void up_pwm_update(void);
|
||||||
|
|||||||
@@ -76,8 +76,8 @@
|
|||||||
#define BOARD_PWM_FREQ 1000000
|
#define BOARD_PWM_FREQ 1000000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(BOARD_ONSHOT_FREQ)
|
#if !defined(BOARD_ONESHOT_FREQ)
|
||||||
#define BOARD_ONSHOT_FREQ 8000000
|
#define BOARD_ONESHOT_FREQ 8000000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MAX_CHANNELS_PER_TIMER 4
|
#define MAX_CHANNELS_PER_TIMER 4
|
||||||
@@ -466,7 +466,7 @@ static inline void io_timer_set_oneshot_mode(unsigned timer)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
rARR(timer) = 0xffffffff;
|
rARR(timer) = 0xffffffff;
|
||||||
rPSC(timer) = (io_timers[timer].clock_freq / BOARD_ONSHOT_FREQ) - 1;
|
rPSC(timer) = (io_timers[timer].clock_freq / BOARD_ONESHOT_FREQ) - 1;
|
||||||
rEGR(timer) = GTIM_EGR_UG;
|
rEGR(timer) = GTIM_EGR_UG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ int up_pwm_servo_set_rate_group_update(unsigned group, unsigned rate)
|
|||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allow a rate of 0 to enter onshot mode */
|
/* Allow a rate of 0 to enter oneshot mode */
|
||||||
|
|
||||||
if (rate != 0) {
|
if (rate != 0) {
|
||||||
|
|
||||||
|
|||||||
@@ -635,7 +635,7 @@ registers_set_one(uint8_t page, uint8_t offset, uint16_t value)
|
|||||||
case PX4IO_P_SETUP_PWM_ALTRATE:
|
case PX4IO_P_SETUP_PWM_ALTRATE:
|
||||||
|
|
||||||
/* For PWM constrain to [25,400]Hz
|
/* For PWM constrain to [25,400]Hz
|
||||||
* For Onshot there is no rate, 0 is therefore used to select Oneshot mode
|
* For Oneshot there is no rate, 0 is therefore used to select Oneshot mode
|
||||||
*/
|
*/
|
||||||
if (value != 0) {
|
if (value != 0) {
|
||||||
if (value < 25) {
|
if (value < 25) {
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ usage(const char *reason)
|
|||||||
"arm\t\t\t\tArm output\n"
|
"arm\t\t\t\tArm output\n"
|
||||||
"disarm\t\t\t\tDisarm output\n"
|
"disarm\t\t\t\tDisarm output\n"
|
||||||
"\n"
|
"\n"
|
||||||
"oneshot ...\t\t\tConfigure Onshot\n"
|
"oneshot ...\t\t\tConfigure Oneshot\n"
|
||||||
"\t[-g <channel group>]\t(e.g. 0,1,2)\n"
|
"\t[-g <channel group>]\t(e.g. 0,1,2)\n"
|
||||||
"\t[-m <channel mask> ]\t(e.g. 0xF)\n"
|
"\t[-m <channel mask> ]\t(e.g. 0xF)\n"
|
||||||
"\t[-a]\t\t\tConfigure all outputs\n"
|
"\t[-a]\t\t\tConfigure all outputs\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user