mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 06:15:16 +03:00
Reduced MAX_SUPPORTED_MOTORS from 12 to 8
This commit is contained in:
parent
c750918e8b
commit
554bd1257d
5 changed files with 40 additions and 11 deletions
|
@ -17,18 +17,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#include "drivers/io_types.h"
|
||||
#include "timer.h"
|
||||
#include "drivers/pwm_output_counts.h"
|
||||
#include "drivers/timer.h"
|
||||
|
||||
#ifndef MAX_SUPPORTED_MOTORS
|
||||
#define MAX_SUPPORTED_MOTORS 12
|
||||
#endif
|
||||
|
||||
#if defined(USE_QUAD_MIXER_ONLY)
|
||||
#define MAX_SUPPORTED_SERVOS 1
|
||||
#else
|
||||
#define MAX_SUPPORTED_SERVOS 8
|
||||
#endif
|
||||
|
||||
#define DSHOT_MAX_COMMAND 47
|
||||
|
||||
|
|
31
src/main/drivers/pwm_output_counts.h
Normal file
31
src/main/drivers/pwm_output_counts.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
|
||||
#if defined(USE_QUAD_MIXER_ONLY)
|
||||
#define MAX_SUPPORTED_MOTORS 4
|
||||
#define MAX_SUPPORTED_SERVOS 1
|
||||
#else
|
||||
#ifndef MAX_SUPPORTED_MOTORS
|
||||
#define MAX_SUPPORTED_MOTORS 8
|
||||
#endif
|
||||
#define MAX_SUPPORTED_SERVOS 8
|
||||
#endif
|
|
@ -17,7 +17,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
#include "config/parameter_group.h"
|
||||
#include "drivers/pwm_output_counts.h"
|
||||
#include "drivers/io_types.h"
|
||||
#include "drivers/pwm_output.h"
|
||||
|
||||
|
|
|
@ -181,6 +181,8 @@
|
|||
|
||||
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||
|
||||
#define MAX_SUPPORTED_MOTORS 12
|
||||
|
||||
// IO - 303 in 100pin package
|
||||
#define TARGET_IO_PORTA 0xffff
|
||||
#define TARGET_IO_PORTB 0xffff
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
// Using RX DMA disables the use of receive callbacks
|
||||
#define USE_UART1_RX_DMA
|
||||
#define USE_UART1_TX_DMA
|
||||
#define MAX_SUPPORTED_MOTORS 8
|
||||
#endif
|
||||
|
||||
#ifdef STM32F3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue