mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 10:17:45 +08:00
v6xrt: correct LED state read logic (#26316)
Move negation to return value instead of GPIO map argument for proper active-low handling.
This commit is contained in:
@@ -92,7 +92,7 @@ static bool phy_get_led(int led)
|
|||||||
{
|
{
|
||||||
|
|
||||||
if (g_ledmap[led] != 0) {
|
if (g_ledmap[led] != 0) {
|
||||||
return imxrt_gpio_read(!g_ledmap[led]);
|
return !imxrt_gpio_read(g_ledmap[led]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user