mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
Uncrustify
This commit is contained in:
parent
7c3cecea8f
commit
c8c3a46735
@ -50,15 +50,15 @@
|
||||
|
||||
// Private constants
|
||||
#if defined(PIOS_MANUAL_STACK_SIZE)
|
||||
#define STACK_SIZE_BYTES PIOS_MANUAL_STACK_SIZE
|
||||
#define STACK_SIZE_BYTES PIOS_MANUAL_STACK_SIZE
|
||||
#else
|
||||
#define STACK_SIZE_BYTES 1152
|
||||
#define STACK_SIZE_BYTES 1152
|
||||
#endif
|
||||
|
||||
#define CALLBACK_PRIORITY CALLBACK_PRIORITY_REGULAR
|
||||
#define CBTASK_PRIORITY CALLBACK_TASK_FLIGHTCONTROL
|
||||
#define CALLBACK_PRIORITY CALLBACK_PRIORITY_REGULAR
|
||||
#define CBTASK_PRIORITY CALLBACK_TASK_FLIGHTCONTROL
|
||||
|
||||
#define ASSISTEDCONTROL_NEUTRALTHROTTLERANGE_FACTOR 0.2f
|
||||
#define ASSISTEDCONTROL_NEUTRALTHROTTLERANGE_FACTOR 0.2f
|
||||
#define ASSISTEDCONTROL_BRAKETHRUST_DEADBAND_FACTOR_LO 0.92f
|
||||
#define ASSISTEDCONTROL_BRAKETHRUST_DEADBAND_FACTOR_HI 1.08f
|
||||
|
||||
@ -244,9 +244,9 @@ static void manualControlTask(void)
|
||||
VtolSelfTuningStatsNeutralThrustOffsetGet(&neutralThrustOffset);
|
||||
|
||||
|
||||
float throttleRangeDelta = (thrustLimits.Neutral + neutralThrustOffset) * ASSISTEDCONTROL_NEUTRALTHROTTLERANGE_FACTOR;
|
||||
float throttleNeutralLow = (thrustLimits.Neutral + neutralThrustOffset) - throttleRangeDelta;
|
||||
float throttleNeutralHi = (thrustLimits.Neutral + neutralThrustOffset) + throttleRangeDelta;
|
||||
float throttleRangeDelta = (thrustLimits.Neutral + neutralThrustOffset) * ASSISTEDCONTROL_NEUTRALTHROTTLERANGE_FACTOR;
|
||||
float throttleNeutralLow = (thrustLimits.Neutral + neutralThrustOffset) - throttleRangeDelta;
|
||||
float throttleNeutralHi = (thrustLimits.Neutral + neutralThrustOffset) + throttleRangeDelta;
|
||||
if (cmd.Thrust > throttleNeutralLow && cmd.Thrust < throttleNeutralHi) {
|
||||
throttleNeutral = true;
|
||||
}
|
||||
|
@ -213,20 +213,21 @@ static int PIOS_DSM_UnrollChannels(struct pios_dsm_dev *dsm_dev)
|
||||
/* extract and save the channel value */
|
||||
uint8_t channel_num = (word >> resolution) & 0x0f;
|
||||
if (channel_num < PIOS_DSM_NUM_INPUTS) {
|
||||
|
||||
if (channel_log & (1 << channel_num)) {
|
||||
/* Found duplicate. This should happen when in 11 bit */
|
||||
/* mode and the data is 10 bits */
|
||||
if (resolution == 10)
|
||||
if (resolution == 10) {
|
||||
return -1;
|
||||
}
|
||||
resolution = 10;
|
||||
return PIOS_DSM_UnrollChannels(dsm_dev);
|
||||
}
|
||||
|
||||
if ((channel_log & 0xFF) == 0x55) {
|
||||
/* This pattern indicates 10 bit pattern */
|
||||
if (resolution == 11)
|
||||
if (resolution == 11) {
|
||||
return -1;
|
||||
}
|
||||
resolution = 11;
|
||||
return PIOS_DSM_UnrollChannels(dsm_dev);
|
||||
}
|
||||
|
@ -215,20 +215,21 @@ static int PIOS_DSM_UnrollChannels(struct pios_dsm_dev *dsm_dev)
|
||||
/* extract and save the channel value */
|
||||
uint8_t channel_num = (word >> resolution) & 0x0f;
|
||||
if (channel_num < PIOS_DSM_NUM_INPUTS) {
|
||||
|
||||
if (channel_log & (1 << channel_num)) {
|
||||
/* Found duplicate. This should happen when in 11 bit */
|
||||
/* mode and the data is 10 bits */
|
||||
if (resolution == 10)
|
||||
if (resolution == 10) {
|
||||
return -1;
|
||||
}
|
||||
resolution = 10;
|
||||
return PIOS_DSM_UnrollChannels(dsm_dev);
|
||||
}
|
||||
|
||||
if ((channel_log & 0xFF) == 0x55) {
|
||||
/* This pattern indicates 10 bit pattern */
|
||||
if (resolution == 11)
|
||||
if (resolution == 11) {
|
||||
return -1;
|
||||
}
|
||||
resolution = 11;
|
||||
return PIOS_DSM_UnrollChannels(dsm_dev);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user