Skip to content
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

Fixed build when used in Github Actions #20

Merged
merged 39 commits into from
Jul 10, 2024

Conversation

BitsAndDroids
Copy link
Contributor

@BitsAndDroids BitsAndDroids commented Jun 22, 2024

Out of nowhere, Bindgen was having issues parsing the issue: #19

#include "Windows.h"

header file caused failures downstream when defining the types.
By changing it to:

#include <windows.h>

All seems to work again.
Updated the Bindgen version and replaced a deprecated callback function

This PR also includes the fix for the example "update on change." It could cause a segfault due to an inappropriate pointer arrhythmia. issue: #16

@Sequal32

BitsAndDroids and others added 30 commits December 21, 2023 16:40
An epsilon parameter is added to the data definition in the SimConnect_AddToDataDefinition function in lib.rs. This replaces the previously hard-coded value of 0.0, allowing for more flexibility depending on the specific requirements of different use cases.
The `add_data_definition` functions in `src/lib.rs` now accept an optional 'epsilon' parameter as opposed to a mandatory float. This modification enhances versatility by accommodating scenarios where 'epsilon' doesn't require a specific value and defaults to 0.0 if not explicitly given.
The add_data_definition method has been updated to include an optional epsilon parameter. This parameter is used to set a threshold for updates, providing more flexibility for data definition. If no specific value for epsilon is provided, it defaults to 0.0.
The simconnect dependency version in the README file is updated from "0.2.0" to "0.2.1". This reflects the current version the project is using and ensures consistency across all parts of the documentation.
The handling of raw pointers and data transmutation in the unsafe blocks has been refactored for better safety and code clarity. Instead of using transmute_copy, it now uses std::ptr::addr_of and std::ptr::read_unaligned to obtain data values.
Updated `simconnect` package from version `0.2.0` to `0.2.1` in `Cargo.lock` file. Introduced two new example scripts `aircraft_updates_on_change` and `aircraft_updates` to demonstrate usage of the libraries. Also, made a minor change in `lib.rs` on how `epsilon` is handled inside `add_data_definition` function.
Updated how data is defined in aircraft_updates_on_change example. Epsilon is now defined to control the frequency of updates from the game, reducing the amount of data sent to the client. For instance, latitude and longitude values update every degree, whereas altitude updates are now received every 100 feet, as opposed to every foot previously.
Added comments in the aircraft_updates_on_change example to explain how different requests need to have unique request_id values in order to prevent data overwrite. Also included a pointer about the way sim_data_ptr uses the passed define_id for better clarity.
Expanded on the usage of KeyValuePairFloat and the need for unique request_id values in the aircraft_updates_on_change example. Clarified how define_id is used with simconnect data by adding detailed comments, helping prevent potential overwrite of data.
This commit rectifies typographical errors and improves the readability of code comments in both the README file and example files. Detailed instructions regarding the execution of examples with SimConnect.dll have been included. Additionally, the datastruct memory allocation has been adjusted for optimal performance and accuracy.
This commit corrects typographical errors in the Readme.md file. It also enhances the instructions on building the code and running the examples to help users understand them easily. Hyphenations are also updated to ensure grammatical correctness.
This commit corrects a typographical error in the inline comment when connecting with SimConnect in main.rs within the aircraft_updates_on_change directory. Instead of "Intialize", the correct spelling "Initialize" is now used.
The 'Debug' trait has been derived for the SimConnector struct in lib.rs. This will facilitate easier debugging by allowing SimConnector instances to be formatted using "{:?}" or "{:#?}" for pretty-print, primarily used during development.
The simconnect dependency in the Cargo.toml file has been upgraded from version 0.3.0 to version 0.3.1. This update may include important bug fixes and improvements vital to the project.
Added a new file `examples/aircraft_inputs/main.rs` that provides an example of handling aircraft inputs such as "GEAR_UP", "GEAR_DOWN", and "PARKING_BRAKES". The example includes the setup of a hashmap for input IDs to events cross-referencing and user console input for event triggering. Moreover, SimConnect's version was updated to 0.3.1.
@BitsAndDroids
Copy link
Contributor Author

BitsAndDroids commented Jul 5, 2024

@Sequal32 If you want help to maintain this repo, I'm down to help you out. If interested, you can reach me at info@{myusername}.com (to avoid bots scraping the address).

Copy link
Owner

@Sequal32 Sequal32 left a comment

Choose a reason for hiding this comment

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

Hey @BitsAndDroids thanks so much for your contribution again, and sorry for the delay! I'm going to be active enough to maintain this repo again, and feel free to keep submitting PRs. I'll hopefully be able to get to them quicker.

libsrc/include/SimConnect.hpp Show resolved Hide resolved
@BitsAndDroids
Copy link
Contributor Author

Hey @BitsAndDroids thanks so much for your contribution again, and sorry for the delay! I'm going to be active enough to maintain this repo again, and feel free to keep submitting PRs. I'll hopefully be able to get to them quicker.

I'm just glad to see that you're doing well. I also implemented the changes and changed the version (0.4.0 wasn't semver).

@Sequal32 Sequal32 merged commit 0fa414c into Sequal32:master Jul 10, 2024
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