2 * This file is part of Betaflight.
4 * Betaflight is free software. You can redistribute this software
5 * and/or modify this software under the terms of the GNU General
6 * Public License as published by the Free Software Foundation,
7 * either version 3 of the License, or (at your option) any later
10 * Betaflight is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this software.
19 * If not, see <http://www.gnu.org/licenses/>.
26 #include "pg/gps_lap_timer.h"
28 #define MAX_N_RECORDED_PREVIOUS_LAPS 3
30 typedef struct gpsLapTimerData_s
{
31 gpsLocation_t gateLocation
;
32 uint32_t previousLaps
[MAX_N_RECORDED_PREVIOUS_LAPS
];
33 uint32_t currentLapTime
;
36 uint32_t distToPointCM
;
37 uint32_t timeOfLastLap
;
39 uint16_t numberOfSetReadings
;
40 uint16_t numberOfLapsRecorded
;
44 extern gpsLapTimerData_t gpsLapTimerData
;
46 void gpsLapTimerInit(void);
47 void gpsLapTimerNewGpsData(void);
48 void gpsLapTimerStartSetGate(void);
49 void gpsLapTimerEndSetGate(void);