Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_DAC/AP_DAC_Params.h
4182 views
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
#pragma once
17
18
#include <AP_Param/AP_Param.h>
19
#include "AP_DAC_config.h"
20
21
class AP_DAC_Params {
22
public:
23
static const struct AP_Param::GroupInfo var_info[];
24
25
AP_DAC_Params(void);
26
27
CLASS_NO_COPY(AP_DAC_Params);
28
29
// DAC types
30
enum class Type : uint8_t {
31
NONE = 0,
32
#if AP_DAC_TIX3204_ENABLED
33
TIx3204 = 1,
34
#endif
35
#if AP_DAC_MCP40D1X_ENABLED
36
MCP40D1x = 2,
37
#endif
38
};
39
40
AP_Enum<Type> type; // 0=disabled, others see frontend enum TYPE
41
AP_Int8 bus; // I2C bus number
42
AP_Int8 bus_address; // I2C address
43
AP_Float voltage_reference;
44
AP_Float voltage;
45
};
46
47