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

Method set_rate

libraries/AP_HAL_Linux/Thread.cpp:231–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229
230
231bool PeriodicThread::set_rate(uint32_t rate_hz)
232{
233 if (_started || rate_hz == 0) {
234 return false;
235 }
236
237 _period_usec = hz_to_usec(rate_hz);
238
239 return true;
240}
241
242bool Thread::set_stack_size(size_t stack_size)
243{

Callers 2

initMethod · 0.45
TESTFunction · 0.45

Calls 1

hz_to_usecFunction · 0.85

Tested by 1

TESTFunction · 0.36