px4fmu-v5:Fix led toggle.

The phyical led read was not returing the logical state
    of the LED. Since they are active low, when on it was
    returning 0 and the the negation operation in togggle
    was makeing that a 1 which it already was.
This commit is contained in:
David Sidrane
2018-07-18 15:06:01 -07:00
committed by Lorenz Meier
parent 1db1155697
commit 3136521493
+2 -3
View File
@@ -104,8 +104,8 @@ static void phy_set_led(int led, bool state)
static bool phy_get_led(int led)
{
return stm32_gpioread(g_ledmap[led]);
/* If Low it is on */
return !stm32_gpioread(g_ledmap[led]);
}
__EXPORT void led_on(int led)
@@ -120,7 +120,6 @@ __EXPORT void led_off(int led)
__EXPORT void led_toggle(int led)
{
phy_set_led(xlat(led), !phy_get_led(xlat(led)));
}