forked from Archive/PX4-Autopilot
gpio_led: code style fixed
This commit is contained in:
parent
6f55077541
commit
bc36b540a5
|
@ -253,8 +253,9 @@ void gpio_led_cycle(FAR void *arg)
|
||||||
bool updated;
|
bool updated;
|
||||||
orb_check(priv->vehicle_status_sub, &updated);
|
orb_check(priv->vehicle_status_sub, &updated);
|
||||||
|
|
||||||
if (updated)
|
if (updated) {
|
||||||
orb_copy(ORB_ID(vehicle_status), priv->vehicle_status_sub, &priv->status);
|
orb_copy(ORB_ID(vehicle_status), priv->vehicle_status_sub, &priv->status);
|
||||||
|
}
|
||||||
|
|
||||||
/* select pattern for current status */
|
/* select pattern for current status */
|
||||||
int pattern = 0;
|
int pattern = 0;
|
||||||
|
@ -294,8 +295,9 @@ void gpio_led_cycle(FAR void *arg)
|
||||||
|
|
||||||
priv->counter++;
|
priv->counter++;
|
||||||
|
|
||||||
if (priv->counter > 5)
|
if (priv->counter > 5) {
|
||||||
priv->counter = 0;
|
priv->counter = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* repeat cycle at 5 Hz */
|
/* repeat cycle at 5 Hz */
|
||||||
if (gpio_led_started) {
|
if (gpio_led_started) {
|
||||||
|
|
Loading…
Reference in New Issue