APM:Libraries
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
y
+
Functions
a
b
c
d
f
g
i
m
o
p
r
s
u
y
+
Variables
_
b
c
e
f
h
i
m
n
r
s
t
Typedefs
Enumerations
+
Enumerator
b
m
r
s
u
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
c
d
f
i
m
p
s
v
+
Enumerations
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
+
Related Functions
a
c
d
f
g
h
i
n
o
p
r
s
v
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
p
r
s
t
u
+
Enumerator
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
+
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
libraries
AP_HAL_Empty
AnalogIn.cpp
Go to the documentation of this file.
1
#include "
AnalogIn.h
"
2
3
using namespace
Empty
;
4
5
AnalogSource::AnalogSource
(
float
v
) :
6
_v(v)
7
{}
8
9
float
AnalogSource::read_average
() {
10
return
_v
;
11
}
12
13
float
AnalogSource::voltage_average
() {
14
return
5.0f *
_v
/ 1024.0f;
15
}
16
17
float
AnalogSource::voltage_latest
() {
18
return
5.0f *
_v
/ 1024.0f;
19
}
20
21
float
AnalogSource::read_latest
() {
22
return
_v
;
23
}
24
25
void
AnalogSource::set_pin
(uint8_t p)
26
{}
27
28
void
AnalogSource::set_stop_pin
(uint8_t p)
29
{}
30
31
void
AnalogSource::set_settle_time
(uint16_t settle_time_ms)
32
{}
33
34
AnalogIn::AnalogIn
()
35
{}
36
37
void
AnalogIn::init
()
38
{}
39
40
AP_HAL::AnalogSource
*
AnalogIn::channel
(int16_t n) {
41
return
new
AnalogSource
(1.11);
42
}
43
44
float
AnalogIn::board_voltage
(
void
)
45
{
46
return
5.0f;
47
}
Empty::AnalogSource::set_stop_pin
void set_stop_pin(uint8_t p)
Definition:
AnalogIn.cpp:28
Empty::AnalogSource::AnalogSource
AnalogSource(float v)
Definition:
AnalogIn.cpp:5
Empty::AnalogIn::board_voltage
float board_voltage(void)
Definition:
AnalogIn.cpp:44
Empty
Definition:
AP_HAL_Empty_Namespace.h:3
Empty::AnalogSource::read_average
float read_average()
Definition:
AnalogIn.cpp:9
Empty::AnalogSource::read_latest
float read_latest()
Definition:
AnalogIn.cpp:21
Empty::AnalogSource::set_pin
void set_pin(uint8_t p)
Definition:
AnalogIn.cpp:25
Empty::AnalogIn::channel
AP_HAL::AnalogSource * channel(int16_t n)
Definition:
AnalogIn.cpp:40
Empty::AnalogIn::init
void init()
Definition:
AnalogIn.cpp:37
Empty::AnalogSource::voltage_latest
float voltage_latest()
Definition:
AnalogIn.cpp:17
AnalogIn.h
v
float v
Definition:
Printf.cpp:15
AP_HAL::AnalogSource
Definition:
AnalogIn.h:7
Empty::AnalogSource::voltage_average
float voltage_average()
Definition:
AnalogIn.cpp:13
Empty::AnalogSource::set_settle_time
void set_settle_time(uint16_t settle_time_ms)
Definition:
AnalogIn.cpp:31
Empty::AnalogIn::AnalogIn
AnalogIn()
Definition:
AnalogIn.cpp:34
Empty::AnalogSource::_v
float _v
Definition:
AnalogIn.h:17
Generated on Sun Jun 17 2018 14:18:48 for APM:Libraries by
1.8.13