Skip to content

Adding ability to pause individual aircraft #114

Merged
jason-watkins merged 12 commits intonasa:developfrom
MichaelRThompson:individual_pause_develop
Jul 6, 2017
Merged

Adding ability to pause individual aircraft #114
jason-watkins merged 12 commits intonasa:developfrom
MichaelRThompson:individual_pause_develop

Conversation

@MichaelRThompson
Copy link
Copy Markdown
Contributor

As suggested by @jason-watkins in issue #112 , I added the capability to pause individual a/c in addition to keeping the original arguments. Now, as it stands, the pauseSim command should be able to accept arguments:

0: Unpause all a/c
1: Pause all a/c
2: Switch the pause state of all a/c
100:119: Pause a/c 0:19 individually
200:219: Unpause a/c 0:19 individually

if (aircraftNumber > 0)
{
// Enable AI for the aircraftNumber we are setting
// Enable AI for the aircraftNumber we are setting: MRT COMMENT: ENABLE, OR DISABLE?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enable is correct. Setting the override_planepath dref disables AI (see this page). This is here to re-enable the AI after setting the position. It occurs to me that this could conflict if the user is manually disabling the AI, but that isn't a use-case that we have been asked to support yet.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, I see. I was looking for the AI disable within the code itself, which is why I was confused. This is a case that I'm actually looking to explore with my code. Not sure the plugin needs updating though, I just need to disable the AI after moving the a/c.

That could be something helpful to mention in the Wiki though. That the sendPOSI command automatically turns the AI autopilot back on.

DataManager::GetIntArray(DREF_Pause, value, 20);
value[v - 100] = 1;
}
else if ((v >= 200) && (v < 120))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v < 220

else if ((v >= 200) && (v < 120))
{
DataManager::GetIntArray(DREF_Pause, value, 20);
value[v - 100] = 0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v - 200

{
value[i] = v;
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove trailing whitespace

@jason-watkins
Copy link
Copy Markdown
Contributor

Looks good to me. Thank you very much for contributing!

Resolves #112

@jason-watkins jason-watkins merged commit eb59bd3 into nasa:develop Jul 6, 2017
@MichaelRThompson MichaelRThompson deleted the individual_pause_develop branch July 10, 2017 19:39
@jason-watkins jason-watkins mentioned this pull request Oct 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants