mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 14:08:52 +08:00
fix camera_trigger: no need to check for '_pins[i] < num_gpios'
_pins[i] >= num_gpios is a valid config.
This commit is contained in:
@@ -25,7 +25,7 @@ void CameraInterfaceGPIO::setup()
|
||||
for (unsigned i = 0, t = 0; i < arraySize(_pins); i++) {
|
||||
|
||||
// Pin range is from 0 to num_gpios - 1
|
||||
if (_pins[i] >= 0 && t < (int)arraySize(_triggers) && _pins[i] < num_gpios) {
|
||||
if (_pins[i] >= 0 && t < (int)arraySize(_triggers)) {
|
||||
uint32_t gpio = io_timer_channel_get_gpio_output(_pins[i]);
|
||||
_triggers[t++] = gpio;
|
||||
px4_arch_configgpio(gpio);
|
||||
|
||||
Reference in New Issue
Block a user