Use same PWM mapping for PPM and Serial RX
Without this fix an Octocopter with serialh RX will not work. Standard receiver mapping with only 6 motors outputs will apply.
This commit is contained in:
parent
f5a579de14
commit
4b0d5e7e15
|
@ -28,6 +28,7 @@
|
||||||
#include "pwm_output.h"
|
#include "pwm_output.h"
|
||||||
#include "pwm_rx.h"
|
#include "pwm_rx.h"
|
||||||
#include "pwm_mapping.h"
|
#include "pwm_mapping.h"
|
||||||
|
#include "config/config.h"
|
||||||
/*
|
/*
|
||||||
Configuration maps
|
Configuration maps
|
||||||
|
|
||||||
|
@ -257,7 +258,7 @@ pwmOutputConfiguration_t *pwmInit(drv_pwm_config_t *init)
|
||||||
// this is pretty hacky shit, but it will do for now. array of 4 config maps, [ multiPWM multiPPM airPWM airPPM ]
|
// this is pretty hacky shit, but it will do for now. array of 4 config maps, [ multiPWM multiPPM airPWM airPPM ]
|
||||||
if (init->airplane)
|
if (init->airplane)
|
||||||
i = 2; // switch to air hardware config
|
i = 2; // switch to air hardware config
|
||||||
if (init->usePPM)
|
if (init->usePPM || init->useSerialRx)
|
||||||
i++; // next index is for PPM
|
i++; // next index is for PPM
|
||||||
|
|
||||||
setup = hardwareMaps[i];
|
setup = hardwareMaps[i];
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
typedef struct drv_pwm_config_t {
|
typedef struct drv_pwm_config_t {
|
||||||
bool useParallelPWM;
|
bool useParallelPWM;
|
||||||
bool usePPM;
|
bool usePPM;
|
||||||
|
bool useSerialRx;
|
||||||
bool useRSSIADC;
|
bool useRSSIADC;
|
||||||
bool useCurrentMeterADC;
|
bool useCurrentMeterADC;
|
||||||
#ifdef STM32F10X
|
#ifdef STM32F10X
|
||||||
|
|
|
@ -269,6 +269,7 @@ void init(void)
|
||||||
pwm_params.useCurrentMeterADC = feature(FEATURE_CURRENT_METER);
|
pwm_params.useCurrentMeterADC = feature(FEATURE_CURRENT_METER);
|
||||||
pwm_params.useLEDStrip = feature(FEATURE_LED_STRIP);
|
pwm_params.useLEDStrip = feature(FEATURE_LED_STRIP);
|
||||||
pwm_params.usePPM = feature(FEATURE_RX_PPM);
|
pwm_params.usePPM = feature(FEATURE_RX_PPM);
|
||||||
|
pwm_params.useSerialRx = feature(FEATURE_RX_SERIAL);
|
||||||
pwm_params.useServos = isMixerUsingServos();
|
pwm_params.useServos = isMixerUsingServos();
|
||||||
pwm_params.extraServos = currentProfile->gimbalConfig.gimbal_flags & GIMBAL_FORWARDAUX;
|
pwm_params.extraServos = currentProfile->gimbalConfig.gimbal_flags & GIMBAL_FORWARDAUX;
|
||||||
pwm_params.motorPwmRate = masterConfig.motor_pwm_rate;
|
pwm_params.motorPwmRate = masterConfig.motor_pwm_rate;
|
||||||
|
|
Loading…
Reference in New Issue