InertiaSDK

Loading...
Searching...
No Matches
DetectionConfig.h
1#pragma once
2
3#include "data/config/SamplingConfig.h"
4
5 namespace inertia
6{
7
9 enum DetectionTypes {
10 DETECT_ALL = 0,
11 DETECT_ACCEL,
12 DETECT_GYRO,
13 DETECT_PIR,
14 DETECT_PRESSURE
15};
16
17 struct INERTIA_API DetectionConfig
18 : SamplingConfig
19{
20 bool adoptSettings, enableAlgorithm, resetAlgorithm, adoptGlobal;
21 DetectionTypes type;
22
23 uint8_t inputSelection; // axis or channel to use
24 uint16_t actionThreshold, offsetThreshold, restThreshold, smashThreshold, minimumVolume;
25 uint32_t globalSettings;
26
27 DetectionConfig();
28 DetectionConfig(uint8_t const* in);
29 DetectionConfig(std::wstring const& argString);
30
31#ifdef WITH_BOOST_PROGRAM_OPTIONS
32 static const po::options_description GetOptionDescription();
33#endif
34
35 static unsigned GetLength();
36 void GetBytes(std::vector<uint8_t>& out) const override;
37 ConfigType GetConfigType() const override;
38 const std::wstring ToString() const override;
39};
40
41}
inertia
Definition FlashCommands.h:6
inertia::DetectionTypes
DetectionTypes
Definition DetectionConfig.h:9
inertia::ConfigType
ConfigType
Definition ConfigChannel.h:7