mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 09:13:32 +08:00
crazyflie BugFix:Prevent a value of 0 being passed to px4_arch_configgpio
This prevents the meta value of 0 => not used from being passed to px4_arch_configgpio. As this would map to PORTA|PIN0 and is not the intended use.
This commit is contained in:
committed by
Lorenz Meier
parent
c1b1d03515
commit
3ea5a24924
@@ -74,7 +74,9 @@ __EXPORT void led_init()
|
||||
{
|
||||
/* Configure LED1 GPIO for output */
|
||||
for (size_t l = 0; l < (sizeof(g_ledmap) / sizeof(g_ledmap[0])); l++) {
|
||||
px4_arch_configgpio(g_ledmap[l]);
|
||||
if (g_ledmap[l]) {
|
||||
px4_arch_configgpio(g_ledmap[l]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user