NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rc_adjustments.h
Go to the documentation of this file.
1 /*
2  * This file is part of Ninjaflight.
3  *
4  * Copyright: collective.
5  * Cleanup: Martin Schröder <mkschreder.uk@gmail.com>
6  * Original source from Cleanflight.
7  *
8  * Ninjaflight is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * Ninjaflight is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with Ninjaflight. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #pragma once
23 
24 #include "rc_controls.h"
25 
26 typedef struct adjustmentRange_s {
27  // when aux channel is in range...
28  uint8_t auxChannelIndex;
29  channelRange_t range;
30 
31  // ..then apply the adjustment function to the auxSwitchChannel ...
34 
35  // ... via slot
36  uint8_t adjustmentIndex;
37 } __attribute__((packed)) adjustmentRange_t;
38 
39 #define MAX_ADJUSTMENT_RANGE_COUNT 12 // enough for 2 * 6pos switches.
40 
43 } __attribute__((packed)) ;
44 
45 
uint8_t auxSwitchChannelIndex
Definition: rc_adjustments.h:33
uint8_t adjustmentIndex
Definition: rc_adjustments.h:36
channelRange_t range
Definition: rc_adjustments.h:29
Definition: rc_adjustments.h:41
struct adjustmentRange_s __attribute__((packed)) adjustmentRange_t
uint8_t auxChannelIndex
Definition: rc_adjustments.h:28
adjustmentRange_t adjustmentRanges[MAX_ADJUSTMENT_RANGE_COUNT]
Definition: rc_adjustments.h:42
#define MAX_ADJUSTMENT_RANGE_COUNT
Definition: rc_adjustments.h:39
uint8_t adjustmentFunction
Definition: rc_adjustments.h:32
Definition: rc_adjustments.h:26