mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 03:03:33 +08:00
gpio_led: code style fixed
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user