Skip to content

Commit 96c1679

Browse files
Fix if statement formatting
1 parent e0bd68d commit 96c1679

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/main/fc/stats.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ void statsOnDisarm(void)
7070
#ifdef USE_GPS
7171
// flight counter is incremented at most once per power on
7272
if (sensors(SENSOR_GPS)) {
73-
if ((getTotalTravelDistance() - arm_distance_cm) / 100 >= MIN_FLIGHT_DISTANCE_M)
73+
if ((getTotalTravelDistance() - arm_distance_cm) / 100 >= MIN_FLIGHT_DISTANCE_M) {
7474
statsConfigMutable()->stats_flight_count = prev_flight_count + 1;
75-
} else statsConfigMutable()->stats_flight_count = prev_flight_count + 1;
75+
}
76+
} else {
77+
statsConfigMutable()->stats_flight_count = prev_flight_count + 1;
78+
}
7679
#else
7780
statsConfigMutable()->stats_flight_count = prev_flight_count + 1;
7881
#endif // USE_GPS

0 commit comments

Comments
 (0)