1
0
Fork 0
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:
Martin Budden 2017-07-29 21:02:10 +01:00
parent c750918e8b
commit 554bd1257d
5 changed files with 40 additions and 11 deletions

View file

@ -17,18 +17,12 @@
#pragma once #pragma once
#include "platform.h"
#include "drivers/io_types.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 #define DSHOT_MAX_COMMAND 47

View 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

View file

@ -17,7 +17,10 @@
#pragma once #pragma once
#include "platform.h"
#include "config/parameter_group.h" #include "config/parameter_group.h"
#include "drivers/pwm_output_counts.h"
#include "drivers/io_types.h" #include "drivers/io_types.h"
#include "drivers/pwm_output.h" #include "drivers/pwm_output.h"

View file

@ -181,6 +181,8 @@
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
#define MAX_SUPPORTED_MOTORS 12
// IO - 303 in 100pin package // IO - 303 in 100pin package
#define TARGET_IO_PORTA 0xffff #define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff #define TARGET_IO_PORTB 0xffff

View file

@ -36,7 +36,6 @@
// Using RX DMA disables the use of receive callbacks // Using RX DMA disables the use of receive callbacks
#define USE_UART1_RX_DMA #define USE_UART1_RX_DMA
#define USE_UART1_TX_DMA #define USE_UART1_TX_DMA
#define MAX_SUPPORTED_MOTORS 8
#endif #endif
#ifdef STM32F3 #ifdef STM32F3