APM:Libraries
libraries
AP_HAL
Scheduler.cpp
Go to the documentation of this file.
1
#include "
Scheduler.h
"
2
3
using namespace
AP_HAL
;
4
5
void
Scheduler::register_delay_callback
(
AP_HAL::Proc
proc,
6
uint16_t min_time_ms)
7
{
8
_delay_cb
= proc;
9
_min_delay_cb_ms
= min_time_ms;
10
}
11
12
void
Scheduler::call_delay_cb
()
13
{
14
if
(
_delay_cb
==
nullptr
) {
15
return
;
16
}
17
if
(
_in_delay_callback
) {
18
// don't recurse!
19
return
;
20
}
21
_in_delay_callback
=
true
;
22
_delay_cb
();
23
_in_delay_callback
=
false
;
24
}
AP_HAL::Scheduler::_delay_cb
AP_HAL::Proc _delay_cb
Definition:
Scheduler.h:92
AP_HAL::Scheduler::_in_delay_callback
bool _in_delay_callback
Definition:
Scheduler.h:93
AP_HAL::Scheduler::register_delay_callback
virtual void register_delay_callback(AP_HAL::Proc, uint16_t min_time_ms)
Definition:
Scheduler.cpp:5
AP_HAL::Proc
void(* Proc)(void)
Definition:
AP_HAL_Namespace.h:47
AP_HAL
Definition:
AP_HAL_Namespace.h:6
AP_HAL::Scheduler::call_delay_cb
virtual void call_delay_cb()
Definition:
Scheduler.cpp:12
AP_HAL::Scheduler::_min_delay_cb_ms
uint16_t _min_delay_cb_ms
Definition:
Scheduler.h:88
Scheduler.h
Generated on Sun Jun 17 2018 14:18:48 for APM:Libraries by
1.8.13