mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Fix merge // Add target config bff3
This commit is contained in:
parent
a3c61a5114
commit
63b7e3eaa2
3 changed files with 47 additions and 2 deletions
|
@ -938,7 +938,7 @@ void activateConfig(void)
|
|||
void validateAndFixConfig(void)
|
||||
{
|
||||
if ((motorConfig()->motorPwmProtocol == PWM_TYPE_BRUSHED) && (motorConfig()->mincommand < 1000)) {
|
||||
motorConfigMutable()->mincommand = 1000;
|
||||
motorConfig()->mincommand = 1000;
|
||||
}
|
||||
|
||||
if ((motorConfig()->motorPwmProtocol == PWM_TYPE_STANDARD) && (motorConfig()->motorPwmRate > 400)) {
|
||||
|
@ -1115,7 +1115,7 @@ void validateAndFixGyroConfig(void)
|
|||
|
||||
if (pidLooptime < motorUpdateRestriction) {
|
||||
const uint8_t maxPidProcessDenom = constrain(motorUpdateRestriction / (samplingTime * gyroConfig()->gyro_sync_denom), 1, MAX_PID_PROCESS_DENOM);
|
||||
pidConfigMutable()->pid_process_denom = MIN(pidConfigMutable()->pid_process_denom, maxPidProcessDenom);
|
||||
pidConfig()->pid_process_denom = MIN(pidConfig()->pid_process_denom, maxPidProcessDenom);
|
||||
}
|
||||
|
||||
// Prevent overriding the max rate of motors
|
||||
|
|
44
src/main/target/BETAFLIGHTF3/config.c
Executable file
44
src/main/target/BETAFLIGHTF3/config.c
Executable file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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 <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <platform.h>
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "drivers/io.h"
|
||||
|
||||
#include "fc/rc_controls.h"
|
||||
|
||||
#include "flight/failsafe.h"
|
||||
#include "flight/mixer.h"
|
||||
#include "flight/pid.h"
|
||||
|
||||
#include "rx/rx.h"
|
||||
|
||||
#include "config/config_profile.h"
|
||||
#include "config/config_master.h"
|
||||
|
||||
void targetConfiguration(master_t *config)
|
||||
{
|
||||
UNUSED(config);
|
||||
|
||||
batteryConfig->currentMeterScale = 235;
|
||||
}
|
||||
|
|
@ -21,6 +21,7 @@
|
|||
#define TARGET_BOARD_IDENTIFIER "BFF3"
|
||||
|
||||
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_NONE
|
||||
#define TARGET_CONFIG
|
||||
|
||||
#define BEEPER PC15
|
||||
#define BEEPER_INVERTED
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue