Skip to content

Simulator gets stuck when using StartCommand #21

@maduranma

Description

@maduranma

I use the DataRefTool and I discovered for my purpose that sim/flight_controls/pitch_trim_down and up is perfect.

Just for testing I do:
CancellationTokenSource trimTokenSource = xPlaneConnector.StartCommand(XPlaneConnector.Commands.FlightControlsPitchTrimUp);

After 3 seconds I cancel the token.

During the 3 seconds the sim just hung up and the trim doesn't change.

Am I missing something? Tested on FF A320

Edit:
Tested in a Cessna 172 default, it gets trimmed after closing the program, same, it hungs, but after the hung the trim that was being applied appears.

Edit 2:
I've looked the code of the connector.
It seems like there's a thread making an infinite loop sending the command, in my case it overloads the simulator, isn't there any alternative?
I've tried sending the command every 20ms and less, but not enough even to move...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions