telemetry.h 1.77 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * This file is part of Cleanflight.
 *
 * Cleanflight is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Cleanflight is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Cleanflight.  If not, see <http://www.gnu.org/licenses/>.
 */

/*
 * telemetry.h
 *
 *  Created on: 6 Apr 2014
 *      Author: Hydra
 */
pinkywafer's avatar
pinkywafer committed
24
#include "rx/rx.h"
25
26
27
28

#ifndef TELEMETRY_COMMON_H_
#define TELEMETRY_COMMON_H_

Airmamaf's avatar
Airmamaf committed
29
30
31
32
33
34
35
36
37
typedef enum {
    FRSKY_FORMAT_DMS = 0,
    FRSKY_FORMAT_NMEA
} frskyGpsCoordFormat_e;

typedef enum {
    FRSKY_UNIT_METRICS = 0,
    FRSKY_UNIT_IMPERIALS
} frskyUnit_e;
38

39
40
typedef struct telemetryConfig_s {
    uint8_t telemetry_switch;               // Use aux channel to change serial output & baudrate( MSP / Telemetry ). It disables automatic switching to Telemetry when armed.
41
    uint8_t telemetry_inversion;            // also shared with smartport inversion
42
    float gpsNoFixLatitude;   
43
    float gpsNoFixLongitude;  
Airmamaf's avatar
Airmamaf committed
44
    frskyGpsCoordFormat_e frsky_coordinate_format;   
45
    frskyUnit_e frsky_unit;
46
    uint8_t frsky_vfas_precision;
Pierre-A's avatar
Pierre-A committed
47
    uint8_t hottAlarmSoundInterval;
48
49
} telemetryConfig_t;

50
51
void telemetryCheckState(void);
void telemetryProcess(rxConfig_t *rxConfig, uint16_t deadband3d_throttle);
52

53
bool telemetryDetermineEnabledState(portSharing_e portSharing);
54

55
void telemetryUseConfig(telemetryConfig_t *telemetryConfig);
56
57

#endif /* TELEMETRY_COMMON_H_ */