-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Scott Vincent
committed
Mar 25, 2021
1 parent
0bd7076
commit 3007851
Showing
13 changed files
with
295 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Copy a32nx-jetbridge folder to your FS2020 Community folder. | ||
|
||
This allows Data Link to read and write local (lvar) values as these are not | ||
currently supported by the SimConnect SDK. | ||
|
||
Specifically, it is used for the A32NX Airbus A320 Neo to access the APU. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"content": [ | ||
{ | ||
"path": "modules/jetbridge.wasm", | ||
"size": 441349, | ||
"date": 132603215301079537 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"dependencies": [], | ||
"content_type": "MISC", | ||
"title": "Jetbridge", | ||
"manufacturer": "", | ||
"creator": "A32NX", | ||
"package_version": "0.1.0", | ||
"minimum_game_version": "1.14.5", | ||
"release_notes": { | ||
"neutral": { | ||
"LastUpdate": "", | ||
"OlderHistory": "" | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "Client.h" | ||
#include "SimConnect.h" | ||
|
||
jetbridge::Client::Client(void* simconnect) { | ||
this->simconnect = simconnect; | ||
srand(time(0)); | ||
|
||
SimConnect_AddToClientDataDefinition(simconnect, kPacketDefinition, 0, sizeof(Packet)); | ||
SimConnect_MapClientDataNameToID(simconnect, kPublicDownlinkChannel, kPublicDownlinkArea); | ||
SimConnect_MapClientDataNameToID(simconnect, kPublicUplinkChannel, kPublicUplinkArea); | ||
|
||
// We'll listen to downlink client data events. | ||
SimConnect_RequestClientData(simconnect, kPublicDownlinkArea, kDownlinkRequest, kPacketDefinition, | ||
SIMCONNECT_CLIENT_DATA_PERIOD_ON_SET, SIMCONNECT_CLIENT_DATA_REQUEST_FLAG_CHANGED); | ||
} | ||
|
||
void jetbridge::Client::request(const char data[]) { | ||
// Prepare the outgoing packet | ||
Packet* packet = new Packet(data); | ||
|
||
// Transmit the request packet | ||
SimConnect_SetClientData(simconnect, kPublicUplinkArea, kPacketDefinition, 0, 0, sizeof(Packet), packet); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
|
||
#include <Windows.h> | ||
|
||
#include <future> | ||
#include <map> | ||
|
||
#include "Protocol.h" | ||
|
||
namespace jetbridge { | ||
|
||
class Client { | ||
private: | ||
void* simconnect = 0; | ||
|
||
public: | ||
Client(void* simconnect); | ||
void request(const char data[]); | ||
}; | ||
|
||
} // namespace jetbridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "Protocol.h" | ||
|
||
#include <cstdlib> | ||
#include <cstring> | ||
#include <ctime> | ||
|
||
jetbridge::Packet::Packet(const char data[]) { | ||
this->id = rand(); | ||
|
||
// Copy the passed data to the packet data | ||
std::memcpy(this->data, data, sizeof(this->data)); | ||
} |
Oops, something went wrong.