Skip to content

Conversation

@StefanLobas
Copy link
Contributor

Changed behaviour: Arrays are now written selectively. Only changed values of an array are written to X-Plane to circumvent problems like here: https://forums.x-plane.org/index.php?/forums/topic/232388-toliss-and-hardware-cockpit/

typedef struct {
int lower;
int upper;
} indexPair;
Copy link
Owner

Choose a reason for hiding this comment

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

I think you could just use a pair here:

using indexPair = std::pair<int>;

Then just use first and second instead of lower and upper.

Copy link
Owner

@vranki vranki left a comment

Choose a reason for hiding this comment

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

LGTM, but you might check the small comment on converting a struct to pair before merging. I also assume you have tested this and it works.

@StefanLobas
Copy link
Contributor Author

Thanks for your suggestion, using std::pair makes it look even cleaner. I hope I will find some time to implement and test this end of this week :-)

Was different here compared to FloatArrayDataref and caused X-Plane to crash.
…to scope-bound resource managed allocation instead of dynamic allocation for the list of pairs.
@StefanLobas
Copy link
Contributor Author

StefanLobas commented Mar 11, 2022

I tested my changes quite intensive and it works as expected (after locating and fixing the bug for the IntArrayDataref causing X-Plane to crash ;-)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants