InertiaSDK

Loading...
Searching...
No Matches
ADCConfig.h
1#pragma once
2
3#include "data/config/SamplingConfig.h"
4
5 namespace inertia
6{
7
9 enum ADCChannel {
10 ADCchannelA2VBAT = 0,
11 ADCchannelA0,
12 ADCchannelA1,
13 ADCchannelA3,
14 ADCchannelA4,
15 ADCchannelA5,
16 ADCchannelA6,
17 ADCchannelA7,
18 ADCChannelNone // nothing selected
19};
20
21 struct INERTIA_API ADCConfig
22 : SamplingConfig
23{
24 bool adoptOffset;
25 bool adoptScale;
26 bool asGPIO[2];
27 float scale[2];
28 int16_t offset[2];
29
42 uint8_t ADCchannelMap;
43
44 ADCConfig();
45 ADCConfig(uint8_t const* in);
46 ADCConfig(std::wstring const& argString);
47
48#ifdef WITH_BOOST_PROGRAM_OPTIONS
49 static const po::options_description GetOptionDescription();
50#endif
51
52 void Set(const ADCChannel channel1, const ADCChannel channel2);
53 void Get(ADCChannel &channel1, ADCChannel &channel2) const;
54 static unsigned GetLength();
55 void GetBytes(std::vector<uint8_t>& out) const override;
56 ConfigType GetConfigType() const override;
57 const std::wstring ToString() const override;
58};
59
60}
inertia
Definition FlashCommands.h:6
inertia::ADCChannel
ADCChannel
Definition ADCConfig.h:9
inertia::ConfigType
ConfigType
Definition ConfigChannel.h:7
inertia::ADCConfig::ADCchannelMap
uint8_t ADCchannelMap
Definition ADCConfig.h:42