updates
[inav.git] / src / main / io / vtx_control.h
blob83a2b1d4281193614311fbb1d40c0dd357a3c253
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight 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.
9 * Cleanflight 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.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #include "fc/rc_modes.h"
22 #define MAX_CHANNEL_ACTIVATION_CONDITION_COUNT 10
24 typedef struct vtxChannelActivationCondition_s {
25 uint8_t auxChannelIndex;
26 uint8_t band;
27 uint8_t channel;
28 channelRange_t range;
29 } vtxChannelActivationCondition_t;
31 typedef struct vtxConfig_s {
32 vtxChannelActivationCondition_t vtxChannelActivationConditions[MAX_CHANNEL_ACTIVATION_CONDITION_COUNT];
33 uint8_t halfDuplex;
34 uint8_t smartAudioEarlyAkkWorkaroundEnable;
35 bool smartAudioAltSoftSerialMethod;
36 bool softSerialShortStop;
37 uint8_t smartAudioStopBits;
38 } vtxConfig_t;
40 PG_DECLARE(vtxConfig_t, vtxConfig);
42 void vtxControlInit(void);
43 void vtxControlInputPoll(void);
45 void vtxIncrementBand(void);
46 void vtxDecrementBand(void);
47 void vtxIncrementChannel(void);
48 void vtxDecrementChannel(void);
50 void vtxCyclePower(const uint8_t powerStep);
51 void vtxCycleBandOrChannel(const uint8_t bandStep, const uint8_t channelStep);
53 void vtxUpdateActivatedChannel(void);
55 void handleVTXControlButton(void);