APM:Libraries
libraries
AP_HAL_Empty
RCInput.cpp
Go to the documentation of this file.
1
2
#include "
RCInput.h
"
3
4
using namespace
Empty
;
5
RCInput::RCInput
()
6
{}
7
8
void
RCInput::init
()
9
{}
10
11
bool
RCInput::new_input
() {
12
return
false
;
13
}
14
15
uint8_t
RCInput::num_channels
() {
16
return
0;
17
}
18
19
uint16_t
RCInput::read
(uint8_t ch) {
20
if
(ch == 2)
return
900;
/* throttle should be low, for safety */
21
else
return
1500;
22
}
23
24
uint8_t
RCInput::read
(uint16_t* periods, uint8_t len) {
25
for
(uint8_t i = 0; i < len; i++){
26
if
(i == 2) periods[i] = 900;
27
else
periods[i] = 1500;
28
}
29
return
len;
30
}
31
32
bool
RCInput::set_override
(uint8_t channel, int16_t
override
) {
33
return
true
;
34
}
35
36
void
RCInput::clear_overrides
()
37
{}
38
Empty::RCInput::set_override
bool set_override(uint8_t channel, int16_t override)
Definition:
RCInput.cpp:32
Empty
Definition:
AP_HAL_Empty_Namespace.h:3
Empty::RCInput::num_channels
uint8_t num_channels()
Definition:
RCInput.cpp:15
Empty::RCInput::read
uint16_t read(uint8_t ch)
Definition:
RCInput.cpp:19
Empty::RCInput::RCInput
RCInput()
Definition:
RCInput.cpp:5
Empty::RCInput::new_input
bool new_input()
Definition:
RCInput.cpp:11
Empty::RCInput::clear_overrides
void clear_overrides()
Definition:
RCInput.cpp:36
Empty::RCInput::init
void init()
Definition:
RCInput.cpp:8
RCInput.h
Generated on Sun Jun 17 2018 14:18:48 for APM:Libraries by
1.8.13