1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00
update  according to comments, this PR will only add new target. VTX power setting will opened in another PR~
This commit is contained in:
githubDLG 2018-05-05 16:05:28 +08:00
parent 6b65cce9ae
commit 874b4a0118
3 changed files with 1 additions and 40 deletions

View file

@ -30,9 +30,6 @@
#include "drivers/light_led.h"
#include "drivers/time.h"
#include "drivers/vtx_rtc6705.h"
#include "fc/runtime_config.h"
#include "flight/failsafe.h"
#include "io/vtx.h"
#define DP_5G_MASK 0x7000
#define PA5G_BS_MASK 0x0E00
@ -139,11 +136,7 @@ void rtc6705SetFrequency(uint16_t channel_freq)
void rtc6705SetRFPower(uint8_t rf_power)
{
if (!ARMING_FLAG(ARMED) && (vtxSettingsConfig()->lowPowerDisarm == 0xFF) && !failsafeIsActive()) {
rtc6705_write_register(7, ((PA_CONTROL_DEFAULT | PD_Q5G_MASK) & (~(PA5G_PW_MASK | PA5G_BS_MASK | DP_5G_MASK))));
} else {
rtc6705_write_register(7, (rf_power > 1 ? PA_CONTROL_DEFAULT : (PA_CONTROL_DEFAULT | PD_Q5G_MASK) & (~(PA5G_PW_MASK | PA5G_BS_MASK))));
}
rtc6705_write_register(7, (rf_power > 1 ? PA_CONTROL_DEFAULT : (PA_CONTROL_DEFAULT | PD_Q5G_MASK) & (~(PA5G_PW_MASK | PA5G_BS_MASK))));
}
void rtc6705Disable(void)

View file

@ -1,31 +0,0 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software under the terms of the
* GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version.
*
* Cleanflight and Betaflight are distributed in the hope that they
* will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "io/vtx.h"
#ifdef USE_TARGET_CONFIG
#if defined(STACKX)
#define VTX_SETTINGS_ULTRA_LOW_POWER 0xff
void targetConfiguration(void)
{
vtxSettingsConfigMutable()->lowPowerDisarm = VTX_SETTINGS_ULTRA_LOW_POWER;
}
#endif
#endif

View file

@ -23,7 +23,6 @@
#if defined(STACKX)
#define TARGET_BOARD_IDENTIFIER "SXF4"
#define USBD_PRODUCT_STRING "Stack-X F4"
#define USE_TARGET_CONFIG
#else
#define TARGET_BOARD_IDENTIFIER "FDF4"
#define USBD_PRODUCT_STRING "FishDroneF4"