mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-20 06:45:14 +03:00
Always unsynched motor update; Deprecate FEATURE_ONESHOT125; motor_pwm_protocol parameter
Support for OS42 and MS protocol Force at least 2kHz update rate with Multishot F4 output timer clocks Documentation update; sanity check for motor_pwm_rate
This commit is contained in:
parent
2b186c8195
commit
e7fade40ad
13 changed files with 164 additions and 117 deletions
|
@ -38,16 +38,12 @@
|
|||
#define MAX_SERVOS 8
|
||||
#endif
|
||||
|
||||
#define PWM_TIMER_MHZ 1
|
||||
|
||||
#define PULSE_1MS (1000) // 1ms pulse width
|
||||
|
||||
#define MAX_INPUTS 8
|
||||
|
||||
#define PWM_TIMER_MHZ 1
|
||||
#define ONESHOT125_TIMER_MHZ 8
|
||||
#define PWM_BRUSHED_TIMER_MHZ 8
|
||||
|
||||
|
||||
typedef struct sonarIOConfig_s {
|
||||
ioTag_t triggerTag;
|
||||
ioTag_t echoTag;
|
||||
|
@ -63,7 +59,7 @@ typedef struct drv_pwm_config_s {
|
|||
bool useUART3;
|
||||
bool useUART6;
|
||||
bool useVbat;
|
||||
bool useOneshot;
|
||||
bool useFastPwm;
|
||||
bool useSoftSerial;
|
||||
bool useLEDStrip;
|
||||
#ifdef SONAR
|
||||
|
@ -76,6 +72,7 @@ typedef struct drv_pwm_config_s {
|
|||
uint16_t servoCenterPulse;
|
||||
#endif
|
||||
bool airplane; // fixed wing hardware config, lots of servos etc
|
||||
uint8_t pwmProtocolType;
|
||||
uint16_t motorPwmRate;
|
||||
uint16_t idlePulse; // PWM value to use when initializing the driver. set this to either PULSE_1MS (regular pwm),
|
||||
// some higher value (used by 3d mode), or 0, for brushed pwm drivers.
|
||||
|
@ -96,7 +93,7 @@ typedef enum {
|
|||
PWM_PF_SERVO = (1 << 1),
|
||||
PWM_PF_MOTOR_MODE_BRUSHED = (1 << 2),
|
||||
PWM_PF_OUTPUT_PROTOCOL_PWM = (1 << 3),
|
||||
PWM_PF_OUTPUT_PROTOCOL_ONESHOT = (1 << 4),
|
||||
PWM_PF_OUTPUT_PROTOCOL_FASTPWM = (1 << 4),
|
||||
PWM_PF_PPM = (1 << 5),
|
||||
PWM_PF_PWM = (1 << 6)
|
||||
} pwmPortFlags_e;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue