Fix SB persist
This commit is contained in:
@@ -92,31 +92,30 @@ export const CoherentCallStationEntryF = (
|
||||
);
|
||||
};
|
||||
|
||||
export const CoherentCallSBEntryPax = (cargo: number, numPax: number, CGTarget: number, SBPlan?: SimBrief) => {
|
||||
Coherent.call(
|
||||
COHERENT_COMM_BUS_WASM_CALL,
|
||||
COMM_BUS_UPDATE_TARGET_EVENT,
|
||||
JSON.stringify({
|
||||
mode: MODE_SB_SET,
|
||||
cargo: cargo,
|
||||
numPax: numPax,
|
||||
CGTarget: CGTarget,
|
||||
plannedZFW: SBPlan?.plannedZFW ?? 0,
|
||||
plannedGW: SBPlan?.plannedGW ?? 0,
|
||||
})
|
||||
);
|
||||
export const CoherentCallSBEntryPax = (CGTarget: number, SBPlan?: SimBrief) => {
|
||||
const payload = {
|
||||
mode: MODE_SB_SET,
|
||||
cargo: SBPlan?.cargo,
|
||||
numPax: SBPlan ? parseInt(SBPlan.pax as unknown as string) : undefined,
|
||||
CGTarget: CGTarget,
|
||||
plannedZFW: SBPlan?.plannedZFW,
|
||||
plannedGW: SBPlan?.plannedGW,
|
||||
};
|
||||
const string = JSON.stringify(payload);
|
||||
|
||||
Coherent.call(COHERENT_COMM_BUS_WASM_CALL, COMM_BUS_UPDATE_TARGET_EVENT, string);
|
||||
};
|
||||
|
||||
export const CoherentCallSBEntryF = (cargo: number, CGTarget: number, SBPlan?: SimBrief) => {
|
||||
export const CoherentCallSBEntryF = (CGTarget: number, SBPlan?: SimBrief) => {
|
||||
Coherent.call(
|
||||
COHERENT_COMM_BUS_WASM_CALL,
|
||||
COMM_BUS_UPDATE_TARGET_EVENT,
|
||||
JSON.stringify({
|
||||
mode: MODE_SB_SET,
|
||||
cargo: cargo,
|
||||
cargo: SBPlan?.cargo,
|
||||
CGTarget: CGTarget,
|
||||
plannedZFW: SBPlan?.plannedZFW ?? 0,
|
||||
plannedGW: SBPlan?.plannedGW ?? 0,
|
||||
plannedZFW: SBPlan?.plannedZFW,
|
||||
plannedGW: SBPlan?.plannedGW,
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user