Hello,
I'm stuck and cannot get an event to trigger. I have a drone with multiple engines and want the drone to go into a sort of safe mode if one engine fails, safe mode being a hover at first.
This is the code I tried and nothing happens when engine 1's RPM falls below 100 RPM:
I then thought to link the event to the taxi light as a test, so that the hover mode gets triggered when the taxi light gets turned on:
No luck with that either. Am I doing something fundamentally wrong with the above code?
Any help greatly appreciated.
Thanks.
Anna
I'm stuck and cannot get an event to trigger. I have a drone with multiple engines and want the drone to go into a sort of safe mode if one engine fails, safe mode being a hover at first.
This is the code I tried and nothing happens when engine 1's RPM falls below 100 RPM:
XML:
<!-- Drone Hover -->
<Component ID="Drone_Hover">
<Parameter>
<Code>
(A:PROP RPM:1) 100 < if{ 1 (>K:FREEZE_ATTITUDE_TOGGLE) } els{ 0 (>K:FREEZE_ATTITUDE_TOGGLE) }
</Code>
</Parameter>
</Component>
I then thought to link the event to the taxi light as a test, so that the hover mode gets triggered when the taxi light gets turned on:
XML:
<!-- Drone Hover -->
<Component ID="Drone_Hover">
<Parameter>
<Code>
(A:TAXI LIGHT, bool) if{ 1 (>K:FREEZE_ATTITUDE_TOGGLE) } els{ 0 (>K:FREEZE_ATTITUDE_TOGGLE) }
</Code>
</Parameter>
</Component>
No luck with that either. Am I doing something fundamentally wrong with the above code?
Any help greatly appreciated.
Thanks.
Anna
Last edited: