mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Add IO timer channel mode for RPM and also sync up rpi configuration to work with all these drivers
This commit is contained in:
parent
b85ad98a98
commit
077ade4f8f
@ -40,6 +40,7 @@ exception_list = [
|
||||
'DRIVERS_DISTANCE_SENSOR_SRF05', # Requires hardcoded GPIO_ULTRASOUND
|
||||
'DRIVERS_PPS_CAPTURE', # Requires PPS GPIO config
|
||||
'DRIVERS_PWM_INPUT', # Requires PWM config
|
||||
'DRIVERS_RPM_CAPTURE', # Requires PPS GPIO config
|
||||
'DRIVERS_TEST_PPM', # PIN config not portable
|
||||
'DRIVERS_TATTU_CAN', # Broken needs fixing
|
||||
'MODULES_REPLAY', # Fails on NuttX targets maybe force POSIX dependency?
|
||||
|
||||
@ -68,7 +68,8 @@ typedef enum io_timer_channel_mode_t {
|
||||
IOTimerChanMode_Dshot = 6,
|
||||
IOTimerChanMode_LED = 7,
|
||||
IOTimerChanMode_PPS = 8,
|
||||
IOTimerChanMode_Other = 9,
|
||||
IOTimerChanMode_RPM = 9,
|
||||
IOTimerChanMode_Other = 10,
|
||||
IOTimerChanModeSize
|
||||
} io_timer_channel_mode_t;
|
||||
|
||||
|
||||
@ -67,7 +67,8 @@ typedef enum io_timer_channel_mode_t {
|
||||
IOTimerChanMode_Dshot = 6,
|
||||
IOTimerChanMode_LED = 7,
|
||||
IOTimerChanMode_PPS = 8,
|
||||
IOTimerChanMode_Other = 9,
|
||||
IOTimerChanMode_RPM = 9,
|
||||
IOTimerChanMode_Other = 10,
|
||||
IOTimerChanModeSize
|
||||
} io_timer_channel_mode_t;
|
||||
|
||||
|
||||
@ -68,7 +68,8 @@ typedef enum io_timer_channel_mode_t {
|
||||
IOTimerChanMode_Dshot = 6,
|
||||
IOTimerChanMode_LED = 7,
|
||||
IOTimerChanMode_PPS = 8,
|
||||
IOTimerChanMode_Other = 9,
|
||||
IOTimerChanMode_RPM = 9,
|
||||
IOTimerChanMode_Other = 10,
|
||||
IOTimerChanModeSize
|
||||
} io_timer_channel_mode_t;
|
||||
|
||||
|
||||
@ -63,7 +63,8 @@ typedef enum io_timer_channel_mode_t {
|
||||
IOTimerChanMode_Dshot = 6,
|
||||
IOTimerChanMode_LED = 7,
|
||||
IOTimerChanMode_PPS = 8,
|
||||
IOTimerChanMode_Other = 9,
|
||||
IOTimerChanMode_RPM = 9,
|
||||
IOTimerChanMode_Other = 10,
|
||||
IOTimerChanModeSize
|
||||
} io_timer_channel_mode_t;
|
||||
|
||||
|
||||
@ -63,7 +63,8 @@ typedef enum io_timer_channel_mode_t {
|
||||
IOTimerChanMode_Dshot = 6,
|
||||
IOTimerChanMode_LED = 7,
|
||||
IOTimerChanMode_PPS = 8,
|
||||
IOTimerChanMode_Other = 9,
|
||||
IOTimerChanMode_RPM = 9,
|
||||
IOTimerChanMode_Other = 10,
|
||||
IOTimerChanModeSize
|
||||
} io_timer_channel_mode_t;
|
||||
|
||||
|
||||
@ -73,6 +73,10 @@ typedef enum io_timer_channel_mode_t {
|
||||
IOTimerChanMode_OneShot = 4,
|
||||
IOTimerChanMode_Trigger = 5,
|
||||
IOTimerChanMode_Dshot = 6,
|
||||
IOTimerChanMode_LED = 7,
|
||||
IOTimerChanMode_PPS = 8,
|
||||
IOTimerChanMode_RPM = 9,
|
||||
IOTimerChanMode_Other = 10,
|
||||
IOTimerChanModeSize
|
||||
} io_timer_channel_mode_t;
|
||||
|
||||
|
||||
@ -79,7 +79,8 @@ typedef enum io_timer_channel_mode_t {
|
||||
IOTimerChanMode_Dshot = 6,
|
||||
IOTimerChanMode_LED = 7,
|
||||
IOTimerChanMode_PPS = 8,
|
||||
IOTimerChanMode_Other = 9,
|
||||
IOTimerChanMode_RPM = 9,
|
||||
IOTimerChanMode_Other = 10,
|
||||
IOTimerChanModeSize
|
||||
} io_timer_channel_mode_t;
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ bool RPMCapture::init()
|
||||
return false;
|
||||
}
|
||||
|
||||
int ret = io_timer_allocate_channel(_channel, IOTimerChanMode_Other); // TODO: add IOTimerChanMode_RPM
|
||||
int ret = io_timer_allocate_channel(_channel, IOTimerChanMode_RPM);
|
||||
|
||||
if (ret != PX4_OK) {
|
||||
PX4_ERR("gpio alloc failed (%i) for RPM at channel (%d)", ret, _channel);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user