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/libraries/AP_ExternalAHRS/AP_ExternalAHRS_backend.cpp
Views: 1798
1
/*
2
This program is free software: you can redistribute it and/or modify
3
it under the terms of the GNU General Public License as published by
4
the Free Software Foundation, either version 3 of the License, or
5
(at your option) any later version.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
11
12
You should have received a copy of the GNU General Public License
13
along with this program. If not, see <http://www.gnu.org/licenses/>.
14
*/
15
/*
16
parent class for ExternalAHRS backends
17
*/
18
19
#include "AP_ExternalAHRS_backend.h"
20
#include <AP_AHRS/AP_AHRS.h>
21
22
#if HAL_EXTERNAL_AHRS_ENABLED
23
24
AP_ExternalAHRS_backend::AP_ExternalAHRS_backend(AP_ExternalAHRS *_frontend,
25
AP_ExternalAHRS::state_t &_state) :
26
state(_state),
27
frontend(*_frontend)
28
{}
29
30
31
uint16_t AP_ExternalAHRS_backend::get_rate(void) const
32
{
33
return frontend.get_IMU_rate();
34
}
35
36
bool AP_ExternalAHRS_backend::option_is_set(AP_ExternalAHRS::OPTIONS option) const
37
{
38
return frontend.option_is_set(option);
39
}
40
41
bool AP_ExternalAHRS_backend::in_fly_forward(void) const
42
{
43
return AP::ahrs().get_fly_forward();
44
}
45
46
#endif // HAL_EXTERNAL_AHRS_ENABLED
47
48
49