-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set heading bug #14
Comments
Hi! I'll look into it this weekend. |
HI, I made a quick integration test and the following works for me. [TestFixture, Explicit]
public class FsConnectIntegrationTest
{
enum TestEnums
{
GroupId=1234,
EventId=1235
}
[Test]
public void Test()
{
// Arrange
AutoResetEvent resetEvent = new AutoResetEvent(false);
int errorCount = 0;
FsConnect fsConnect = new FsConnect();
fsConnect.ConnectionChanged += (sender, b) =>
{
if (b) resetEvent.Set();
};
fsConnect.FsError += (sender, args) =>
{
errorCount++;
Console.WriteLine($"Error: {args.ExceptionDescription}");
};
fsConnect.Connect("FsConnectIntegrationTest", 0);
bool res = resetEvent.WaitOne(2000);
if (!res) Assert.Fail("Not connected to MSFS within timeout");
// Act
fsConnect.MapClientEventToSimEvent(TestEnums.GroupId, TestEnums.EventId, FsEventNameId.HeadingBugSet);
fsConnect.SetNotificationGroupPriority(TestEnums.GroupId);
fsConnect.TransmitClientEvent(TestEnums.EventId, (uint)DateTime.Now.Second*6, TestEnums.GroupId);
// Assert
Assert.That(errorCount, Is.Zero);
// Teardown
fsConnect?.Disconnect();
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I successfully connected to FS2020 and received the heading bug setting using RequestData on FsSimVar.AutopilotHeadingLockDir.
However, I was unable to set the value using a client event. I basically followed the example in the README. After successful connection I call:
I expected the AP heading selector to switch to 0, but it stays at the heading dialed in. I tried several alternatives (e.g. binding my event to FsEventNameId.HeadingBugInc, FsEventNameId.FlapsIncr), but none worked. However, a call to SetText does show a text popup in MSFS (so, it's probably not a connection issue).
Any help appreciated.
EDIT: Inserted 2nd code line
The text was updated successfully, but these errors were encountered: