Merge pull request #669 from AlienWiiBF/Config_cleanup
Move custom configuration for AlienFlight and Colibri Race to target directory
This commit is contained in:
commit
fe414319a3
|
@ -89,6 +89,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void useRcControlsConfig(modeActivationCondition_t *modeActivationConditions, escAndServoConfig_t *escAndServoConfigToUse, pidProfile_t *pidProfileToUse);
|
void useRcControlsConfig(modeActivationCondition_t *modeActivationConditions, escAndServoConfig_t *escAndServoConfigToUse, pidProfile_t *pidProfileToUse);
|
||||||
|
void targetConfiguration(void);
|
||||||
|
|
||||||
#if !defined(FLASH_SIZE)
|
#if !defined(FLASH_SIZE)
|
||||||
#error "Flash size not defined for target. (specify in KB)"
|
#error "Flash size not defined for target. (specify in KB)"
|
||||||
|
@ -652,41 +653,8 @@ static void resetConf(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// alternative defaults settings for COLIBRI RACE targets
|
|
||||||
#if defined(COLIBRI_RACE)
|
|
||||||
masterConfig.escAndServoConfig.minthrottle = 1025;
|
|
||||||
masterConfig.escAndServoConfig.maxthrottle = 1980;
|
|
||||||
masterConfig.batteryConfig.vbatmaxcellvoltage = 45;
|
|
||||||
masterConfig.batteryConfig.vbatmincellvoltage = 30;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(TARGET_CONFIG)
|
#if defined(TARGET_CONFIG)
|
||||||
targetConfiguration(&masterConfig);
|
targetConfiguration();
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(ALIENFLIGHT)
|
|
||||||
featureClear(FEATURE_ONESHOT125);
|
|
||||||
#ifdef ALIENFLIGHTF3
|
|
||||||
masterConfig.mag_hardware = MAG_NONE; // disabled by default
|
|
||||||
#endif
|
|
||||||
masterConfig.rxConfig.spektrum_sat_bind = 5;
|
|
||||||
masterConfig.rxConfig.spektrum_sat_bind_autoreset = 1;
|
|
||||||
masterConfig.motor_pwm_rate = 32000;
|
|
||||||
masterConfig.failsafeConfig.failsafe_delay = 2;
|
|
||||||
masterConfig.failsafeConfig.failsafe_off_delay = 0;
|
|
||||||
currentControlRateProfile->rates[FD_PITCH] = 40;
|
|
||||||
currentControlRateProfile->rates[FD_ROLL] = 40;
|
|
||||||
currentControlRateProfile->rates[FD_YAW] = 40;
|
|
||||||
parseRcChannels("TAER1234", &masterConfig.rxConfig);
|
|
||||||
|
|
||||||
masterConfig.customMotorMixer[0] = (motorMixer_t){ 1.0f, -0.414178f, 1.0f, -1.0f }; // REAR_R
|
|
||||||
masterConfig.customMotorMixer[1] = (motorMixer_t){ 1.0f, -0.414178f, -1.0f, 1.0f }; // FRONT_R
|
|
||||||
masterConfig.customMotorMixer[2] = (motorMixer_t){ 1.0f, 0.414178f, 1.0f, 1.0f }; // REAR_L
|
|
||||||
masterConfig.customMotorMixer[3] = (motorMixer_t){ 1.0f, 0.414178f, -1.0f, -1.0f }; // FRONT_L
|
|
||||||
masterConfig.customMotorMixer[4] = (motorMixer_t){ 1.0f, -1.0f, -0.414178f, -1.0f }; // MIDFRONT_R
|
|
||||||
masterConfig.customMotorMixer[5] = (motorMixer_t){ 1.0f, 1.0f, -0.414178f, 1.0f }; // MIDFRONT_L
|
|
||||||
masterConfig.customMotorMixer[6] = (motorMixer_t){ 1.0f, -1.0f, 0.414178f, 1.0f }; // MIDREAR_R
|
|
||||||
masterConfig.customMotorMixer[7] = (motorMixer_t){ 1.0f, 1.0f, 0.414178f, -1.0f }; // MIDREAR_L#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// copy first profile into remaining profile
|
// copy first profile into remaining profile
|
||||||
|
|
|
@ -0,0 +1,100 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Cleanflight.
|
||||||
|
*
|
||||||
|
* Cleanflight is free software: you can redistribute it and/or modify
|
||||||
|
* it 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 is distributed in the hope that it 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <platform.h>
|
||||||
|
|
||||||
|
#include "build_config.h"
|
||||||
|
|
||||||
|
#include "blackbox/blackbox_io.h"
|
||||||
|
|
||||||
|
#include "common/color.h"
|
||||||
|
#include "common/axis.h"
|
||||||
|
#include "common/filter.h"
|
||||||
|
|
||||||
|
#include "drivers/sensor.h"
|
||||||
|
#include "drivers/accgyro.h"
|
||||||
|
#include "drivers/compass.h"
|
||||||
|
#include "drivers/system.h"
|
||||||
|
#include "drivers/timer.h"
|
||||||
|
#include "drivers/pwm_rx.h"
|
||||||
|
#include "drivers/serial.h"
|
||||||
|
#include "drivers/pwm_output.h"
|
||||||
|
#include "drivers/max7456.h"
|
||||||
|
#include "drivers/io.h"
|
||||||
|
#include "drivers/pwm_mapping.h"
|
||||||
|
|
||||||
|
#include "sensors/sensors.h"
|
||||||
|
#include "sensors/gyro.h"
|
||||||
|
#include "sensors/compass.h"
|
||||||
|
#include "sensors/acceleration.h"
|
||||||
|
#include "sensors/barometer.h"
|
||||||
|
#include "sensors/boardalignment.h"
|
||||||
|
#include "sensors/battery.h"
|
||||||
|
|
||||||
|
#include "io/beeper.h"
|
||||||
|
#include "io/serial.h"
|
||||||
|
#include "io/gimbal.h"
|
||||||
|
#include "io/escservo.h"
|
||||||
|
#include "io/rc_controls.h"
|
||||||
|
#include "io/rc_curves.h"
|
||||||
|
#include "io/ledstrip.h"
|
||||||
|
#include "io/gps.h"
|
||||||
|
#include "io/osd.h"
|
||||||
|
#include "io/vtx.h"
|
||||||
|
|
||||||
|
#include "rx/rx.h"
|
||||||
|
|
||||||
|
#include "telemetry/telemetry.h"
|
||||||
|
|
||||||
|
#include "flight/mixer.h"
|
||||||
|
#include "flight/pid.h"
|
||||||
|
#include "flight/imu.h"
|
||||||
|
#include "flight/failsafe.h"
|
||||||
|
#include "flight/altitudehold.h"
|
||||||
|
#include "flight/navigation.h"
|
||||||
|
|
||||||
|
#include "config/runtime_config.h"
|
||||||
|
#include "config/config.h"
|
||||||
|
|
||||||
|
#include "config/config_profile.h"
|
||||||
|
#include "config/config_master.h"
|
||||||
|
|
||||||
|
// alternative defaults settings for AlienFlight targets
|
||||||
|
void targetConfiguration(void) {
|
||||||
|
featureClear(FEATURE_ONESHOT125);
|
||||||
|
masterConfig.mag_hardware = MAG_NONE; // disabled by default
|
||||||
|
masterConfig.rxConfig.spektrum_sat_bind = 5;
|
||||||
|
masterConfig.rxConfig.spektrum_sat_bind_autoreset = 1;
|
||||||
|
masterConfig.motor_pwm_rate = 32000;
|
||||||
|
masterConfig.failsafeConfig.failsafe_delay = 2;
|
||||||
|
masterConfig.failsafeConfig.failsafe_off_delay = 0;
|
||||||
|
currentControlRateProfile->rates[FD_PITCH] = 40;
|
||||||
|
currentControlRateProfile->rates[FD_ROLL] = 40;
|
||||||
|
currentControlRateProfile->rates[FD_YAW] = 40;
|
||||||
|
parseRcChannels("TAER1234", &masterConfig.rxConfig);
|
||||||
|
|
||||||
|
masterConfig.customMotorMixer[0] = (motorMixer_t){ 1.0f, -0.414178f, 1.0f, -1.0f }; // REAR_R
|
||||||
|
masterConfig.customMotorMixer[1] = (motorMixer_t){ 1.0f, -0.414178f, -1.0f, 1.0f }; // FRONT_R
|
||||||
|
masterConfig.customMotorMixer[2] = (motorMixer_t){ 1.0f, 0.414178f, 1.0f, 1.0f }; // REAR_L
|
||||||
|
masterConfig.customMotorMixer[3] = (motorMixer_t){ 1.0f, 0.414178f, -1.0f, -1.0f }; // FRONT_L
|
||||||
|
masterConfig.customMotorMixer[4] = (motorMixer_t){ 1.0f, -1.0f, -0.414178f, -1.0f }; // MIDFRONT_R
|
||||||
|
masterConfig.customMotorMixer[5] = (motorMixer_t){ 1.0f, 1.0f, -0.414178f, 1.0f }; // MIDFRONT_L
|
||||||
|
masterConfig.customMotorMixer[6] = (motorMixer_t){ 1.0f, -1.0f, 0.414178f, 1.0f }; // MIDREAR_R
|
||||||
|
masterConfig.customMotorMixer[7] = (motorMixer_t){ 1.0f, 1.0f, 0.414178f, -1.0f }; // MIDREAR_L#endif
|
||||||
|
}
|
|
@ -18,7 +18,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define TARGET_BOARD_IDENTIFIER "AFF3" // AlienFlight F3.
|
#define TARGET_BOARD_IDENTIFIER "AFF3" // AlienFlight F3.
|
||||||
#define ALIENFLIGHT
|
#define TARGET_CONFIG
|
||||||
|
|
||||||
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
|
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,100 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Cleanflight.
|
||||||
|
*
|
||||||
|
* Cleanflight is free software: you can redistribute it and/or modify
|
||||||
|
* it 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 is distributed in the hope that it 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <platform.h>
|
||||||
|
|
||||||
|
#include "build_config.h"
|
||||||
|
|
||||||
|
#include "blackbox/blackbox_io.h"
|
||||||
|
|
||||||
|
#include "common/color.h"
|
||||||
|
#include "common/axis.h"
|
||||||
|
#include "common/filter.h"
|
||||||
|
|
||||||
|
#include "drivers/sensor.h"
|
||||||
|
#include "drivers/accgyro.h"
|
||||||
|
#include "drivers/compass.h"
|
||||||
|
#include "drivers/system.h"
|
||||||
|
#include "drivers/timer.h"
|
||||||
|
#include "drivers/pwm_rx.h"
|
||||||
|
#include "drivers/serial.h"
|
||||||
|
#include "drivers/pwm_output.h"
|
||||||
|
#include "drivers/max7456.h"
|
||||||
|
#include "drivers/io.h"
|
||||||
|
#include "drivers/pwm_mapping.h"
|
||||||
|
|
||||||
|
#include "sensors/sensors.h"
|
||||||
|
#include "sensors/gyro.h"
|
||||||
|
#include "sensors/compass.h"
|
||||||
|
#include "sensors/acceleration.h"
|
||||||
|
#include "sensors/barometer.h"
|
||||||
|
#include "sensors/boardalignment.h"
|
||||||
|
#include "sensors/battery.h"
|
||||||
|
|
||||||
|
#include "io/beeper.h"
|
||||||
|
#include "io/serial.h"
|
||||||
|
#include "io/gimbal.h"
|
||||||
|
#include "io/escservo.h"
|
||||||
|
#include "io/rc_controls.h"
|
||||||
|
#include "io/rc_curves.h"
|
||||||
|
#include "io/ledstrip.h"
|
||||||
|
#include "io/gps.h"
|
||||||
|
#include "io/osd.h"
|
||||||
|
#include "io/vtx.h"
|
||||||
|
|
||||||
|
#include "rx/rx.h"
|
||||||
|
|
||||||
|
#include "telemetry/telemetry.h"
|
||||||
|
|
||||||
|
#include "flight/mixer.h"
|
||||||
|
#include "flight/pid.h"
|
||||||
|
#include "flight/imu.h"
|
||||||
|
#include "flight/failsafe.h"
|
||||||
|
#include "flight/altitudehold.h"
|
||||||
|
#include "flight/navigation.h"
|
||||||
|
|
||||||
|
#include "config/runtime_config.h"
|
||||||
|
#include "config/config.h"
|
||||||
|
|
||||||
|
#include "config/config_profile.h"
|
||||||
|
#include "config/config_master.h"
|
||||||
|
|
||||||
|
// alternative defaults settings for AlienFlight targets
|
||||||
|
void targetConfiguration(void) {
|
||||||
|
featureClear(FEATURE_ONESHOT125);
|
||||||
|
masterConfig.mag_hardware = MAG_NONE; // disabled by default
|
||||||
|
masterConfig.rxConfig.spektrum_sat_bind = 5;
|
||||||
|
masterConfig.rxConfig.spektrum_sat_bind_autoreset = 1;
|
||||||
|
masterConfig.motor_pwm_rate = 32000;
|
||||||
|
masterConfig.failsafeConfig.failsafe_delay = 2;
|
||||||
|
masterConfig.failsafeConfig.failsafe_off_delay = 0;
|
||||||
|
currentControlRateProfile->rates[FD_PITCH] = 40;
|
||||||
|
currentControlRateProfile->rates[FD_ROLL] = 40;
|
||||||
|
currentControlRateProfile->rates[FD_YAW] = 40;
|
||||||
|
parseRcChannels("TAER1234", &masterConfig.rxConfig);
|
||||||
|
|
||||||
|
masterConfig.customMotorMixer[0] = (motorMixer_t){ 1.0f, -0.414178f, 1.0f, -1.0f }; // REAR_R
|
||||||
|
masterConfig.customMotorMixer[1] = (motorMixer_t){ 1.0f, -0.414178f, -1.0f, 1.0f }; // FRONT_R
|
||||||
|
masterConfig.customMotorMixer[2] = (motorMixer_t){ 1.0f, 0.414178f, 1.0f, 1.0f }; // REAR_L
|
||||||
|
masterConfig.customMotorMixer[3] = (motorMixer_t){ 1.0f, 0.414178f, -1.0f, -1.0f }; // FRONT_L
|
||||||
|
masterConfig.customMotorMixer[4] = (motorMixer_t){ 1.0f, -1.0f, -0.414178f, -1.0f }; // MIDFRONT_R
|
||||||
|
masterConfig.customMotorMixer[5] = (motorMixer_t){ 1.0f, 1.0f, -0.414178f, 1.0f }; // MIDFRONT_L
|
||||||
|
masterConfig.customMotorMixer[6] = (motorMixer_t){ 1.0f, -1.0f, 0.414178f, 1.0f }; // MIDREAR_R
|
||||||
|
masterConfig.customMotorMixer[7] = (motorMixer_t){ 1.0f, 1.0f, 0.414178f, -1.0f }; // MIDREAR_L#endif
|
||||||
|
}
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#define TARGET_BOARD_IDENTIFIER "AFF4"
|
#define TARGET_BOARD_IDENTIFIER "AFF4"
|
||||||
|
#define TARGET_CONFIG
|
||||||
|
|
||||||
#define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8)
|
#define CONFIG_START_FLASH_ADDRESS (0x08080000) //0x08080000 to 0x080A0000 (FLASH_Sector_8)
|
||||||
|
|
||||||
|
@ -153,9 +154,6 @@
|
||||||
//#define WS2811_DMA_CHANNEL DMA1_Channel3
|
//#define WS2811_DMA_CHANNEL DMA1_Channel3
|
||||||
//#define WS2811_IRQ DMA1_Channel3_IRQn
|
//#define WS2811_IRQ DMA1_Channel3_IRQn
|
||||||
|
|
||||||
// alternative defaults for AlienFlight F4 target
|
|
||||||
#define ALIENFLIGHT
|
|
||||||
|
|
||||||
#define SPEKTRUM_BIND
|
#define SPEKTRUM_BIND
|
||||||
// USART2, PA3
|
// USART2, PA3
|
||||||
#define BIND_PIN PA3
|
#define BIND_PIN PA3
|
||||||
|
|
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Cleanflight.
|
||||||
|
*
|
||||||
|
* Cleanflight is free software: you can redistribute it and/or modify
|
||||||
|
* it 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 is distributed in the hope that it 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <platform.h>
|
||||||
|
|
||||||
|
#include "build_config.h"
|
||||||
|
|
||||||
|
#include "blackbox/blackbox_io.h"
|
||||||
|
|
||||||
|
#include "common/color.h"
|
||||||
|
#include "common/axis.h"
|
||||||
|
#include "common/filter.h"
|
||||||
|
|
||||||
|
#include "drivers/sensor.h"
|
||||||
|
#include "drivers/accgyro.h"
|
||||||
|
#include "drivers/compass.h"
|
||||||
|
#include "drivers/system.h"
|
||||||
|
#include "drivers/timer.h"
|
||||||
|
#include "drivers/pwm_rx.h"
|
||||||
|
#include "drivers/serial.h"
|
||||||
|
#include "drivers/pwm_output.h"
|
||||||
|
#include "drivers/max7456.h"
|
||||||
|
#include "drivers/io.h"
|
||||||
|
#include "drivers/pwm_mapping.h"
|
||||||
|
|
||||||
|
#include "sensors/sensors.h"
|
||||||
|
#include "sensors/gyro.h"
|
||||||
|
#include "sensors/compass.h"
|
||||||
|
#include "sensors/acceleration.h"
|
||||||
|
#include "sensors/barometer.h"
|
||||||
|
#include "sensors/boardalignment.h"
|
||||||
|
#include "sensors/battery.h"
|
||||||
|
|
||||||
|
#include "io/beeper.h"
|
||||||
|
#include "io/serial.h"
|
||||||
|
#include "io/gimbal.h"
|
||||||
|
#include "io/escservo.h"
|
||||||
|
#include "io/rc_controls.h"
|
||||||
|
#include "io/rc_curves.h"
|
||||||
|
#include "io/ledstrip.h"
|
||||||
|
#include "io/gps.h"
|
||||||
|
#include "io/osd.h"
|
||||||
|
#include "io/vtx.h"
|
||||||
|
|
||||||
|
#include "rx/rx.h"
|
||||||
|
|
||||||
|
#include "telemetry/telemetry.h"
|
||||||
|
|
||||||
|
#include "flight/mixer.h"
|
||||||
|
#include "flight/pid.h"
|
||||||
|
#include "flight/imu.h"
|
||||||
|
#include "flight/failsafe.h"
|
||||||
|
#include "flight/altitudehold.h"
|
||||||
|
#include "flight/navigation.h"
|
||||||
|
|
||||||
|
#include "config/runtime_config.h"
|
||||||
|
#include "config/config.h"
|
||||||
|
|
||||||
|
#include "config/config_profile.h"
|
||||||
|
#include "config/config_master.h"
|
||||||
|
|
||||||
|
// alternative defaults settings for COLIBRI RACE targets
|
||||||
|
void targetConfiguration(void) {
|
||||||
|
masterConfig.escAndServoConfig.minthrottle = 1025;
|
||||||
|
masterConfig.escAndServoConfig.maxthrottle = 1980;
|
||||||
|
masterConfig.batteryConfig.vbatmaxcellvoltage = 45;
|
||||||
|
masterConfig.batteryConfig.vbatmincellvoltage = 30;
|
||||||
|
}
|
|
@ -20,6 +20,7 @@
|
||||||
#define TARGET_BOARD_IDENTIFIER "CLBR"
|
#define TARGET_BOARD_IDENTIFIER "CLBR"
|
||||||
#define BST_DEVICE_NAME "COLIBRI RACE"
|
#define BST_DEVICE_NAME "COLIBRI RACE"
|
||||||
#define BST_DEVICE_NAME_LENGTH 12
|
#define BST_DEVICE_NAME_LENGTH 12
|
||||||
|
#define TARGET_CONFIG
|
||||||
|
|
||||||
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
|
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,99 @@
|
||||||
|
/*
|
||||||
|
* This file is part of Cleanflight.
|
||||||
|
*
|
||||||
|
* Cleanflight is free software: you can redistribute it and/or modify
|
||||||
|
* it 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 is distributed in the hope that it 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <platform.h>
|
||||||
|
|
||||||
|
#include "build_config.h"
|
||||||
|
|
||||||
|
#include "blackbox/blackbox_io.h"
|
||||||
|
|
||||||
|
#include "common/color.h"
|
||||||
|
#include "common/axis.h"
|
||||||
|
#include "common/filter.h"
|
||||||
|
|
||||||
|
#include "drivers/sensor.h"
|
||||||
|
#include "drivers/accgyro.h"
|
||||||
|
#include "drivers/compass.h"
|
||||||
|
#include "drivers/system.h"
|
||||||
|
#include "drivers/timer.h"
|
||||||
|
#include "drivers/pwm_rx.h"
|
||||||
|
#include "drivers/serial.h"
|
||||||
|
#include "drivers/pwm_output.h"
|
||||||
|
#include "drivers/max7456.h"
|
||||||
|
#include "drivers/io.h"
|
||||||
|
#include "drivers/pwm_mapping.h"
|
||||||
|
|
||||||
|
#include "sensors/sensors.h"
|
||||||
|
#include "sensors/gyro.h"
|
||||||
|
#include "sensors/compass.h"
|
||||||
|
#include "sensors/acceleration.h"
|
||||||
|
#include "sensors/barometer.h"
|
||||||
|
#include "sensors/boardalignment.h"
|
||||||
|
#include "sensors/battery.h"
|
||||||
|
|
||||||
|
#include "io/beeper.h"
|
||||||
|
#include "io/serial.h"
|
||||||
|
#include "io/gimbal.h"
|
||||||
|
#include "io/escservo.h"
|
||||||
|
#include "io/rc_controls.h"
|
||||||
|
#include "io/rc_curves.h"
|
||||||
|
#include "io/ledstrip.h"
|
||||||
|
#include "io/gps.h"
|
||||||
|
#include "io/osd.h"
|
||||||
|
#include "io/vtx.h"
|
||||||
|
|
||||||
|
#include "rx/rx.h"
|
||||||
|
|
||||||
|
#include "telemetry/telemetry.h"
|
||||||
|
|
||||||
|
#include "flight/mixer.h"
|
||||||
|
#include "flight/pid.h"
|
||||||
|
#include "flight/imu.h"
|
||||||
|
#include "flight/failsafe.h"
|
||||||
|
#include "flight/altitudehold.h"
|
||||||
|
#include "flight/navigation.h"
|
||||||
|
|
||||||
|
#include "config/runtime_config.h"
|
||||||
|
#include "config/config.h"
|
||||||
|
|
||||||
|
#include "config/config_profile.h"
|
||||||
|
#include "config/config_master.h"
|
||||||
|
|
||||||
|
// alternative defaults settings for AlienFlight targets
|
||||||
|
void targetConfiguration(void) {
|
||||||
|
featureClear(FEATURE_ONESHOT125);
|
||||||
|
masterConfig.rxConfig.spektrum_sat_bind = 5;
|
||||||
|
masterConfig.rxConfig.spektrum_sat_bind_autoreset = 1;
|
||||||
|
masterConfig.motor_pwm_rate = 32000;
|
||||||
|
masterConfig.failsafeConfig.failsafe_delay = 2;
|
||||||
|
masterConfig.failsafeConfig.failsafe_off_delay = 0;
|
||||||
|
currentControlRateProfile->rates[FD_PITCH] = 40;
|
||||||
|
currentControlRateProfile->rates[FD_ROLL] = 40;
|
||||||
|
currentControlRateProfile->rates[FD_YAW] = 40;
|
||||||
|
parseRcChannels("TAER1234", &masterConfig.rxConfig);
|
||||||
|
|
||||||
|
masterConfig.customMotorMixer[0] = (motorMixer_t){ 1.0f, -0.414178f, 1.0f, -1.0f }; // REAR_R
|
||||||
|
masterConfig.customMotorMixer[1] = (motorMixer_t){ 1.0f, -0.414178f, -1.0f, 1.0f }; // FRONT_R
|
||||||
|
masterConfig.customMotorMixer[2] = (motorMixer_t){ 1.0f, 0.414178f, 1.0f, 1.0f }; // REAR_L
|
||||||
|
masterConfig.customMotorMixer[3] = (motorMixer_t){ 1.0f, 0.414178f, -1.0f, -1.0f }; // FRONT_L
|
||||||
|
masterConfig.customMotorMixer[4] = (motorMixer_t){ 1.0f, -1.0f, -0.414178f, -1.0f }; // MIDFRONT_R
|
||||||
|
masterConfig.customMotorMixer[5] = (motorMixer_t){ 1.0f, 1.0f, -0.414178f, 1.0f }; // MIDFRONT_L
|
||||||
|
masterConfig.customMotorMixer[6] = (motorMixer_t){ 1.0f, -1.0f, 0.414178f, 1.0f }; // MIDREAR_R
|
||||||
|
masterConfig.customMotorMixer[7] = (motorMixer_t){ 1.0f, 1.0f, 0.414178f, -1.0f }; // MIDREAR_L#endif
|
||||||
|
}
|
|
@ -172,7 +172,7 @@
|
||||||
// alternative defaults for AlienFlight F1 target
|
// alternative defaults for AlienFlight F1 target
|
||||||
#undef TARGET_BOARD_IDENTIFIER
|
#undef TARGET_BOARD_IDENTIFIER
|
||||||
#define TARGET_BOARD_IDENTIFIER "AFF1" // AlienFlight F1.
|
#define TARGET_BOARD_IDENTIFIER "AFF1" // AlienFlight F1.
|
||||||
#define ALIENFLIGHT
|
#define TARGET_CONFIG
|
||||||
|
|
||||||
#undef BOARD_HAS_VOLTAGE_DIVIDER
|
#undef BOARD_HAS_VOLTAGE_DIVIDER
|
||||||
#undef USE_SERIAL_4WAY_BLHELI_INTERFACE
|
#undef USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||||
|
|
Loading…
Reference in New Issue