forked from sam-itt/sofis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alt-indicator.h
37 lines (29 loc) · 909 Bytes
/
alt-indicator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* SPDX-FileCopyrightText: 2021 Samuel Cuella <samuel.cuella@gmail.com>
*
* This file is part of SoFIS - an open source EFIS
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef ALT_INDICATOR_H
#define ALT_INDICATOR_H
#include "base-gauge.h"
#include "generic-layer.h"
#include "tape-gauge.h"
#include "text-gauge.h"
typedef enum {ALT_SRC_GPS,ALT_SRC_BARO} AltSource;
typedef struct{
BaseGauge super;
TapeGauge *tape;
TextGauge *talt_txt; /*Target altitude*/
TextGauge *qnh_txt;
AltSource src;
int qnh;
int target_alt;
}AltIndicator;
AltIndicator *alt_indicator_new(void);
AltIndicator *alt_indicator_init(AltIndicator *self);
bool alt_indicator_set_value(AltIndicator *self, float value, bool animated);
void alt_indicator_set_qnh(AltIndicator *self, float value);
void alt_indicator_set_alt_src(AltIndicator *self, AltSource source);
#endif /* ALT_INDICATOR_H */