Configuable default VBAT settings
This commit is contained in:
parent
b28c013b2e
commit
7bf60be27f
|
@ -659,7 +659,6 @@ static void resetConf(void)
|
|||
masterConfig.serialConfig.portConfigs[2].functionMask = FUNCTION_RX_SERIAL;
|
||||
#endif
|
||||
#ifdef ALIENFLIGHTF3
|
||||
masterConfig.batteryConfig.vbatscale = 20;
|
||||
masterConfig.mag_hardware = MAG_NONE; // disabled by default
|
||||
#endif
|
||||
masterConfig.rxConfig.serialrx_provider = SERIALRX_SPEKTRUM2048;
|
||||
|
@ -687,8 +686,6 @@ static void resetConf(void)
|
|||
|
||||
#if defined(SINGULARITY)
|
||||
// alternative defaults settings for SINGULARITY target
|
||||
masterConfig.batteryConfig.vbatscale = 77;
|
||||
|
||||
masterConfig.serialConfig.portConfigs[2].functionMask = FUNCTION_RX_SERIAL;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
#include "rx/rx.h"
|
||||
#include "common/maths.h"
|
||||
|
||||
#ifndef VBAT_SCALE_DEFAULT
|
||||
#define VBAT_SCALE_DEFAULT 110
|
||||
#endif
|
||||
#define VBAT_RESDIVVAL_DEFAULT 10
|
||||
#define VBAT_RESDIVMULTIPLIER_DEFAULT 1
|
||||
#define VBAT_SCALE_MIN 0
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#pragma once
|
||||
|
||||
#define TARGET_BOARD_IDENTIFIER "AFF3" // AlienFlight F3.
|
||||
#define ALIENFLIGHT
|
||||
|
||||
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
|
||||
|
||||
|
@ -118,9 +119,7 @@
|
|||
#define ADC_INSTANCE ADC2
|
||||
//#define BOARD_HAS_VOLTAGE_DIVIDER
|
||||
#define VBAT_ADC_PIN PA4
|
||||
|
||||
// alternative defaults for AlienFlight F3 target
|
||||
#define ALIENFLIGHT
|
||||
#define VBAT_SCALE_DEFAULT 20
|
||||
|
||||
#define SPEKTRUM_BIND
|
||||
// USART2, PA3
|
||||
|
|
|
@ -73,11 +73,14 @@
|
|||
#define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
|
||||
|
||||
#define USE_ADC
|
||||
#define VBAT_SCALE_DEFAULT 164
|
||||
#define ADC_INSTANCE ADC1
|
||||
#define VBAT_ADC_PIN PA0
|
||||
//#define CURRENT_METER_ADC_PIN PA5
|
||||
//#define RSSI_ADC_PIN PB2
|
||||
|
||||
#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
|
||||
#define DEFAULT_FEATURES FEATURE_VBAT
|
||||
|
||||
#define SPEKTRUM_BIND
|
||||
#define BIND_PIN PB4
|
||||
|
|
|
@ -95,6 +95,7 @@
|
|||
|
||||
#define ADC_INSTANCE ADC2
|
||||
#define VBAT_ADC_PIN PB2
|
||||
#define VBAT_SCALE_DEFAULT 77
|
||||
|
||||
#define LED_STRIP
|
||||
#define LED_STRIP_TIMER TIM1
|
||||
|
|
Loading…
Reference in New Issue