mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
OP-493: Make sure accessory desired is not a single instance object
This commit is contained in:
parent
8ebd6a83d6
commit
a1336e4d03
@ -201,7 +201,7 @@ static void actuatorTask(void* parameters)
|
||||
|
||||
float curve1 = MixerCurve(desired.Throttle,mixerSettings.ThrottleCurve1);
|
||||
//The source for the secondary curve is selectable
|
||||
float curve2;
|
||||
float curve2 = 0;
|
||||
AccessoryDesiredData accessory;
|
||||
switch(mixerSettings.Curve2Source) {
|
||||
case MIXERSETTINGS_CURVE2SOURCE_THROTTLE:
|
||||
@ -260,8 +260,8 @@ static void actuatorTask(void* parameters)
|
||||
(mixers[ct].type == MIXERSETTINGS_MIXER1TYPE_ACCESSORY3)) {
|
||||
if(AccessoryDesiredInstGet(mixerSettings.Curve2Source - MIXERSETTINGS_CURVE2SOURCE_ACCESSORY1,&accessory) == 0)
|
||||
status[ct] = accessory.AccessoryVal;
|
||||
else
|
||||
status[ct] = -1;
|
||||
else
|
||||
status[ct] = -1;
|
||||
}
|
||||
|
||||
command.Channel[ct] = scaleChannel(status[ct],
|
||||
|
@ -1,10 +1,10 @@
|
||||
<xml>
|
||||
<object name="AccessoryDesired" singleinstance="true" settings="false">
|
||||
<description>Desired Auxillary actuator settings. Comes from @ref ManualControlModule.</description>
|
||||
<field name="AccessoryVal" units="" type="float" elements="1"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
<xml>
|
||||
<object name="AccessoryDesired" singleinstance="false" settings="false">
|
||||
<description>Desired Auxillary actuator settings. Comes from @ref ManualControlModule.</description>
|
||||
<field name="AccessoryVal" units="" type="float" elements="1"/>
|
||||
<access gcs="readwrite" flight="readwrite"/>
|
||||
<telemetrygcs acked="false" updatemode="manual" period="0"/>
|
||||
<telemetryflight acked="false" updatemode="periodic" period="1000"/>
|
||||
<logging updatemode="never" period="0"/>
|
||||
</object>
|
||||
</xml>
|
||||
|
Loading…
x
Reference in New Issue
Block a user