File tree 9 files changed +18
-7
lines changed
rpi/rpi_common/include/px4_arch
stm/stm32_common/include/px4_arch
9 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 40
40
'DRIVERS_DISTANCE_SENSOR_SRF05' , # Requires hardcoded GPIO_ULTRASOUND
41
41
'DRIVERS_PPS_CAPTURE' , # Requires PPS GPIO config
42
42
'DRIVERS_PWM_INPUT' , # Requires PWM config
43
+ 'DRIVERS_RPM_CAPTURE' , # Requires PPS GPIO config
43
44
'DRIVERS_TEST_PPM' , # PIN config not portable
44
45
'DRIVERS_TATTU_CAN' , # Broken needs fixing
45
46
'MODULES_REPLAY' , # Fails on NuttX targets maybe force POSIX dependency?
Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ typedef enum io_timer_channel_mode_t {
68
68
IOTimerChanMode_Dshot = 6 ,
69
69
IOTimerChanMode_LED = 7 ,
70
70
IOTimerChanMode_PPS = 8 ,
71
- IOTimerChanMode_Other = 9 ,
71
+ IOTimerChanMode_RPM = 9 ,
72
+ IOTimerChanMode_Other = 10 ,
72
73
IOTimerChanModeSize
73
74
} io_timer_channel_mode_t ;
74
75
Original file line number Diff line number Diff line change @@ -67,7 +67,8 @@ typedef enum io_timer_channel_mode_t {
67
67
IOTimerChanMode_Dshot = 6 ,
68
68
IOTimerChanMode_LED = 7 ,
69
69
IOTimerChanMode_PPS = 8 ,
70
- IOTimerChanMode_Other = 9 ,
70
+ IOTimerChanMode_RPM = 9 ,
71
+ IOTimerChanMode_Other = 10 ,
71
72
IOTimerChanModeSize
72
73
} io_timer_channel_mode_t ;
73
74
Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ typedef enum io_timer_channel_mode_t {
68
68
IOTimerChanMode_Dshot = 6 ,
69
69
IOTimerChanMode_LED = 7 ,
70
70
IOTimerChanMode_PPS = 8 ,
71
- IOTimerChanMode_Other = 9 ,
71
+ IOTimerChanMode_RPM = 9 ,
72
+ IOTimerChanMode_Other = 10 ,
72
73
IOTimerChanModeSize
73
74
} io_timer_channel_mode_t ;
74
75
Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ typedef enum io_timer_channel_mode_t {
63
63
IOTimerChanMode_Dshot = 6 ,
64
64
IOTimerChanMode_LED = 7 ,
65
65
IOTimerChanMode_PPS = 8 ,
66
- IOTimerChanMode_Other = 9 ,
66
+ IOTimerChanMode_RPM = 9 ,
67
+ IOTimerChanMode_Other = 10 ,
67
68
IOTimerChanModeSize
68
69
} io_timer_channel_mode_t ;
69
70
Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ typedef enum io_timer_channel_mode_t {
63
63
IOTimerChanMode_Dshot = 6 ,
64
64
IOTimerChanMode_LED = 7 ,
65
65
IOTimerChanMode_PPS = 8 ,
66
- IOTimerChanMode_Other = 9 ,
66
+ IOTimerChanMode_RPM = 9 ,
67
+ IOTimerChanMode_Other = 10 ,
67
68
IOTimerChanModeSize
68
69
} io_timer_channel_mode_t ;
69
70
Original file line number Diff line number Diff line change @@ -73,6 +73,10 @@ typedef enum io_timer_channel_mode_t {
73
73
IOTimerChanMode_OneShot = 4 ,
74
74
IOTimerChanMode_Trigger = 5 ,
75
75
IOTimerChanMode_Dshot = 6 ,
76
+ IOTimerChanMode_LED = 7 ,
77
+ IOTimerChanMode_PPS = 8 ,
78
+ IOTimerChanMode_RPM = 9 ,
79
+ IOTimerChanMode_Other = 10 ,
76
80
IOTimerChanModeSize
77
81
} io_timer_channel_mode_t ;
78
82
Original file line number Diff line number Diff line change @@ -79,7 +79,8 @@ typedef enum io_timer_channel_mode_t {
79
79
IOTimerChanMode_Dshot = 6 ,
80
80
IOTimerChanMode_LED = 7 ,
81
81
IOTimerChanMode_PPS = 8 ,
82
- IOTimerChanMode_Other = 9 ,
82
+ IOTimerChanMode_RPM = 9 ,
83
+ IOTimerChanMode_Other = 10 ,
83
84
IOTimerChanModeSize
84
85
} io_timer_channel_mode_t ;
85
86
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ bool RPMCapture::init()
77
77
return false ;
78
78
}
79
79
80
- int ret = io_timer_allocate_channel (_channel, IOTimerChanMode_Other); // TODO: add IOTimerChanMode_RPM
80
+ int ret = io_timer_allocate_channel (_channel, IOTimerChanMode_RPM);
81
81
82
82
if (ret != PX4_OK) {
83
83
PX4_ERR (" gpio alloc failed (%i) for RPM at channel (%d)" , ret, _channel);
You can’t perform that action at this time.
0 commit comments