mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-20 14:55:18 +03:00
Allow max motors to be set in target.h
This commit is contained in:
parent
5ec4cf715a
commit
941b72b36f
5 changed files with 73 additions and 29 deletions
|
@ -19,15 +19,23 @@
|
|||
#include "gpio.h"
|
||||
#include "timer.h"
|
||||
|
||||
#if defined(USE_QUAD_MIXER_ONLY)
|
||||
#define MAX_PWM_MOTORS 4
|
||||
#define MAX_PWM_SERVOS 1
|
||||
#define MAX_MOTORS 4
|
||||
#define MAX_SERVOS 1
|
||||
|
||||
#elif defined(TARGET_MOTOR_COUNT)
|
||||
#define MAX_PWM_MOTORS TARGET_MOTOR_COUNT
|
||||
#define MAX_PWM_SERVOS 8
|
||||
#define MAX_MOTORS TARGET_MOTOR_COUNT
|
||||
#define MAX_SERVOS 8
|
||||
|
||||
#else
|
||||
#define MAX_PWM_MOTORS 12
|
||||
#define MAX_PWM_SERVOS 8
|
||||
|
||||
#define MAX_MOTORS 12
|
||||
#define MAX_SERVOS 8
|
||||
#define MAX_PWM_OUTPUT_PORTS MAX_PWM_MOTORS // must be set to the largest of either MAX_MOTORS or MAX_SERVOS
|
||||
|
||||
#if MAX_PWM_OUTPUT_PORTS < MAX_MOTORS || MAX_PWM_OUTPUT_PORTS < MAX_SERVOS
|
||||
#error Invalid motor/servo/port configuration
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue