Updated config file changes to support latest BF implementation of config.

Includes: @larryho5 commit "fix the CorePro setting serial rx problem"
This commit is contained in:
blckmn 2016-12-31 08:07:45 +11:00
parent cba064a05a
commit 1de0f00dd6
2 changed files with 57 additions and 0 deletions

View File

@ -25,12 +25,62 @@
#include "sensors/battery.h"
#include "config/config_master.h"
#include "config/feature.h"
// alternative defaults settings for COLIBRI RACE targets
void targetConfiguration(master_t *config)
{
config->motorConfig.minthrottle = 1025;
config->motorConfig.maxthrottle = 1980;
config->motorConfig.mincommand = 1000;
config->servoConfig.servoCenterPulse = 1500;
config->batteryConfig.vbatmaxcellvoltage = 45;
config->batteryConfig.vbatmincellvoltage = 30;
config->batteryConfig.vbatwarningcellvoltage = 35;
config->flight3DConfig.deadband3d_low = 1406;
config->flight3DConfig.deadband3d_high = 1514;
config->flight3DConfig.neutral3d = 1460;
config->flight3DConfig.deadband3d_throttle = 0;
config->failsafeConfig.failsafe_procedure = 1;
config->failsafeConfig.failsafe_throttle_low_delay = 10;
config->gyroConfig.gyro_sync_denom = 1;
config->pidConfig.pid_process_denom = 3;
config->blackboxConfig.rate_num = 1;
config->blackboxConfig.rate_denom = 1;
config->rcControlsConfig.deadband = 5;
config->rcControlsConfig.yaw_deadband = 5;
config->failsafeConfig.failsafe_delay = 10;
config->telemetryConfig.telemetry_inversion = 1;
config->profile[0].pidProfile.vbatPidCompensation = 1;
config->profile[0].pidProfile.P8[ROLL] = 46; // new PID with preliminary defaults test carefully
config->profile[0].pidProfile.I8[ROLL] = 48;
config->profile[0].pidProfile.D8[ROLL] = 23;
config->profile[0].pidProfile.P8[PITCH] = 89;
config->profile[0].pidProfile.I8[PITCH] = 59;
config->profile[0].pidProfile.D8[PITCH] = 25;
config->profile[0].pidProfile.P8[YAW] = 129;
config->profile[0].pidProfile.I8[YAW] = 50;
config->profile[0].pidProfile.D8[YAW] = 20;
config->profile[0].controlRateProfile[0].rates[FD_ROLL] = 86;
config->profile[0].controlRateProfile[0].rates[FD_PITCH] = 86;
config->profile[0].controlRateProfile[0].rates[FD_YAW] = 80;
featureSet(FEATURE_VBAT);
featureSet(FEATURE_RX_PPM);
//featureSet(FEATURE_RX_SERIAL);
featureSet(FEATURE_FAILSAFE);
featureSet(FEATURE_AIRMODE);
featureSet(FEATURE_LED_STRIP);
}

View File

@ -1260,6 +1260,13 @@ static bool bstSlaveProcessWriteCommand(uint8_t bstWriteCommand)
case BST_SET_FEATURE:
featureClearAll();
featureSet(bstRead32()); // features bitmap
#ifdef SERIALRX_UART
if (featureConfigured(FEATURE_RX_SERIAL)) {
serialConfig()->portConfigs[SERIALRX_UART].functionMask = FUNCTION_RX_SERIAL;
} else {
serialConfig()->portConfigs[SERIALRX_UART].functionMask = FUNCTION_NONE;
}
#endif
break;
case BST_SET_BOARD_ALIGNMENT:
boardAlignment()->rollDegrees = bstRead16();