INITA linked in
This commit is contained in:
parent
31e8269996
commit
fc25237eb2
4 changed files with 12 additions and 5 deletions
|
@ -1963,7 +1963,11 @@ var canvas_MCDU_base = {
|
|||
me["Simple_L2"].setText("----/----------");
|
||||
me.showRight(-1, 1, 0, 0, 0, 0);
|
||||
me["Simple_R2S"].show();
|
||||
me["INITA_InitRequest"].show();
|
||||
if (!Simbrief.SimbriefParser.inhibit) {
|
||||
me["INITA_InitRequest"].show();
|
||||
} else {
|
||||
me["INITA_InitRequest"].hide();
|
||||
}
|
||||
}
|
||||
if (ADIRSMCDUBTN.getValue() != 1) {
|
||||
me["INITA_AlignIRS"].show();
|
||||
|
|
|
@ -3,20 +3,22 @@
|
|||
|
||||
var SimbriefParser = {
|
||||
node: nil,
|
||||
inhibit: 0,
|
||||
fetch: func(username, i) {
|
||||
me.inhibit = 1;
|
||||
var stamp = systime();
|
||||
http.save("https://www.simbrief.com/api/xml.fetcher.php?username=" ~ username, getprop('/sim/fg-home') ~ "/Export/simbrief" ~ stamp ~ ".xml")
|
||||
.fail(func mcdu.mcdu_message(i, "SIMBRIEF FAILED"))
|
||||
.done(func me.read(getprop('/sim/fg-home') ~ "/Export/simbrief" ~ stamp ~ ".xml"));
|
||||
.done(func me.read(getprop('/sim/fg-home') ~ "/Export/simbrief" ~ stamp ~ ".xml"), 1);
|
||||
},
|
||||
read: func(xml) {
|
||||
read: func(xml, i) {
|
||||
var data = io.readxml(xml);
|
||||
if (data != nil) {
|
||||
if (data.getChild("OFP") == nil) {
|
||||
print("XML file " ~ xml ~ " not a valid Simbrief file");
|
||||
} else {
|
||||
me.node = data;
|
||||
debug.dump(me.node.getChild("OFP").getChild("fetch").getChild("status"));
|
||||
mcdu.mcdu_message(i, "AOC ACT F-PLN UPLINK");
|
||||
}
|
||||
} else {
|
||||
print("Error reading " ~ xml);
|
||||
|
|
|
@ -172,7 +172,7 @@ var MessageController = {
|
|||
TypeIMessage.new("TMPY F-PLN EXISTS", 1),TypeIMessage.new("SELECT DESIRED SYSTEM"),TypeIMessage.new("SELECT HDG/TRK FIRST"),
|
||||
TypeIMessage.new("USING COST INDEX N", 1),TypeIMessage.new("WAIT FOR SYSTEM RESPONSE"),TypeIMessage.new("RWY/LS MISMATCH"),
|
||||
TypeIMessage.new("VHF3 VOICE MSG NOT GEN"),TypeIMessage.new("NO COMM MSG NOT GEN"),TypeIMessage.new("WX UPLINK"),
|
||||
TypeIMessage.new("SIMBRIEF FAILED"),TypeIMessage.new("MISSING USERNAME"),
|
||||
TypeIMessage.new("SIMBRIEF FAILED"),TypeIMessage.new("MISSING USERNAME"),TypeIMessage.new("AOC ACT F-PLN UPLINK"),
|
||||
]),
|
||||
typeIIMessages: std.Vector.new([
|
||||
TypeIIMessage.new("LAT DISCONT AHEAD", "amb", 0),TypeIIMessage.new("MORE DRAG"),TypeIIMessage.new("RWY/LS MISMATCH", "amb", 0),TypeIIMessage.new("STEP DELETED"),
|
||||
|
|
|
@ -186,6 +186,7 @@ var initInputA = func(key, i) {
|
|||
}
|
||||
fmgc.flightPlanController.reset(2);
|
||||
fmgc.flightPlanController.init();
|
||||
Simbrief.SimbriefParser.inhibit = 0;
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
#} else if (scratchpad == "") {
|
||||
#fmgc.FMGCInternal.altSelected = 0;
|
||||
|
|
Loading…
Reference in a new issue