MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / read

Method read

libraries/AP_HAL_ChibiOS/RCInput.cpp:98–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98uint16_t RCInput::read(uint8_t channel)
99{
100 if (!_init || (channel >= MIN(RC_INPUT_MAX_CHANNELS, _num_channels))) {
101 return 0;
102 }
103 uint16_t v;
104 {
105 WITH_SEMAPHORE(rcin_mutex);
106 v = _rc_values[channel];
107 }
108 return v;
109}
110
111uint8_t RCInput::read(uint16_t* periods, uint8_t len)
112{

Callers 1

_timer_tickMethod · 0.45

Calls 2

MINFunction · 0.85
memcpyFunction · 0.85

Tested by

no test coverage detected