2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
21 * Created on: 6 Apr 2014
25 #ifndef TELEMETRY_COMMON_H_
26 #define TELEMETRY_COMMON_H_
31 } frskyGpsCoordFormat_e
;
34 FRSKY_UNIT_METRICS
= 0,
38 typedef struct telemetryConfig_s
{
39 uint8_t telemetry_switch
; // Use aux channel to change serial output & baudrate( MSP / Telemetry ). It disables automatic switching to Telemetry when armed.
40 serialInversion_e telemetry_inversion
; // also shared with smartport inversion
41 float gpsNoFixLatitude
;
42 float gpsNoFixLongitude
;
43 frskyGpsCoordFormat_e frsky_coordinate_format
;
44 frskyUnit_e frsky_unit
;
47 void checkTelemetryState(void);
48 void handleTelemetry(void);
50 bool determineNewTelemetryEnabledState(portSharing_e portSharing
);
52 void useTelemetryConfig(telemetryConfig_t
*telemetryConfig
);
54 #endif /* TELEMETRY_COMMON_H_ */