Fix incorrect timer channel comments TIM2_CH1 (#13841)
[betaflight.git] / src / main / fc / gps_lap_timer.h
blob6d6054b90ca54ac881f8b1e3da5f8d84509c41ec
1 /*
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
8 * version.
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/>.
22 #pragma once
24 #include "io/gps.h"
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;
34 uint32_t bestLapTime;
35 uint32_t best3Consec;
36 uint32_t distToPointCM;
37 uint32_t timeOfLastLap;
38 int32_t dirToPoint;
39 uint16_t numberOfSetReadings;
40 uint16_t numberOfLapsRecorded;
41 bool timerRunning;
42 } gpsLapTimerData_t;
44 extern gpsLapTimerData_t gpsLapTimerData;
46 void gpsLapTimerInit(void);
47 void gpsLapTimerNewGpsData(void);
48 void gpsLapTimerStartSetGate(void);
49 void gpsLapTimerEndSetGate(void);