CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/ArduSub/UserCode.cpp
Views: 1798
1
#include "Sub.h"
2
3
#ifdef USERHOOK_INIT
4
void Sub::userhook_init()
5
{
6
// put your initialisation code here
7
// this will be called once at start-up
8
}
9
#endif
10
11
#ifdef USERHOOK_FASTLOOP
12
void Sub::userhook_FastLoop()
13
{
14
// put your 100Hz code here
15
}
16
#endif
17
18
#ifdef USERHOOK_50HZLOOP
19
void Sub::userhook_50Hz()
20
{
21
// put your 50Hz code here
22
}
23
#endif
24
25
#ifdef USERHOOK_MEDIUMLOOP
26
void Sub::userhook_MediumLoop()
27
{
28
// put your 10Hz code here
29
}
30
#endif
31
32
#ifdef USERHOOK_SLOWLOOP
33
void Sub::userhook_SlowLoop()
34
{
35
// put your 3.3Hz code here
36
}
37
#endif
38
39
#ifdef USERHOOK_SUPERSLOWLOOP
40
void Sub::userhook_SuperSlowLoop()
41
{
42
// put your 1Hz code here
43
}
44
#endif
45
46