diff --git a/src/main/config/config.c b/src/main/config/config.c index 64ecdbd419..40163d080f 100644 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -138,7 +138,7 @@ profile_t *currentProfile; static uint8_t currentControlRateProfileIndex = 0; controlRateConfig_t *currentControlRateProfile; -static const uint8_t EEPROM_CONF_VERSION = 99; +static const uint8_t EEPROM_CONF_VERSION = 100; static void resetAccelerometerTrims(flightDynamicsTrims_t *accelerometerTrims) { @@ -358,7 +358,7 @@ static void resetConf(void) { int i; #ifdef USE_SERVOS - int8_t servoRates[MAX_SUPPORTED_SERVOS] = { 30, 30, 100, 100, 100, 100, 100, 100 }; + int8_t servoRates[MAX_SUPPORTED_SERVOS] = { 30, 30, 100, 100, 100, 100, 100, 100, 100, 100 }; ; #endif diff --git a/src/main/drivers/pwm_mapping.c b/src/main/drivers/pwm_mapping.c index e6079e907c..2ce4481731 100644 --- a/src/main/drivers/pwm_mapping.c +++ b/src/main/drivers/pwm_mapping.c @@ -321,12 +321,39 @@ static const uint16_t multiPWM[] = { }; static const uint16_t airPPM[] = { - // TODO + PWM1 | (MAP_TO_PPM_INPUT << 8), // PPM input + PWM9 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #1 + PWM10 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #2 + PWM11 | (MAP_TO_SERVO_OUTPUT << 8), // servo #1 + PWM12 | (MAP_TO_SERVO_OUTPUT << 8), + PWM13 | (MAP_TO_SERVO_OUTPUT << 8), + PWM14 | (MAP_TO_SERVO_OUTPUT << 8), + PWM15 | (MAP_TO_SERVO_OUTPUT << 8), + PWM16 | (MAP_TO_SERVO_OUTPUT << 8), + PWM5 | (MAP_TO_SERVO_OUTPUT << 8), + PWM6 | (MAP_TO_SERVO_OUTPUT << 8), + PWM7 | (MAP_TO_SERVO_OUTPUT << 8), + PWM8 | (MAP_TO_SERVO_OUTPUT << 8), // servo #10 0xFFFF }; static const uint16_t airPWM[] = { - // TODO + PWM1 | (MAP_TO_PWM_INPUT << 8), // input #1 + PWM2 | (MAP_TO_PWM_INPUT << 8), + PWM3 | (MAP_TO_PWM_INPUT << 8), + PWM4 | (MAP_TO_PWM_INPUT << 8), + PWM5 | (MAP_TO_PWM_INPUT << 8), + PWM6 | (MAP_TO_PWM_INPUT << 8), + PWM7 | (MAP_TO_PWM_INPUT << 8), + PWM8 | (MAP_TO_PWM_INPUT << 8), // input #8 + PWM9 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #1 + PWM10 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #2 + PWM11 | (MAP_TO_SERVO_OUTPUT << 8), // servo #1 + PWM12 | (MAP_TO_SERVO_OUTPUT << 8), + PWM13 | (MAP_TO_SERVO_OUTPUT << 8), + PWM14 | (MAP_TO_SERVO_OUTPUT << 8), + PWM15 | (MAP_TO_SERVO_OUTPUT << 8), + PWM16 | (MAP_TO_SERVO_OUTPUT << 8), // server #6 0xFFFF }; #endif diff --git a/src/main/drivers/pwm_mapping.h b/src/main/drivers/pwm_mapping.h index 6f06397f4d..08d318168d 100644 --- a/src/main/drivers/pwm_mapping.h +++ b/src/main/drivers/pwm_mapping.h @@ -18,10 +18,10 @@ #pragma once #define MAX_PWM_MOTORS 12 -#define MAX_PWM_SERVOS 8 +#define MAX_PWM_SERVOS 10 #define MAX_MOTORS 12 -#define MAX_SERVOS 8 +#define MAX_SERVOS 10 #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 diff --git a/src/main/flight/mixer.h b/src/main/flight/mixer.h index 0d3fcf633e..cb3ae66677 100644 --- a/src/main/flight/mixer.h +++ b/src/main/flight/mixer.h @@ -18,7 +18,7 @@ #pragma once #define MAX_SUPPORTED_MOTORS 12 -#define MAX_SUPPORTED_SERVOS 8 +#define MAX_SUPPORTED_SERVOS 10 #define YAW_JUMP_PREVENTION_LIMIT_LOW 80 #define YAW_JUMP_PREVENTION_LIMIT_HIGH 500 diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index 0034a0d979..1e567016f7 100644 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -851,7 +851,7 @@ static bool processOutCommand(uint8_t cmdMSP) } break; case MSP_CHANNEL_FORWARDING: - headSerialReply(8); + headSerialReply(MAX_SUPPORTED_SERVOS); for (i = 0; i < MAX_SUPPORTED_SERVOS; i++) { serialize8(currentProfile->servoConf[i].forwardFromChannel); }