Create release.yml
[betaflight.git] / src / main / target / SPRACINGF3EVO / config.c
blob3efdce7fb1faaa5f1b4a317c632bf8c7081bdccf
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #include "platform.h"
23 #ifdef USE_TARGET_CONFIG
25 #include "common/axis.h"
27 #include "flight/pid.h"
29 #include "pg/sdcard.h"
30 #include "pg/motor.h"
33 #if defined(SPRACINGF3MQ)
34 #ifdef BRUSHED_MOTORS_PWM_RATE
35 #undef BRUSHED_MOTORS_PWM_RATE
36 #endif
38 #define BRUSHED_MOTORS_PWM_RATE 32000 // 32kHz
39 #endif
41 void targetConfiguration(void)
43 // Temporary workaround: Disable SDCard DMA by default since it causes errors on this target
45 #if defined(SPRACINGF3MQ)
47 motorConfigMutable()->dev.motorPwmRate = BRUSHED_MOTORS_PWM_RATE;
49 for (uint8_t pidProfileIndex = 0; pidProfileIndex < PID_PROFILE_COUNT; pidProfileIndex++) {
50 pidProfile_t *pidProfile = pidProfilesMutable(pidProfileIndex);
52 pidProfile->pid[FD_ROLL].P = 90;
53 pidProfile->pid[FD_ROLL].I = 44;
54 pidProfile->pid[FD_ROLL].D = 60;
55 pidProfile->pid[FD_PITCH].P = 90;
56 pidProfile->pid[FD_PITCH].I = 44;
57 pidProfile->pid[FD_PITCH].D = 60;
59 #endif
61 #endif