Skip to content

Commit

Permalink
feat(engine): rework engine model and payload
Browse files Browse the repository at this point in the history
  • Loading branch information
Revyn112 committed Sep 18, 2023
1 parent 9b7e55d commit 90c6af6
Show file tree
Hide file tree
Showing 51 changed files with 18,239 additions and 5,838 deletions.
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@
"__functional_03": "cpp",
"memory_resource": "cpp",
"numbers": "cpp",
"xmemory0": "cpp"
"xmemory0": "cpp",
"span": "cpp",
"ranges": "cpp"
},
"typescript.preferences.quoteStyle": "single",
"typescript.preferences.importModuleSpecifier": "non-relative"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ size_mm = 1430,1000
pixel_size = 1430,1000
texture = $EFB

htmlgauge00 = ACJ339X/EFB/efb.html, 0,0,1430,1000
htmlgauge00 = ACJ339X/EFB/efb.html?Airframe=ACJ330_941, 0,0,1430,1000

[VCockpit17]
size_mm = 0,0
Expand Down

This file was deleted.

File renamed without changes.

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions hdw-a339x-acj/src/wasm/fadec_a330/src/FadecGauge.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include "FadecGauge.h"

FadecGauge FADEC_GAUGE;

__attribute__((export_name("FadecGauge_gauge_callback"))) extern "C" bool FadecGauge_gauge_callback(FsContext ctx,
int service_id,
void* pData) {
switch (service_id) {
case PANEL_SERVICE_PRE_INSTALL: {
return true;
} break;
case PANEL_SERVICE_POST_INSTALL: {
return FADEC_GAUGE.initializeFADEC();
} break;
case PANEL_SERVICE_PRE_DRAW: {
/* Start updating the engines only if all needed data was fetched */
/* Due to the data fetching feature from the sim being available at this stage only (from what I have observed) */
/* Event SIMCONNECT_RECV_ID_OPEN received after the first PANEL_SERVICE_POST_INSTALL */
if (FADEC_GAUGE.isReady()) {
sGaugeDrawData* drawData = static_cast<sGaugeDrawData*>(pData);
return FADEC_GAUGE.onUpdate(drawData->dt);
} else {
return FADEC_GAUGE.fetchNeededData();
}
} break;
case PANEL_SERVICE_PRE_KILL: {
FADEC_GAUGE.killFADEC();
return true;
} break;
}
return false;
}
Loading

0 comments on commit 90c6af6

Please sign in to comment.