mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-24 00:35:34 +03:00
[PWM] Increase servo output count to 16
This commit is contained in:
parent
84270a2c1c
commit
23766e485b
4 changed files with 7 additions and 11 deletions
|
@ -26,10 +26,10 @@
|
|||
|
||||
#include "build_config.h"
|
||||
|
||||
#if MAX_PWM_MOTORS != MAX_SUPPORTED_MOTORS
|
||||
#if MAX_MOTORS != MAX_SUPPORTED_MOTORS
|
||||
#error Motor configuration mismatch
|
||||
#endif
|
||||
|
||||
#if MAX_PWM_SERVOS != MAX_SUPPORTED_SERVOS
|
||||
#if MAX_SERVOS != MAX_SUPPORTED_SERVOS
|
||||
#error Servo configuration mismatch
|
||||
#endif
|
||||
|
|
|
@ -22,16 +22,12 @@
|
|||
#include "flight/servos.h"
|
||||
|
||||
#if 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
|
||||
#define MAX_SERVOS 16
|
||||
|
||||
#else
|
||||
#define MAX_PWM_MOTORS 12
|
||||
#define MAX_PWM_SERVOS 8
|
||||
#define MAX_MOTORS 12
|
||||
#define MAX_SERVOS 8
|
||||
#define MAX_SERVOS 16
|
||||
#endif
|
||||
|
||||
#define PWM_TIMER_HZ 1000000
|
||||
|
|
|
@ -83,11 +83,11 @@ typedef struct {
|
|||
|
||||
static pwmOutputPort_t pwmOutputPorts[MAX_PWM_OUTPUT_PORTS];
|
||||
|
||||
static pwmOutputMotor_t motors[MAX_PWM_MOTORS];
|
||||
static pwmOutputMotor_t motors[MAX_MOTORS];
|
||||
static motorPwmProtocolTypes_e initMotorProtocol;
|
||||
static pwmWriteFuncPtr motorWritePtr = NULL; // Function to write value to motors
|
||||
|
||||
static pwmOutputPort_t * servos[MAX_PWM_SERVOS];
|
||||
static pwmOutputPort_t * servos[MAX_SERVOS];
|
||||
static pwmWriteFuncPtr servoWritePtr = NULL; // Function to write value to motors
|
||||
|
||||
#if defined(USE_DSHOT) || defined(USE_SERIALSHOT)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "config/parameter_group.h"
|
||||
#include "common/logic_condition.h"
|
||||
|
||||
#define MAX_SUPPORTED_SERVOS 8
|
||||
#define MAX_SUPPORTED_SERVOS 16
|
||||
|
||||
// These must be consecutive
|
||||
typedef enum {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue