-
Notifications
You must be signed in to change notification settings - Fork 0
/
height.h
49 lines (41 loc) · 844 Bytes
/
height.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
38
39
40
41
42
43
44
45
46
47
48
49
/* @file height.h
* @author Gus Ellerm, Andrew Limmer-Wood, Adam Ross
* @date 28/04/2018
* @brief Header file for height (helicopter altitude)
*/
#ifndef HEIGHT_H_
#define HEIGHT_H_
/**
* Initializes the ADC for the height sensor
*/
void
initADC ( void );
/**
* Returns the ADC count converted into millivolts
* @return The ADC value in millivolts
*/
int
getADCVolt ( void );
/**
* Sets the ground height
*/
void
ADCheightReference ( void );
/**
* Calculates height as a percentage for displaying to Tiva LED
* @return The altitude as a percentage
*/
int16_t
getAltitudePercentage ( void );
/**
* Displays the height of the helicopter as a percentage
*/
void
displayHeight ( void );
/**
* Returns current height of ground
* @return The ground height
*/
uint32_t
getGround ( void );
#endif /* HEIGHT_H_ */