NinjaFlight
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
feature.h
Go to the documentation of this file.
1
/*
2
* This file is part of Ninjaflight.
3
*
4
* Ninjaflight is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* Ninjaflight is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with Ninjaflight. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#pragma once
19
20
// Keep synchronized with featureNames[] in serial_cli.c
21
typedef
enum
{
22
FEATURE_RX_PPM
= 1 << 0,
23
FEATURE_VBAT
= 1 << 1,
24
FEATURE_INFLIGHT_ACC_CAL
= 1 << 2,
25
FEATURE_RX_SERIAL
= 1 << 3,
26
FEATURE_MOTOR_STOP
= 1 << 4,
27
FEATURE_SERVO_TILT
= 1 << 5,
28
FEATURE_SOFTSERIAL
= 1 << 6,
29
FEATURE_GPS
= 1 << 7,
30
FEATURE_FAILSAFE
= 1 << 8,
31
FEATURE_SONAR
= 1 << 9,
32
FEATURE_TELEMETRY
= 1 << 10,
33
FEATURE_CURRENT_METER
= 1 << 11,
34
FEATURE_3D
= 1 << 12,
35
FEATURE_RX_PARALLEL_PWM
= 1 << 13,
36
FEATURE_RX_MSP
= 1 << 14,
37
FEATURE_RSSI_ADC
= 1 << 15,
38
FEATURE_LED_STRIP
= 1 << 16,
39
FEATURE_DISPLAY
= 1 << 17,
40
FEATURE_ONESHOT125
= 1 << 18,
41
FEATURE_BLACKBOX
= 1 << 19,
42
FEATURE_CHANNEL_FORWARDING
= 1 << 20,
43
FEATURE_TRANSPONDER
= 1 << 21,
44
}
features_e
;
45
46
struct
feature_config
{
47
uint32_t
enabledFeatures
;
48
}
__attribute__
((packed)) ;
49
50
struct
config
;
51
bool
feature
(
const
struct
config
*
self
, uint32_t mask);
52
void
featureSet
(
struct
config
*
self
, uint32_t mask);
53
void
featureClear
(
struct
config
*
self
, uint32_t mask);
54
void
featureClearAll
(
struct
config
*
self
);
55
uint32_t
featureMask
(
const
struct
config
*
self
);
FEATURE_CURRENT_METER
Definition:
feature.h:33
feature_config::enabledFeatures
uint32_t enabledFeatures
Definition:
feature.h:47
FEATURE_DISPLAY
Definition:
feature.h:39
config
Definition:
config.h:81
features_e
features_e
Definition:
feature.h:21
FEATURE_BLACKBOX
Definition:
feature.h:41
FEATURE_ONESHOT125
Definition:
feature.h:40
FEATURE_RX_SERIAL
Definition:
feature.h:25
FEATURE_FAILSAFE
Definition:
feature.h:30
featureSet
void featureSet(struct config *self, uint32_t mask)
Definition:
feature.c:30
FEATURE_SERVO_TILT
Definition:
feature.h:27
FEATURE_RX_PPM
Definition:
feature.h:22
FEATURE_MOTOR_STOP
Definition:
feature.h:26
FEATURE_RX_MSP
Definition:
feature.h:36
feature
bool feature(const struct config *self, uint32_t mask)
Definition:
feature.c:26
FEATURE_RSSI_ADC
Definition:
feature.h:37
FEATURE_GPS
Definition:
feature.h:29
feature_config
Definition:
feature.h:46
FEATURE_RX_PARALLEL_PWM
Definition:
feature.h:35
FEATURE_SOFTSERIAL
Definition:
feature.h:28
FEATURE_VBAT
Definition:
feature.h:23
featureClear
void featureClear(struct config *self, uint32_t mask)
Definition:
feature.c:34
FEATURE_TELEMETRY
Definition:
feature.h:32
__attribute__
typedef __attribute__
FEATURE_SONAR
Definition:
feature.h:31
FEATURE_LED_STRIP
Definition:
feature.h:38
FEATURE_TRANSPONDER
Definition:
feature.h:43
featureClearAll
void featureClearAll(struct config *self)
Definition:
feature.c:38
FEATURE_INFLIGHT_ACC_CAL
Definition:
feature.h:24
FEATURE_CHANNEL_FORWARDING
Definition:
feature.h:42
FEATURE_3D
Definition:
feature.h:34
featureMask
uint32_t featureMask(const struct config *self)
Definition:
feature.c:42
src
main
config
feature.h
Generated on Mon Dec 12 2016 15:48:45 for NinjaFlight by
1.8.7