From 22559ed6c04cc4f424a15dbba82107a5ec7fc8be Mon Sep 17 00:00:00 2001
From: Fragtality <78614902+Fragtality@users.noreply.github.com>
Date: Sat, 13 Jan 2024 01:05:03 +0100
Subject: [PATCH] feat(GSX): GSX Integration for Chocks and Cones (#8405)
* gitignore
* Project-Setup
* GSX-Integration-for-FBW-Chocks-and-Cones
* Cleaning Up formatOnSave Changes
* Fixing settings.json
* Still fixing settings.json - sorry
* Fixing gitignore :(
* Summarized Changes in Changelog
---------
---
.github/CHANGELOG.md | 1 +
.../AirPlanes/FlyByWire_A320_NEO/GSX.cfg | 4 +--
.../FlyByWire_A320_NEO/model/A320_NEO.xml | 2 +-
fbw-a32nx/src/behavior/src/A32NX_Exterior.xml | 2 +-
.../src/EFB/Settings/Pages/SimOptionsPage.tsx | 20 ++++++--------
.../Settings/Pages/ThirdPartyOptionsPage.tsx | 27 +++++++------------
6 files changed, 22 insertions(+), 34 deletions(-)
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md
index 3bd599b5ac9..3f4ad5c2dc8 100644
--- a/.github/CHANGELOG.md
+++ b/.github/CHANGELOG.md
@@ -44,6 +44,7 @@
1. [ND] Worked around a font rendering bug with the ND chrono - @tracernz (Mike)
1. [TELEX] Decrease API poll rate to random number between 45-70 seconds - @auroraisluna (alepouna)
1. [AUTOFLIGHT] Fixed managed speed not engaging when V2 is confirmed after a departure runway change - @tracernz (Mike)
+1. [GSX/EFB] FBW Chocks & Cones are usable with GSX Fuel/Payload Sync and react to GSX Pushback - @Fragtality (Fragtality)
## 0.11.0
diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/GSX.cfg b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/GSX.cfg
index ae32535f21f..978e17d0047 100644
--- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/GSX.cfg
+++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/GSX.cfg
@@ -1,6 +1,6 @@
[aircraft]
icaotype = A20N
-parkingbrakestest = (L:A32NX_PARK_BRAKE_LEVER_POS,number)
+parkingbrakestest = (L:A32NX_PARK_BRAKE_LEVER_POS,number) (L:A32NX_GND_EQP_IS_VISIBLE, number) ||
nosegear = 8.26
refueling = 0
battery = 1
@@ -8,7 +8,7 @@ pushbackraise = 1
pushbackdummyevent = 0
pushbackcheckengines = 0
iscargo = 0
-trafficcones = 1
+trafficcones = 0
preferredexit = 0
wingrootpos = 2.36 -1.89 0.85
wingtippos = 15.70 -7.41 1.84
diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO.xml b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO.xml
index 1be8f415bd1..768550d605b 100644
--- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO.xml
+++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO.xml
@@ -538,7 +538,7 @@
10
(A:SURFACE RELATIVE GROUND SPEED, feet per second) 0.1 > ! (>L:A32NX_IS_STATIONARY, bool)
- (A:SIM ON GROUND, bool) (L:A32NX_ENGINE_N1:1, Number) 3.5 < and (L:A32NX_ENGINE_N1:2, Number) 3.5 < and (L:A32NX_HYD_NW_STRG_DISC_ECAM_MEMO, bool) 0 == and (A:LIGHT BEACON, bool) 0 == and (>L:A32NX_GND_EQP_IS_VISIBLE, bool)
+ (A:SIM ON GROUND, bool) (L:A32NX_ENGINE_N1:1, Number) 3.5 < and (L:A32NX_ENGINE_N1:2, Number) 3.5 < and (L:A32NX_HYD_NW_STRG_DISC_ECAM_MEMO, bool) 0 == and (A:LIGHT BEACON, bool) 0 == and (L:FSDT_GSX_DEPARTURE_STATE, number) 2 <= (L:FSDT_GSX_DEPARTURE_STATE, number) 6 == or and (>L:A32NX_GND_EQP_IS_VISIBLE, bool)
diff --git a/fbw-a32nx/src/behavior/src/A32NX_Exterior.xml b/fbw-a32nx/src/behavior/src/A32NX_Exterior.xml
index a180fa13934..efbe65a96d7 100644
--- a/fbw-a32nx/src/behavior/src/A32NX_Exterior.xml
+++ b/fbw-a32nx/src/behavior/src/A32NX_Exterior.xml
@@ -214,7 +214,7 @@
- (A:SIM ON GROUND, bool) (L:A32NX_ENGINE_N1:1, Number) 3.5 < and (L:A32NX_ENGINE_N1:2, Number) 3.5 < and (L:A32NX_HYD_NW_STRG_DISC_ECAM_MEMO, bool) 0 == and (A:LIGHT BEACON, bool) 0 == and
+ (A:SIM ON GROUND, bool) (L:A32NX_ENGINE_N1:1, Number) 3.5 < and (L:A32NX_ENGINE_N1:2, Number) 3.5 < and (L:A32NX_HYD_NW_STRG_DISC_ECAM_MEMO, bool) 0 == and (A:LIGHT BEACON, bool) 0 == and (L:FSDT_GSX_DEPARTURE_STATE, number) 2 <= (L:FSDT_GSX_DEPARTURE_STATE, number) 6 == or and
diff --git a/fbw-a32nx/src/systems/instruments/src/EFB/Settings/Pages/SimOptionsPage.tsx b/fbw-a32nx/src/systems/instruments/src/EFB/Settings/Pages/SimOptionsPage.tsx
index 91c7fbd8795..a454e3ee865 100644
--- a/fbw-a32nx/src/systems/instruments/src/EFB/Settings/Pages/SimOptionsPage.tsx
+++ b/fbw-a32nx/src/systems/instruments/src/EFB/Settings/Pages/SimOptionsPage.tsx
@@ -30,8 +30,6 @@ export const SimOptionsPage = () => {
const [, setRadioReceiverUsageSimVar] = useSimVar('L:A32NX_RADIO_RECEIVER_USAGE_ENABLED', 'number', 0);
const [wheelChocksEnabled, setWheelChocksEnabled] = usePersistentNumberProperty('MODEL_WHEELCHOCKS_ENABLED', 1);
const [conesEnabled, setConesEnabled] = usePersistentNumberProperty('MODEL_CONES_ENABLED', 1);
- const [gsxFuelSyncEnabled] = usePersistentNumberProperty('GSX_FUEL_SYNC', 0);
- const [gsxPayloadSyncEnabled] = usePersistentNumberProperty('GSX_PAYLOAD_SYNC', 0);
const defaultBaroButtons: ButtonType[] = [
{ name: t('Settings.SimOptions.Auto'), setting: 'AUTO' },
@@ -45,8 +43,6 @@ export const SimOptionsPage = () => {
{ name: t('Settings.SimOptions.Save'), setting: 'SAVE' },
];
- const isGSXSyncEnabled = () => !!gsxFuelSyncEnabled || !!gsxPayloadSyncEnabled;
-
return (
<>
{!showThrottleSettings
@@ -83,7 +79,7 @@ export const SimOptionsPage = () => {
setSimbridgeEnabled('AUTO ON')}
selected={simbridgeEnabled === 'AUTO ON' || simbridgeEnabled === 'AUTO OFF'}
@@ -105,7 +101,7 @@ export const SimOptionsPage = () => {
{
setSimbridgeRemoteStatus('local');
@@ -130,7 +126,7 @@ export const SimOptionsPage = () => {
&& (
{
// Error on empty string
@@ -150,7 +146,7 @@ export const SimOptionsPage = () => {
{
setSimbridgePort(event.replace(/[^0-9]+/g, ''));
@@ -172,7 +168,7 @@ export const SimOptionsPage = () => {
/>
-
+
{
@@ -181,7 +177,7 @@ export const SimOptionsPage = () => {
/>
-
+
{
@@ -193,8 +189,8 @@ export const SimOptionsPage = () => {