mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
minor fix
This commit is contained in:
parent
49e69f0aaa
commit
24ffa37b3a
5 changed files with 7 additions and 6 deletions
|
@ -228,7 +228,7 @@ static void timerHardwareOverride(timerHardware_t * timer) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool check_pwm_assigned_to_motor_or_servo(void)
|
bool checkPwmAssignedToMotorOrServo(void)
|
||||||
{
|
{
|
||||||
// Check TIM_USE_FW_* and TIM_USE_MC_* is consistent, If so, return true, means the pwm mapping will remain same between FW and MC
|
// Check TIM_USE_FW_* and TIM_USE_MC_* is consistent, If so, return true, means the pwm mapping will remain same between FW and MC
|
||||||
bool pwm_assigned_to_motor_or_servo = true;
|
bool pwm_assigned_to_motor_or_servo = true;
|
||||||
|
|
|
@ -73,7 +73,7 @@ typedef struct {
|
||||||
} motorProtocolProperties_t;
|
} motorProtocolProperties_t;
|
||||||
|
|
||||||
bool pwmMotorAndServoInit(void);
|
bool pwmMotorAndServoInit(void);
|
||||||
bool check_pwm_assigned_to_motor_or_servo(void);
|
bool checkPwmAssignedToMotorOrServo(void);
|
||||||
const motorProtocolProperties_t * getMotorProtocolProperties(motorPwmProtocolTypes_e proto);
|
const motorProtocolProperties_t * getMotorProtocolProperties(motorPwmProtocolTypes_e proto);
|
||||||
pwmInitError_e getPwmInitError(void);
|
pwmInitError_e getPwmInitError(void);
|
||||||
const char * getPwmInitErrorMessage(void);
|
const char * getPwmInitErrorMessage(void);
|
||||||
|
|
|
@ -1466,7 +1466,8 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
|
||||||
|
|
||||||
case MSP2_INAV_MIXER:
|
case MSP2_INAV_MIXER:
|
||||||
sbufWriteU8(dst, mixerConfig()->motorDirectionInverted);
|
sbufWriteU8(dst, mixerConfig()->motorDirectionInverted);
|
||||||
sbufWriteU16(dst, 0);
|
sbufWriteU8(dst, 0);
|
||||||
|
sbufWriteU8(dst, mixerConfig()->motorstopOnLow);
|
||||||
sbufWriteU8(dst, mixerConfig()->platformType);
|
sbufWriteU8(dst, mixerConfig()->platformType);
|
||||||
sbufWriteU8(dst, mixerConfig()->hasFlaps);
|
sbufWriteU8(dst, mixerConfig()->hasFlaps);
|
||||||
sbufWriteU16(dst, mixerConfig()->appliedMixerPreset);
|
sbufWriteU16(dst, mixerConfig()->appliedMixerPreset);
|
||||||
|
@ -2867,7 +2868,8 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
|
||||||
case MSP2_INAV_SET_MIXER:
|
case MSP2_INAV_SET_MIXER:
|
||||||
if (dataSize == 9) {
|
if (dataSize == 9) {
|
||||||
mixerConfigMutable()->motorDirectionInverted = sbufReadU8(src);
|
mixerConfigMutable()->motorDirectionInverted = sbufReadU8(src);
|
||||||
sbufReadU16(src); // Was yaw_jump_prevention_limit
|
sbufReadU8(src); // Was yaw_jump_prevention_limit
|
||||||
|
mixerConfigMutable()->motorstopOnLow = sbufReadU8(src);
|
||||||
mixerConfigMutable()->platformType = sbufReadU8(src);
|
mixerConfigMutable()->platformType = sbufReadU8(src);
|
||||||
mixerConfigMutable()->hasFlaps = sbufReadU8(src);
|
mixerConfigMutable()->hasFlaps = sbufReadU8(src);
|
||||||
mixerConfigMutable()->appliedMixerPreset = sbufReadU16(src);
|
mixerConfigMutable()->appliedMixerPreset = sbufReadU16(src);
|
||||||
|
|
|
@ -193,7 +193,7 @@ bool checkMixerProfileHotSwitchAvalibility(void)
|
||||||
#if defined(SITL_BUILD)
|
#if defined(SITL_BUILD)
|
||||||
bool MCFW_pwm_settings_valid = true;
|
bool MCFW_pwm_settings_valid = true;
|
||||||
#else
|
#else
|
||||||
bool MCFW_pwm_settings_valid = check_pwm_assigned_to_motor_or_servo();
|
bool MCFW_pwm_settings_valid = checkPwmAssignedToMotorOrServo();
|
||||||
#endif
|
#endif
|
||||||
uint8_t platform_type0 = mixerConfigByIndex(0)->platformType;
|
uint8_t platform_type0 = mixerConfigByIndex(0)->platformType;
|
||||||
uint8_t platform_type1 = mixerConfigByIndex(1)->platformType;
|
uint8_t platform_type1 = mixerConfigByIndex(1)->platformType;
|
||||||
|
|
|
@ -14,7 +14,6 @@ typedef struct mixerConfig_s {
|
||||||
uint8_t platformType;
|
uint8_t platformType;
|
||||||
bool hasFlaps;
|
bool hasFlaps;
|
||||||
int16_t appliedMixerPreset;
|
int16_t appliedMixerPreset;
|
||||||
uint8_t outputMode;
|
|
||||||
bool motorstopOnLow;
|
bool motorstopOnLow;
|
||||||
bool PIDProfileLinking;
|
bool PIDProfileLinking;
|
||||||
bool automated_switch;
|
bool automated_switch;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue