Update to new EFB

This commit is contained in:
Kilian Hofmann 2025-08-29 17:52:32 +02:00
parent d2a4846df6
commit 22b5617e39
3 changed files with 270 additions and 127 deletions

View File

@ -27671,6 +27671,10 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
weightUnits: "kgs",
temperatureUnits: "c",
canBeER: false,
hasXS: false,
enableSevereFailures: true,
enableRandomFailures: false,
failureChance: 1,
isExtendedRange: false,
isCargo: false,
manpads: false,
@ -27686,7 +27690,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
singleCueFD: false,
inhibitTireFailure: false,
windVectorType: "track",
radioAltitude: false,
radAltBehavior: 0,
wbs: false,
customSIDs: false,
customSTARs: false,
@ -27829,6 +27833,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
const state = thunkAPI.getState();
const generalOptions = api2.getEFBVariable("OPTIONS_GENERAL", "number");
const canBeER = api2.getEFBVariable("CAN_BE_ER", "number") === 1;
const hasXS = api2.getEFBVariable("HAS_XS", "number") === 1;
const isExtendedRange = api2.getSimulatorVariable("L:MD11_OPT_ER") === 1;
const isCargo = api2.getEFBVariable("IS_CARGO", "number") === 1;
const irsAlignTime = api2.getEFBVariable("IRS_ALIGN", "number");
@ -27848,11 +27853,18 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
general: {
isCargo,
canBeER,
hasXS,
isExtendedRange,
weightUnits: generalOptions & 1 << 0 ? "lbs" : "kgs",
temperatureUnits: generalOptions & 1 << 1 ? "f" : "c",
manpads: manpads === 1 ? true : false,
pauseAtTOD: generalOptions & 1 << 4 ? true : false
pauseAtTOD: generalOptions & 1 << 4 ? true : false,
enableSevereFailures: generalOptions & 1 << 2 ? true : false,
enableRandomFailures: generalOptions & 1 << 3 ? true : false,
failureChance: api2.getEFBVariable(
"FAILURE_CHANCE",
"number"
)
},
systems: {
digitalStandby: !!(optionsSystem & 1 << 0),
@ -27866,9 +27878,12 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
singleCueFD: !!(optionsSystem & 1 << 8),
inhibitTireFailure: !!(optionsSystem & 1 << 9),
windVectorType: optionsSystem & 1 << 10 ? "vector" : "track",
radioAltitude: !!(optionsSystem & 1 << 11),
wbs: !!(optionsSystem & 1 << 12),
automaticAntiIce: !!(optionsSystem & 1 << 13)
radAltBehavior: api2.getEFBVariable(
"OPTIONS_RAD_ALT_BEHAVIOR",
"number"
),
wbs: !!(optionsSystem & 1 << 11),
automaticAntiIce: !!(optionsSystem & 1 << 12)
},
caws: {
altAlertType: api2.getEFBVariable(
@ -27948,23 +27963,32 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
const state = thunkAPI.getState();
const weightUnits = state.plane.options.general.weightUnits === "lbs" ? 1 << 0 : 0;
const tempUnits = state.plane.options.general.temperatureUnits === "f" ? 1 << 1 : 0;
const enableSevereFailures = state.plane.options.general.enableSevereFailures ? 1 << 2 : 0;
const enableRandomFailures = state.plane.options.general.enableRandomFailures ? 1 << 3 : 0;
const pauseAtTOD = state.plane.options.general.pauseAtTOD ? 1 << 4 : 0;
await api2.setEFBVariable(
await Promise.all([
api2.setEFBVariable(
"OPTIONS_GENERAL",
"number",
weightUnits | tempUnits | pauseAtTOD
);
await api2.setSimulatorVariable(
weightUnits | tempUnits | enableSevereFailures | enableRandomFailures | pauseAtTOD
),
api2.setEFBVariable(
"FAILURE_CHANCE",
"number",
state.plane.options.general.failureChance
),
api2.setSimulatorVariable(
"L:MD11_OPT_ER",
"number",
state.plane.options.general.isExtendedRange ? 1 : 0
);
await api2.setSimulatorVariable(
),
api2.setSimulatorVariable(
"L:MD11_OPT_GUARDIAN",
"number",
state.plane.options.general.manpads ? 1 : 0
);
await api2.triggerReadVariable([8 /* GeneralOptions */]);
),
api2.triggerReadVariable([8 /* GeneralOptions */])
]);
return state.plane;
}
);
@ -27991,14 +28015,20 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
const singleCueFD = state.plane.options.systems.singleCueFD ? 1 << 8 : 0;
const inhibitTireFailure = state.plane.options.systems.inhibitTireFailure ? 1 << 9 : 0;
const windVectorType = state.plane.options.systems.windVectorType === "vector" ? 1 << 10 : 0;
const radioAltitude = state.plane.options.systems.radioAltitude ? 1 << 11 : 0;
const wbs = state.plane.options.systems.wbs ? 1 << 12 : 0;
const automaticAntiIce = state.plane.options.systems.automaticAntiIce ? 1 << 13 : 0;
await api2.setEFBVariable(
const wbs = state.plane.options.systems.wbs ? 1 << 11 : 0;
const automaticAntiIce = state.plane.options.systems.automaticAntiIce ? 1 << 12 : 0;
await Promise.all([
api2.setEFBVariable(
"OPTIONS_RAD_ALT_BEHAVIOR",
"number",
state.plane.options.systems.radAltBehavior
),
api2.setEFBVariable(
"OPTIONS_SYSTEMS",
"number",
digitalStandby | fuelDipstick | customSIDs | customSTARs | customAPPRs | rcws | tapeDisplays | highDecelRateABS | singleCueFD | inhibitTireFailure | windVectorType | radioAltitude | wbs | automaticAntiIce
);
digitalStandby | fuelDipstick | customSIDs | customSTARs | customAPPRs | rcws | tapeDisplays | highDecelRateABS | singleCueFD | inhibitTireFailure | windVectorType | wbs | automaticAntiIce
)
]);
await api2.triggerReadVariable([16 /* SystemOptions */]);
return state.plane;
}
@ -28116,7 +28146,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
const scrollAcceleration = state.plane.options.behaviour.scrollAcceleration ? 1 << 4 : 0;
await Promise.all([
api2.setEFBVariable(
"IRS_ALIGN",
"OPTIONS_IRS_ALIGN",
"number",
state.plane.options.behaviour.irsAlignTime
),
@ -28341,12 +28371,12 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
// src/lib/interfaces/autobrake.ts
var autobrakeSettings = [
{
value: 0 /* LOW */,
label: "LOW"
value: 0 /* MIN */,
label: "MIN"
},
{
value: 1 /* MEDIUM */,
label: "MEDIUM"
value: 1 /* MED */,
label: "MED"
},
{
value: 2 /* MAX */,
@ -28413,7 +28443,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
pressure: NaN
},
lw: -1,
autobrake: 0 /* LOW */,
autobrake: 0 /* MIN */,
reversers: 3 /* NONE */,
flaps50: false,
performance: {
@ -32746,7 +32776,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
const value = parseInt(e);
dispatch(
setInput(__spreadProps(__spreadValues({}, payloadConfig.input), {
weightPerPassenger: value || planeConfig.options.general.weightUnits == "kg" ? 79 : 175
weightPerPassenger: value || planeConfig.options.general.weightUnits == "kgs" ? 79 : 175
}))
);
},
@ -35801,7 +35831,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
}))
);
},
children: "Get TOW"
children: "Get Takeoff Weight"
}
)
] }),
@ -35999,7 +36029,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
var perfData = [
{
brakingAction: 0 /* GOOD */,
autoBrake: 0 /* LOW */,
autoBrake: 0 /* MIN */,
baseDistances: [
{ headwind: -10, distance: 2230, landingAllowed: true },
{ headwind: -5, distance: 2140, landingAllowed: true },
@ -36080,7 +36110,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
},
{
brakingAction: 0 /* GOOD */,
autoBrake: 1 /* MEDIUM */,
autoBrake: 1 /* MED */,
baseDistances: [
{ headwind: -10, distance: 1870, landingAllowed: true },
{ headwind: -5, distance: 1800, landingAllowed: true },
@ -36242,7 +36272,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
},
{
brakingAction: 1 /* MEDIUM */,
autoBrake: 0 /* LOW */,
autoBrake: 0 /* MIN */,
baseDistances: [
{ headwind: -10, distance: 2230, landingAllowed: false },
{ headwind: -5, distance: 2140, landingAllowed: true },
@ -36323,7 +36353,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
},
{
brakingAction: 1 /* MEDIUM */,
autoBrake: 1 /* MEDIUM */,
autoBrake: 1 /* MED */,
baseDistances: [
{ headwind: -10, distance: 1950, landingAllowed: false },
{ headwind: -5, distance: 1880, landingAllowed: true },
@ -36485,7 +36515,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
},
{
brakingAction: 2 /* POOR */,
autoBrake: 1 /* MEDIUM */,
autoBrake: 1 /* MED */,
baseDistances: [
{ headwind: -10, distance: 2720, landingAllowed: false },
{ headwind: -5, distance: 2600, landingAllowed: false },
@ -37242,7 +37272,25 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
]
}
)
] }) })
] }) }),
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
"button",
{
className: "text-2xs w-full rounded-b-lg bg-blue-700 px-6 py-3 font-sans font-bold uppercase text-white shadow-md shadow-blue-500/20 transition-all hover:shadow-lg hover:shadow-blue-500/40 focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none",
onClick: async () => {
const api2 = await lib();
const lw = await api2.getEFBVariable("PRED_LW");
dispatch(
setArrival(__spreadProps(__spreadValues({}, config3), {
lw: Math.round(
isMetric ? lw * 0.453592 : lw
)
}))
);
},
children: "Get Landing Weight"
}
)
] }),
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "mb-6 ml-8 flex flex-col gap-y-4", children: [
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "relative mx-auto h-full w-1/4 flex-grow border-2 bg-zinc-700", children: [
@ -40787,8 +40835,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Weight Units",
value: planeConfig.options.general.weightUnits,
setValue: (value) => setValue("weightUnits", value),
leftLabel: { label: "Imperial", value: "lbs" },
rightLabel: { label: "Metric", value: "kgs" },
leftLabel: { label: "Metric", value: "kgs" },
rightLabel: { label: "Imperial", value: "lbs" },
backgroundColor: "bg-zinc-700"
}
) }),
@ -40798,8 +40846,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Temperature Units",
value: planeConfig.options.general.temperatureUnits,
setValue: (value) => setValue("temperatureUnits", value),
leftLabel: { label: "\xB0F", value: "f" },
rightLabel: { label: "\xB0C", value: "c" },
leftLabel: { label: "\xB0C", value: "c" },
rightLabel: { label: "\xB0F", value: "f" },
backgroundColor: "bg-zinc-600"
}
) }),
@ -40809,39 +40857,102 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "MANPADS Defense System",
value: planeConfig.options.general.manpads,
setValue: (value) => setValue("manpads", value),
leftLabel: { label: "Visible", value: true },
rightLabel: { label: "Hidden", value: false },
leftLabel: { label: "Hidden", value: false },
rightLabel: { label: "Visible", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
planeConfig.options.general.canBeER && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex w-full items-center justify-between bg-zinc-600 p-2 px-4 text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
ToggleComponent,
{
optionName: "Extended Range",
value: planeConfig.options.general.isExtendedRange,
setValue: (value) => setValue("isExtendedRange", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
backgroundColor: "bg-zinc-600"
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"div",
{
className: `flex w-full items-center justify-between rounded-b-md p-2 px-4 text-xs ${planeConfig.options.general.canBeER ? "bg-zinc-700" : "bg-zinc-600"}`,
className: `flex w-full items-center justify-between bg-zinc-600 p-2 px-4 text-xs ${!planeConfig.options.general.canBeER && "rounded-b-md"}`,
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
ToggleComponent,
{
optionName: "Pause at TOD",
value: planeConfig.options.general.pauseAtTOD,
setValue: (value) => setValue("pauseAtTOD", value),
leftLabel: { label: "Yes", value: true },
rightLabel: { label: "No", value: false },
leftLabel: { label: "No", value: false },
rightLabel: { label: "Yes", value: true },
backgroundColor: planeConfig.options.general.canBeER ? "bg-zinc-700" : "bg-zinc-600"
}
)
}
),
planeConfig.options.general.hasXS && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex w-full items-center justify-between bg-zinc-700 p-2 px-4 text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex w-full items-center justify-between text-xs", children: [
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Failure Chance" }),
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
"div",
{
className: "inline-flex w-1/2 rounded-md shadow-sm",
role: "group",
children: [
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"button",
{
type: "button",
className: `${planeConfig.options.general.failureChance === 0 ? "bg-green-700" : "bg-zinc-600"} w-1/2 rounded-l-lg border border-white px-4 py-2 text-white`,
onClick: () => setValue("failureChance", 0),
children: "Never"
}
),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"button",
{
type: "button",
className: `${planeConfig.options.general.failureChance === 1 ? "bg-green-700" : "bg-zinc-600"} w-1/2 border border-white px-4 py-2 text-white`,
onClick: () => setValue("failureChance", 1),
children: "Normal"
}
),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"button",
{
type: "button",
className: `${planeConfig.options.general.failureChance === 2 ? "bg-green-700" : "bg-zinc-600"} w-1/2 rounded-r-lg border border-white px-4 py-2 text-white`,
onClick: () => setValue("failureChance", 2),
children: "High"
}
)
]
}
)
] }) }),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex w-full items-center justify-between bg-zinc-600 p-2 px-4 text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
ToggleComponent,
{
optionName: "Severe Failures",
value: planeConfig.options.general.enableSevereFailures,
setValue: (value) => setValue("enableSevereFailures", value),
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: `flex w-full items-center justify-between bg-zinc-700 p-2 px-4 text-lg ${!planeConfig.options.general.canBeER ? "rounded-b-md" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
ToggleComponent,
{
optionName: "Random Failures",
value: planeConfig.options.general.enableRandomFailures,
setValue: (value) => setValue("enableRandomFailures", value),
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) })
] }),
planeConfig.options.general.canBeER && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex w-full items-center justify-between rounded-b-md bg-zinc-600 p-2 px-4 text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
ToggleComponent,
{
optionName: "Extended Range",
value: planeConfig.options.general.isExtendedRange,
setValue: (value) => setValue("isExtendedRange", value),
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex justify-between", children: [
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mt-2 flex w-full items-center justify-start text-lg", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"button",
@ -40904,8 +41015,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Automatic Anti-Ice",
value: planeConfig.options.systems.automaticAntiIce,
setValue: (value) => setValue("automaticAntiIce", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
@ -40915,8 +41026,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Digital Standby",
value: planeConfig.options.systems.digitalStandby,
setValue: (value) => setValue("digitalStandby", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -40926,8 +41037,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Fuel Dipstick",
value: planeConfig.options.systems.fuelDipstick,
setValue: (value) => setValue("fuelDipstick", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
@ -40937,8 +41048,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "RCWS",
value: planeConfig.options.systems.rcws,
setValue: (value) => setValue("rcws", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -40948,8 +41059,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Tape Displays",
value: planeConfig.options.systems.tapeDisplays,
setValue: (value) => setValue("tapeDisplays", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
@ -40959,8 +41070,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "High Decel Rate ABS",
value: planeConfig.options.systems.highDecelRateABS,
setValue: (value) => setValue("highDecelRateABS", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -40970,8 +41081,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Single Cue FD",
value: planeConfig.options.systems.singleCueFD,
setValue: (value) => setValue("singleCueFD", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
@ -40981,8 +41092,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Inhibit Tire Failure",
value: planeConfig.options.systems.inhibitTireFailure,
setValue: (value) => setValue("inhibitTireFailure", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -40997,25 +41108,53 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
backgroundColor: "bg-zinc-600"
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex w-full items-center justify-between bg-zinc-700 p-2 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
ToggleComponent,
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex w-full items-center justify-between bg-zinc-700 p-2 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex w-full items-center justify-between text-xs", children: [
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: "Radio Altitude Behavior" }),
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
"div",
{
optionName: "Radio Altitude",
value: planeConfig.options.systems.radioAltitude,
setValue: (value) => setValue("radioAltitude", value),
leftLabel: { label: "Show", value: true },
rightLabel: { label: "Hide", value: false },
backgroundColor: "bg-zinc-700"
className: "inline-flex w-1/2 rounded-md shadow-sm",
role: "group",
children: [
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"button",
{
type: "button",
className: `${planeConfig.options.systems.radAltBehavior === 0 ? "bg-green-700" : "bg-zinc-600"} w-1/2 rounded-l-lg border border-white px-4 py-2 text-white`,
onClick: () => setValue("radAltBehavior", 0),
children: "Standard"
}
) }),
),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"button",
{
type: "button",
className: `${planeConfig.options.systems.radAltBehavior === 1 ? "bg-green-700" : "bg-zinc-600"} w-1/2 border border-white px-4 py-2 text-white`,
onClick: () => setValue("radAltBehavior", 1),
children: "Rising Box"
}
),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"button",
{
type: "button",
className: `${planeConfig.options.systems.radAltBehavior === 2 ? "bg-green-700" : "bg-zinc-600"} w-1/2 rounded-r-lg border border-white px-4 py-2 text-white`,
onClick: () => setValue("radAltBehavior", 2),
children: "Rising Runway"
}
)
]
}
)
] }) }),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex w-full items-center justify-between rounded-b-md bg-zinc-600 p-2 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
ToggleComponent,
{
optionName: "WBS",
value: planeConfig.options.systems.wbs,
setValue: (value) => setValue("wbs", value),
leftLabel: { label: "Installed", value: true },
rightLabel: { label: "Not Installed", value: false },
leftLabel: { label: "Not Installed", value: false },
rightLabel: { label: "Installed", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
@ -41074,8 +41213,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
"button",
{
type: "button",
className: `${planeConfig.options.caws.altAlertType === 2 ? "bg-green-700" : "bg-zinc-600"} w-1/2 rounded-l-lg border border-white px-4 py-2 text-white`,
onClick: () => setValue("altAlertType", 2),
className: `${planeConfig.options.caws.altAlertType === 0 ? "bg-green-700" : "bg-zinc-600"} w-1/2 rounded-l-lg border border-white px-4 py-2 text-white`,
onClick: () => setValue("altAlertType", 0),
children: "None"
}
),
@ -41092,8 +41231,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
"button",
{
type: "button",
className: `${planeConfig.options.caws.altAlertType === 0 ? "bg-green-700" : "bg-zinc-600"} w-1/2 rounded-r-lg border border-white px-4 py-2 text-white`,
onClick: () => setValue("altAlertType", 0),
className: `${planeConfig.options.caws.altAlertType === 2 ? "bg-green-700" : "bg-zinc-600"} w-1/2 rounded-r-lg border border-white px-4 py-2 text-white`,
onClick: () => setValue("altAlertType", 2),
children: "Voice and Tone"
}
)
@ -41121,8 +41260,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "2500ft Callout",
value: planeConfig.options.caws.callout2500,
setValue: (value) => setValue("callout2500", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -41132,8 +41271,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "1000ft Callout",
value: planeConfig.options.caws.callout1000,
setValue: (value) => setValue("callout1000", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
@ -41143,8 +41282,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "500ft Callout",
value: planeConfig.options.caws.callout500,
setValue: (value) => setValue("callout500", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -41154,8 +41293,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "400ft Callout",
value: planeConfig.options.caws.callout400,
setValue: (value) => setValue("callout400", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
@ -41165,8 +41304,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "300ft Callout",
value: planeConfig.options.caws.callout300,
setValue: (value) => setValue("callout300", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -41176,8 +41315,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "200ft Callout",
value: planeConfig.options.caws.callout200,
setValue: (value) => setValue("callout200", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
@ -41187,8 +41326,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "100ft Callout",
value: planeConfig.options.caws.callout100,
setValue: (value) => setValue("callout100", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -41198,8 +41337,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "50ft to 10ft Callouts",
value: planeConfig.options.caws.callout50onwards,
setValue: (value) => setValue("callout50onwards", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
@ -41351,8 +41490,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "High-Efficiency Flap Pylon",
value: planeConfig.options.performance.flapPylonPIP,
setValue: (value) => setValue("flapPylonPIP", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -41362,8 +41501,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Deflected Ailerons",
value: planeConfig.options.performance.deflectedAilerons,
setValue: (value) => setValue("deflectedAilerons", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
@ -41442,8 +41581,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "CPDLC Provider",
value: planeConfig.options.communication.useHoppies,
setValue: (value) => setValue("useHoppies", value),
leftLabel: { label: "Hoppie", value: true },
rightLabel: { label: "SayIntentions AI", value: false },
leftLabel: { label: "SayIntentions AI", value: false },
rightLabel: { label: "Hoppie", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -41520,8 +41659,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Allow Hardware Overforce",
value: planeConfig.options.behaviour.allowHardwareOverforce,
setValue: (value) => setValue("allowHardwareOverforce", value),
leftLabel: { label: "Yes", value: true },
rightLabel: { label: "No", value: false },
leftLabel: { label: "No", value: false },
rightLabel: { label: "Yes", value: true },
backgroundColor: "bg-zinc-600"
}
) }),
@ -41531,8 +41670,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Automatic Seatbelt Behavior",
value: planeConfig.options.behaviour.automaticSeatbelt,
setValue: (value) => setValue("automaticSeatbelt", value),
leftLabel: { label: "Altitude", value: true },
rightLabel: { label: "Configuration", value: false },
leftLabel: { label: "Configuration", value: false },
rightLabel: { label: "Altitude", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -41631,8 +41770,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Sync Minimums",
value: planeConfig.options.behaviour.minimumsSync,
setValue: (value) => setValue("minimumsSync", value),
leftLabel: { label: "Yes", value: true },
rightLabel: { label: "No", value: false },
leftLabel: { label: "No", value: false },
rightLabel: { label: "Yes", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -41681,8 +41820,8 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
optionName: "Scroll Acceleration",
value: planeConfig.options.behaviour.scrollAcceleration,
setValue: (value) => setValue("scrollAcceleration", value),
leftLabel: { label: "Enabled", value: true },
rightLabel: { label: "Disabled", value: false },
leftLabel: { label: "Disabled", value: false },
rightLabel: { label: "Enabled", value: true },
backgroundColor: "bg-zinc-700"
}
) }),
@ -41927,6 +42066,9 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
const simBrief = useSelector((state) => state.simbrief);
const planeConfig = useSelector((state) => state.plane);
const [minZFW, setMinZFW] = (0, import_react13.useState)(0);
(0, import_react13.useEffect)(() => {
dispatch(getPlaneConfig());
}, []);
const importPlan = async () => {
var _a2;
dispatch(setPlan("reloading"));

View File

@ -22,6 +22,8 @@
#include "shared.h"
/******************************** Constants ********************************/
//PMC pallet due to 104in door
#define MAX_UPPER_CARGO(IS_IMPERIAL) ((IS_IMPERIAL) ? (6.5 * 15000.0) : (6.5 * 6804.0))
// Max ZFW
#define MAX_F_ZFW(IS_IMPERIAL) ((IS_IMPERIAL) ? (451300) : (204706))
// Arms

View File

@ -17,7 +17,6 @@
#define AUX_WEIGHT(IS_IMPERIAL) ((IS_IMPERIAL) ? (200.0) : (91.0))
//PMC pallet due to 104in door
#define MAX_FRONT_CARGO(IS_IMPERIAL) ((IS_IMPERIAL) ? (6.0 * 15000.0) : (6.0 * 6804.0))
#define MAX_UPPER_CARGO(IS_IMPERIAL) ((IS_IMPERIAL) ? (6.5 * 15000.0) : (6.5 * 6804.0))
//LD3s due to 70in door, ER option takes up two slots
#define MAX_REAR_CARGO(IS_IMPERIAL, IS_ER) ((IS_IMPERIAL) ? ((IS_ER ? 12.0 : 14.0) * 3500.0) : ((IS_ER ? 12.0 : 14.0) * 1588.0))
// Max TOW