From fa0883779e067dde3359ea3561c50db067a1160c Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 25 Sep 2023 22:37:47 +0200 Subject: [PATCH 01/54] retrieve dep.elevation and print --- Nasal/FMGC/FMGC.nas | 1 + Nasal/MCDU/INITA.nas | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 0821514c..40c554f0 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -157,6 +157,7 @@ var FMGCInternal = { gndTemp: 15, gndTempSet: 0, depApt: "", + depAptElev: 0, tropo: 36090, tropoSet: 0, toFromSet: 0, diff --git a/Nasal/MCDU/INITA.nas b/Nasal/MCDU/INITA.nas index 928e6b76..c01bba77 100644 --- a/Nasal/MCDU/INITA.nas +++ b/Nasal/MCDU/INITA.nas @@ -264,6 +264,10 @@ var initInputA = func(key, i) { fmgc.FMGCInternal.toFromSet = 1; fmgc.FMGCNodes.toFromSet.setValue(1); mcdu_scratchpad.scratchpads[i].empty(); + + fmgc.FMGCInternal.depAptElev = math.round(airportinfo(fromto[0]).elevation * M2FT, 10); + print ("Fra Elevation " , fmgc.FMGCInternal.depAptElev); + fmgc.flightPlanController.updateAirports(fromto[0], fromto[1], 2); fmgc.FMGCInternal.altSelected = 0; From 8fa439dd8de83ee13744bd7e4cc4c494587f2fc6 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Fri, 29 Sep 2023 16:39:21 +0200 Subject: [PATCH 02/54] before dashes --- Models/Liveries/PW-NEO/DLH.xml | 1 + Models/Liveries/PW-NEO/NKS.xml | 1 + Nasal/FMGC/FMGC.nas | 2 +- Nasal/MCDU/INITA.nas | 5 +---- Nasal/MCDU/MCDU.nas | 1 + Nasal/MCDU/PERFTO.nas | 13 ++++++++++++- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Models/Liveries/PW-NEO/DLH.xml b/Models/Liveries/PW-NEO/DLH.xml index 09d43e55..9030bbe6 100644 --- a/Models/Liveries/PW-NEO/DLH.xml +++ b/Models/Liveries/PW-NEO/DLH.xml @@ -19,6 +19,7 @@ +0.0 +0.0 + 1000 D-AINK diff --git a/Models/Liveries/PW-NEO/NKS.xml b/Models/Liveries/PW-NEO/NKS.xml index a195b371..44386e1c 100644 --- a/Models/Liveries/PW-NEO/NKS.xml +++ b/Models/Liveries/PW-NEO/NKS.xml @@ -19,6 +19,7 @@ +0.0 +0.0 + 1500 N903NK diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 40c554f0..1d017fa3 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -157,7 +157,7 @@ var FMGCInternal = { gndTemp: 15, gndTempSet: 0, depApt: "", - depAptElev: 0, + depAptElev: nil, tropo: 36090, tropoSet: 0, toFromSet: 0, diff --git a/Nasal/MCDU/INITA.nas b/Nasal/MCDU/INITA.nas index c01bba77..75a7f857 100644 --- a/Nasal/MCDU/INITA.nas +++ b/Nasal/MCDU/INITA.nas @@ -264,11 +264,8 @@ var initInputA = func(key, i) { fmgc.FMGCInternal.toFromSet = 1; fmgc.FMGCNodes.toFromSet.setValue(1); mcdu_scratchpad.scratchpads[i].empty(); - fmgc.FMGCInternal.depAptElev = math.round(airportinfo(fromto[0]).elevation * M2FT, 10); - print ("Fra Elevation " , fmgc.FMGCInternal.depAptElev); - - + setprop("/FMGC/internal/accel-agl-ft", fmgc.FMGCInternal.depAptElev); fmgc.flightPlanController.updateAirports(fromto[0], fromto[1], 2); fmgc.FMGCInternal.altSelected = 0; fmgc.updateARPT(); diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 54f8f6b0..04a759da 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -153,6 +153,7 @@ var MCDU_reset = func(i) { fmgc.FMGCInternal.vrset = 0; fmgc.FMGCInternal.v2 = 0; fmgc.FMGCInternal.v2set = 0; + print("Default accel ", getprop("/options/default-accel-agl")); setprop("/FMGC/internal/accel-agl-ft", 1500); #eventually set to 1500 above runway setprop("/MCDUC/thracc-set", 0); fmgc.FMGCInternal.toFlap = 0; diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index 00c333b1..fd274fe5 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -150,7 +150,18 @@ var perfTOInput = func(key, i) { } else if (key == "L5" and modifiable) { if (scratchpad == "CLR") { setprop("/fdm/jsbsim/fadec/clbreduc-ft", 1500); - setprop("/FMGC/internal/accel-agl-ft", 1500); + if (fmgc.FMGCInternal.depAptElev != nil) { + var newAccelAlt = fmgc.FMGCInternal.depAptElev; + if (getprop("/options/company-options/default-accel-agl")) { + newAccelAlt += getprop("/options/company-options/default-accel-agl"); + } else { + newAccelAlt += 400; # minimum accel agl if no company option + } + setprop("/FMGC/internal/accel-agl-ft", newAccelAlt); + print("Default livery ", getprop("/options/company-options/default-accel-agl")) + } else { + setprop("/FMGC/internal/accel-agl-ft", 2500); # dep elev = 0, set default + } setprop("MCDUC/thracc-set", 0); mcdu_scratchpad.scratchpads[i].empty(); } else { From fa625756b2b09dd3a172b5f7ece82a62684e18c9 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 2 Oct 2023 21:56:48 +0200 Subject: [PATCH 03/54] accelAltFt --- Models/Instruments/MCDU/MCDU.nas | 13 ++++++++++--- Nasal/MCDU/INITA.nas | 11 ++++++++++- Nasal/MCDU/MCDU.nas | 2 +- Nasal/MCDU/PERFTO.nas | 2 -- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 96d2fd3c..e89b3250 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -90,7 +90,7 @@ var state2 = props.globals.getNode("/engines/engine[1]/state", 1); var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1); # TO PERF var clbReducFt = props.globals.getNode("/fdm/jsbsim/fadec/clbreduc-ft", 1); -var reducFt = props.globals.getNode("/FMGC/internal/accel-agl-ft", 1); # It's not AGL anymore +var accelAltFt = props.globals.getNode("/FMGC/internal/accel-agl-ft", 1); # It's not AGL anymore var thrAccSet = props.globals.getNode("/MCDUC/thracc-set", 1); var flex = props.globals.getNode("/fdm/jsbsim/fadec/limit/flex-temp", 1); var flexSet = props.globals.getNode("/fdm/jsbsim/fadec/limit/flex-active-cmd", 1); @@ -4316,7 +4316,6 @@ var canvas_MCDU_base = { } me["Simple_L4"].setText(sprintf("%3.0f", fmgc.FMGCInternal.transAlt)); - me["Simple_L5"].setText(" " ~ sprintf("%3.0f", clbReducFt.getValue()) ~ sprintf("/%3.0f", reducFt.getValue())); me["Simple_L6"].setText(" TO DATA"); me["Simple_L1S"].setText(" V1"); me["Simple_L2S"].setText(" VR"); @@ -4400,6 +4399,14 @@ var canvas_MCDU_base = { me["Simple_L5"].setFontSize(small); } + if(accelAltFt.getValue() == ""){ + me["Simple_L5"].setColor(WHITE); + me["Simple_L5"].setText("-----/-----"); + } else { + me["Simple_L5"].setColor(BLUE); + me["Simple_L5"].setText("" ~ sprintf("%4.0f", clbReducFt.getValue()) ~ sprintf("/%4.0f", accelAltFt.getValue())); + } + if (fmgc.FMGCInternal.toFlapThsSet) { me["Simple_R3"].setFontSize(normal); if (fmgc.FMGCInternal.toThs) { @@ -5082,7 +5089,7 @@ var canvas_MCDU_base = { me["Simple_R5"].setFontSize(small); } - me["Simple_L5"].setText(sprintf("%3.0f", clbReducFt.getValue()) ~ sprintf("/%3.0f", reducFt.getValue())); + me["Simple_L5"].setText(sprintf("%3.0f", clbReducFt.getValue()) ~ sprintf("/%3.0f", accelAltFt.getValue())); me["Simple_L6"].setText(" PHASE"); me["Simple_L5S"].setText("THR RED/ACC"); me["Simple_L6S"].setText(" PREV"); diff --git a/Nasal/MCDU/INITA.nas b/Nasal/MCDU/INITA.nas index 75a7f857..b46038b9 100644 --- a/Nasal/MCDU/INITA.nas +++ b/Nasal/MCDU/INITA.nas @@ -265,7 +265,16 @@ var initInputA = func(key, i) { fmgc.FMGCNodes.toFromSet.setValue(1); mcdu_scratchpad.scratchpads[i].empty(); fmgc.FMGCInternal.depAptElev = math.round(airportinfo(fromto[0]).elevation * M2FT, 10); - setprop("/FMGC/internal/accel-agl-ft", fmgc.FMGCInternal.depAptElev); + if (fmgc.FMGCInternal.depAptElev != nil) { + var newAccelAlt = fmgc.FMGCInternal.depAptElev; + if (getprop("/options/company-options/default-accel-agl")) { + newAccelAlt += getprop("/options/company-options/default-accel-agl"); + } else { + newAccelAlt += 400 ; # minimum accel agl if no company option + } + } + # check FCU alt + setprop("/FMGC/internal/accel-agl-ft", newAccelAlt); fmgc.flightPlanController.updateAirports(fromto[0], fromto[1], 2); fmgc.FMGCInternal.altSelected = 0; fmgc.updateARPT(); diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 04a759da..709f7460 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -154,7 +154,7 @@ var MCDU_reset = func(i) { fmgc.FMGCInternal.v2 = 0; fmgc.FMGCInternal.v2set = 0; print("Default accel ", getprop("/options/default-accel-agl")); - setprop("/FMGC/internal/accel-agl-ft", 1500); #eventually set to 1500 above runway + setprop("/FMGC/internal/accel-agl-ft", ""); #eventually set to 1500 above runway setprop("/MCDUC/thracc-set", 0); fmgc.FMGCInternal.toFlap = 0; fmgc.FMGCInternal.toThs = 0.0; diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index fd274fe5..566fc060 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -159,8 +159,6 @@ var perfTOInput = func(key, i) { } setprop("/FMGC/internal/accel-agl-ft", newAccelAlt); print("Default livery ", getprop("/options/company-options/default-accel-agl")) - } else { - setprop("/FMGC/internal/accel-agl-ft", 2500); # dep elev = 0, set default } setprop("MCDUC/thracc-set", 0); mcdu_scratchpad.scratchpads[i].empty(); From 69a96e81ac086cfbbd1319e13d315294835523ca Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Thu, 5 Oct 2023 09:51:25 +0200 Subject: [PATCH 04/54] created setAccelAlt func --- Models/Instruments/MCDU/MCDU.nas | 10 ++++++---- Nasal/FMGC/FMGC.nas | 1 + Nasal/MCDU/MCDU.nas | 2 +- Nasal/MCDU/PERFTO.nas | 24 ++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index e89b3250..189b9bf1 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -4399,12 +4399,14 @@ var canvas_MCDU_base = { me["Simple_L5"].setFontSize(small); } - if(accelAltFt.getValue() == ""){ - me["Simple_L5"].setColor(WHITE); - me["Simple_L5"].setText("-----/-----"); - } else { + if(fmgc.accelAltValid){ me["Simple_L5"].setColor(BLUE); me["Simple_L5"].setText("" ~ sprintf("%4.0f", clbReducFt.getValue()) ~ sprintf("/%4.0f", accelAltFt.getValue())); + } else { + # MCDU will show dashes if thrustRed and accelAlt is not initialized + # as for now FMGC will use default value unless it is overwritten + me["Simple_L5"].setColor(WHITE); + me["Simple_L5"].setText("-----/-----"); } if (fmgc.FMGCInternal.toFlapThsSet) { diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 1d017fa3..feb39b9a 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -15,6 +15,7 @@ var gs = 0; var state1 = 0; var state2 = 0; var accel_agl_ft = 0; +var accelAltValid = 0; # barrier to say it is not initialized var fd1 = 0; var fd2 = 0; var spd = 0; diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 709f7460..04a759da 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -154,7 +154,7 @@ var MCDU_reset = func(i) { fmgc.FMGCInternal.v2 = 0; fmgc.FMGCInternal.v2set = 0; print("Default accel ", getprop("/options/default-accel-agl")); - setprop("/FMGC/internal/accel-agl-ft", ""); #eventually set to 1500 above runway + setprop("/FMGC/internal/accel-agl-ft", 1500); #eventually set to 1500 above runway setprop("/MCDUC/thracc-set", 0); fmgc.FMGCInternal.toFlap = 0; fmgc.FMGCInternal.toThs = 0.0; diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index 566fc060..a2fff8e4 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -158,6 +158,7 @@ var perfTOInput = func(key, i) { newAccelAlt += 400; # minimum accel agl if no company option } setprop("/FMGC/internal/accel-agl-ft", newAccelAlt); + fmgc.accelAltValid = 1; print("Default livery ", getprop("/options/company-options/default-accel-agl")) } setprop("MCDUC/thracc-set", 0); @@ -179,12 +180,14 @@ var perfTOInput = func(key, i) { setprop("/fdm/jsbsim/fadec/clbreduc-ft", int(thrred / 10) * 10); setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); setprop("MCDUC/thracc-set", 1); + fmgc.accelAltValid = 1; mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "NOT ALLOWED"); } } else if (thrreds == 0 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= 400 and acc <= 39000) { setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); + fmgc.accelAltValid = 1; mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "NOT ALLOWED"); @@ -336,3 +339,24 @@ var perfTOInput = func(key, i) { mcdu_message(i, "NOT ALLOWED"); } } + +var setAccelAlt = func(newAccelAlt) { + var tmpAccelAlt = 800; + if (fmgc.FMGCInternal.depAptElev != nil) { + tmpAccelAlt = fmgc.FMGCInternal.depAptElev; + if (getprop("/options/company-options/default-accel-agl")) { + tmpAccelAlt += getprop("/options/company-options/default-accel-agl"); + } else { + tmpAccelAlt += 400; # minimum accel agl if no company option + } + } + if (newAccelAlt >= tmpAccelAlt) { + if (newAccelAlt <= mcdu.clbReducFt) { + newAccelAlt = mcdu.clbReducFt; + } + } else { + newAccelAlt = tmpAccelAlt; + } + setprop("/FMGC/internal/accel-agl-ft", newAccelAlt); + fmgc.accelAltValid = 1; +} From 81680b9c365d813a1e4622e646ee1d2c86110b58 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Tue, 10 Oct 2023 12:18:38 +0200 Subject: [PATCH 05/54] clr key on init and perf/to working --- Models/Instruments/MCDU/MCDU.nas | 43 ++++++++++++++------- Models/Liveries/PW-NEO/DLH.xml | 1 + Nasal/FMGC/FMGC.nas | 6 ++- Nasal/MCDU/INITA.nas | 26 ++++++++----- Nasal/MCDU/PERFTO.nas | 64 +++++++++++++++----------------- 5 files changed, 81 insertions(+), 59 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 189b9bf1..404a45f4 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -92,6 +92,8 @@ var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altit var clbReducFt = props.globals.getNode("/fdm/jsbsim/fadec/clbreduc-ft", 1); var accelAltFt = props.globals.getNode("/FMGC/internal/accel-agl-ft", 1); # It's not AGL anymore var thrAccSet = props.globals.getNode("/MCDUC/thracc-set", 1); +var accSetManual = props.globals.getNode("/MCDUC/acc-set-manual", 1); +var thrRedSetManual = props.globals.getNode("/MCDUC/thrRed-set-manual", 1); var flex = props.globals.getNode("/fdm/jsbsim/fadec/limit/flex-temp", 1); var flexSet = props.globals.getNode("/fdm/jsbsim/fadec/limit/flex-active-cmd", 1); var engOutAcc = props.globals.getNode("/FMGC/internal/eng-out-reduc", 1); @@ -4393,20 +4395,32 @@ var canvas_MCDU_base = { me["Simple_L3"].hide(); } - if (thrAccSet.getValue() == 1) { - me["Simple_L5"].setFontSize(normal); - } else { - me["Simple_L5"].setFontSize(small); - } - - if(fmgc.accelAltValid){ - me["Simple_L5"].setColor(BLUE); - me["Simple_L5"].setText("" ~ sprintf("%4.0f", clbReducFt.getValue()) ~ sprintf("/%4.0f", accelAltFt.getValue())); + if(fmgc.FMGCInternal.depApt == ""){ + # todo: as for now FMGC will use default thrRed/accelAlt values unless it is overwritten + # these default values are not displayed in MCDU + + if (accSetManual.getBoolValue() and thrRedSetManual.getBoolValue()){ + me["Simple_L5"].setColor(BLUE); + me["Simple_L5"].setFontSize(normal); + me["Simple_L5"].setText("" ~ sprintf("%4.0f", clbReducFt.getValue()) ~ sprintf("/%4.0f", accelAltFt.getValue())); + } else { + me["Simple_L5"].setColor(WHITE); + me["Simple_L5"].setFontSize(small); + me["Simple_L5"].setText("-----/-----"); + } } else { - # MCDU will show dashes if thrustRed and accelAlt is not initialized - # as for now FMGC will use default value unless it is overwritten - me["Simple_L5"].setColor(WHITE); - me["Simple_L5"].setText("-----/-----"); + # todo: split font size if just one value set manulally + # for now both set to normal if one is set + + if (accSetManual.getBoolValue() or thrRedSetManual.getBoolValue()){ + me["Simple_L5"].setColor(BLUE); + me["Simple_L5"].setFontSize(normal); + me["Simple_L5"].setText("" ~ sprintf("%4.0f", clbReducFt.getValue()) ~ sprintf("/%4.0f", accelAltFt.getValue())); + } else { + me["Simple_L5"].setColor(BLUE); + me["Simple_L5"].setFontSize(small); + me["Simple_L5"].setText("" ~ sprintf("%4.0f", clbReducFt.getValue()) ~ sprintf("/%4.0f", accelAltFt.getValue())); + } } if (fmgc.FMGCInternal.toFlapThsSet) { @@ -6159,4 +6173,5 @@ setlistener("/MCDU[0]/page", func { }, 0, 0); setlistener("/MCDU[1]/page", func { pageSwitch[1].setBoolValue(0); -}, 0, 0); \ No newline at end of file +}, 0, 0); + diff --git a/Models/Liveries/PW-NEO/DLH.xml b/Models/Liveries/PW-NEO/DLH.xml index 9030bbe6..fde2a643 100644 --- a/Models/Liveries/PW-NEO/DLH.xml +++ b/Models/Liveries/PW-NEO/DLH.xml @@ -19,6 +19,7 @@ +0.0 +0.0 + 1000 1000 diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index feb39b9a..dfa9585b 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -129,6 +129,10 @@ var FMGCInternal = { toFlap: 0, toThs: 0, toFlapThsSet: 0, + accelAlt: 0, + accelAltSet: 0, + thrRedAlt: 0, + thrRedAltSet: 0, # PERF APPR destMag: 0, @@ -158,7 +162,7 @@ var FMGCInternal = { gndTemp: 15, gndTempSet: 0, depApt: "", - depAptElev: nil, + depAptElev: 0, tropo: 36090, tropoSet: 0, toFromSet: 0, diff --git a/Nasal/MCDU/INITA.nas b/Nasal/MCDU/INITA.nas index b46038b9..7a017e7f 100644 --- a/Nasal/MCDU/INITA.nas +++ b/Nasal/MCDU/INITA.nas @@ -265,16 +265,24 @@ var initInputA = func(key, i) { fmgc.FMGCNodes.toFromSet.setValue(1); mcdu_scratchpad.scratchpads[i].empty(); fmgc.FMGCInternal.depAptElev = math.round(airportinfo(fromto[0]).elevation * M2FT, 10); - if (fmgc.FMGCInternal.depAptElev != nil) { - var newAccelAlt = fmgc.FMGCInternal.depAptElev; - if (getprop("/options/company-options/default-accel-agl")) { - newAccelAlt += getprop("/options/company-options/default-accel-agl"); - } else { - newAccelAlt += 400 ; # minimum accel agl if no company option - } + + if (getprop("/options/company-options/default-accel-agl")) { + fmgc.FMGCInternal.AccelAlt = getprop("/options/company-options/default-accel-agl") + fmgc.FMGCInternal.depAptElev; + } else { + fmgc.FMGCInternal.AccelAlt = 400 + fmgc.FMGCInternal.depAptElev; # todo: minimum accel agl if no company option + } + + if (getprop("/options/company-options/default-thrRed-agl")) { + fmgc.FMGCInternal.thrRedAlt = getprop("/options/company-options/default-thrRed-agl") + fmgc.FMGCInternal.depAptElev; + } else { + fmgc.FMGCInternal.thrRedAlt = 400 + fmgc.FMGCInternal.depAptElev; # todo: minimum thrRed agl if no company option } - # check FCU alt - setprop("/FMGC/internal/accel-agl-ft", newAccelAlt); + setprop("/FMGC/internal/accel-agl-ft", fmgc.FMGCInternal.AccelAlt); + setprop("/fdm/jsbsim/fadec/clbreduc-ft", fmgc.FMGCInternal.thrRedAlt); + setprop("MCDUC/thracc-set", 0); + setprop("MCDUC/acc-set-manual", 0); + setprop("MCDUC/thrRed-set-manual", 0); + fmgc.flightPlanController.updateAirports(fromto[0], fromto[1], 2); fmgc.FMGCInternal.altSelected = 0; fmgc.updateARPT(); diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index a2fff8e4..38eb8055 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -149,22 +149,36 @@ var perfTOInput = func(key, i) { } } else if (key == "L5" and modifiable) { if (scratchpad == "CLR") { - setprop("/fdm/jsbsim/fadec/clbreduc-ft", 1500); - if (fmgc.FMGCInternal.depAptElev != nil) { - var newAccelAlt = fmgc.FMGCInternal.depAptElev; + if (fmgc.FMGCInternal.depApt != "") { if (getprop("/options/company-options/default-accel-agl")) { - newAccelAlt += getprop("/options/company-options/default-accel-agl"); + fmgc.FMGCInternal.AccelAlt = getprop("/options/company-options/default-accel-agl") + fmgc.FMGCInternal.depAptElev; } else { - newAccelAlt += 400; # minimum accel agl if no company option + fmgc.FMGCInternal.AccelAlt = 400 + fmgc.FMGCInternal.depAptElev; # todo: minimum accel agl if no company option } - setprop("/FMGC/internal/accel-agl-ft", newAccelAlt); - fmgc.accelAltValid = 1; - print("Default livery ", getprop("/options/company-options/default-accel-agl")) + + if (getprop("/options/company-options/default-thrRed-agl")) { + fmgc.FMGCInternal.thrRedAlt = getprop("/options/company-options/default-thrRed-agl") + fmgc.FMGCInternal.depAptElev; + } else { + fmgc.FMGCInternal.thrRedAlt = 400 + fmgc.FMGCInternal.depAptElev; # todo: minimum thrRed agl if no company option + } + } else { + fmgc.FMGCInternal.AccelAlt = 1500; # todo: default accel if no depApt + fmgc.FMGCInternal.thrRedAlt = 1500; # todo: ThrRed accel if no depApt } + setprop("/FMGC/internal/accel-agl-ft", fmgc.FMGCInternal.AccelAlt); + setprop("/fdm/jsbsim/fadec/clbreduc-ft", fmgc.FMGCInternal.thrRedAlt); setprop("MCDUC/thracc-set", 0); + setprop("MCDUC/acc-set-manual", 0); + setprop("MCDUC/thrRed-set-manual", 0); + mcdu_scratchpad.scratchpads[i].empty(); } else { var tfs = size(scratchpad); + + # min Value for ThrRed and AccelAlt are the company defaults + var minAccelAlt = getprop("/options/company-options/default-accel-agl"); + var minThrRed = getprop("/options/company-options/default-thrRed-agl"); + if (find("/", scratchpad) != -1) { var thracc = split("/", scratchpad); var thrred = thracc[0]; @@ -173,27 +187,28 @@ var perfTOInput = func(key, i) { var accs = size(acc); #TODO - manual check - four digit alwway 0000 - default = runaway_elevation + 800 ft, min values runaway_elevation+400ft - - if (int(thrred) != nil and (thrreds >= 3 and thrreds <= 5) and thrred >= 400 and thrred <= 39000 and int(acc) != nil and (accs == 3 or accs == 4 or accs == 5) and acc >= 400 and acc <= 39000) { + if (int(thrred) != nil and (thrreds >= 3 and thrreds <= 5) and thrred >= minThrRed and thrred <= 39000 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= minAccelAlt and acc <= 39000) { if (thrred<=acc) { # validation setprop("/fdm/jsbsim/fadec/clbreduc-ft", int(thrred / 10) * 10); setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); setprop("MCDUC/thracc-set", 1); - fmgc.accelAltValid = 1; + setprop("MCDUC/acc-set-manual", 1); + setprop("MCDUC/thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "NOT ALLOWED"); } - } else if (thrreds == 0 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= 400 and acc <= 39000) { + } else if (thrreds == 0 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= minAccelAlt and acc <= 39000) { setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); - fmgc.accelAltValid = 1; + setprop("MCDUC/acc-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "NOT ALLOWED"); } - } else if (num(scratchpad) != nil and (tfs >= 3 and tfs <= 5) and scratchpad >= 400 and scratchpad <= 39000) { + } else if (num(scratchpad) != nil and (tfs >= 3 and tfs <= 5) and scratchpad >= minThrRed and scratchpad <= 39000) { setprop("/fdm/jsbsim/fadec/clbreduc-ft", int(scratchpad / 10) * 10); + setprop("MCDUC/thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "NOT ALLOWED"); @@ -339,24 +354,3 @@ var perfTOInput = func(key, i) { mcdu_message(i, "NOT ALLOWED"); } } - -var setAccelAlt = func(newAccelAlt) { - var tmpAccelAlt = 800; - if (fmgc.FMGCInternal.depAptElev != nil) { - tmpAccelAlt = fmgc.FMGCInternal.depAptElev; - if (getprop("/options/company-options/default-accel-agl")) { - tmpAccelAlt += getprop("/options/company-options/default-accel-agl"); - } else { - tmpAccelAlt += 400; # minimum accel agl if no company option - } - } - if (newAccelAlt >= tmpAccelAlt) { - if (newAccelAlt <= mcdu.clbReducFt) { - newAccelAlt = mcdu.clbReducFt; - } - } else { - newAccelAlt = tmpAccelAlt; - } - setprop("/FMGC/internal/accel-agl-ft", newAccelAlt); - fmgc.accelAltValid = 1; -} From e5ababe8144c5f94105a0ddcfd0f70daf9e7eb00 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Tue, 10 Oct 2023 12:39:18 +0200 Subject: [PATCH 06/54] conform tour 6.10.23 --- Nasal/MCDU/PERFTO.nas | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index 38eb8055..d0272856 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -189,29 +189,29 @@ var perfTOInput = func(key, i) { #TODO - manual check - four digit alwway 0000 - default = runaway_elevation + 800 ft, min values runaway_elevation+400ft if (int(thrred) != nil and (thrreds >= 3 and thrreds <= 5) and thrred >= minThrRed and thrred <= 39000 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= minAccelAlt and acc <= 39000) { - if (thrred<=acc) { # validation + # if (thrred<=acc) { # validation setprop("/fdm/jsbsim/fadec/clbreduc-ft", int(thrred / 10) * 10); setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); setprop("MCDUC/thracc-set", 1); setprop("MCDUC/acc-set-manual", 1); setprop("MCDUC/thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); - } else { - mcdu_message(i, "NOT ALLOWED"); - } + #} else { + # mcdu_message(i, "NOT ALLOWED"); + #} } else if (thrreds == 0 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= minAccelAlt and acc <= 39000) { setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); setprop("MCDUC/acc-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { - mcdu_message(i, "NOT ALLOWED"); + mcdu_message(i, "FORMAT ERROR"); } } else if (num(scratchpad) != nil and (tfs >= 3 and tfs <= 5) and scratchpad >= minThrRed and scratchpad <= 39000) { setprop("/fdm/jsbsim/fadec/clbreduc-ft", int(scratchpad / 10) * 10); setprop("MCDUC/thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { - mcdu_message(i, "NOT ALLOWED"); + mcdu_message(i, "FORMAT ERROR"); } } } else if (key == "R3" and modifiable) { From ec62e66f0148efac63bf2c2c54a0981ad2e1f961 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Tue, 17 Oct 2023 11:54:41 +0200 Subject: [PATCH 07/54] split line for TOPERF page for thrred/accel --- Models/Instruments/MCDU/MCDU.nas | 46 +++++++++++++++++++++----------- Nasal/FMGC/FMGC.nas | 5 +++- Nasal/MCDU/INITA.nas | 11 ++++++++ Nasal/MCDU/PERFTO.nas | 4 +-- 4 files changed, 48 insertions(+), 18 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 404a45f4..0cf59272 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -4294,15 +4294,15 @@ var canvas_MCDU_base = { showRight(me,-1, 1, 1, 1, 1, 1); showRightS(me,1, 1, 1, 1, 1, 1); showRightArrow(me,-1, -1, -1, -1, -1, 1); - showCenter(me,1, 1, 1, -1, -1, -1); + showCenter(me,1, 1, 1, -1, 1, -1); me["Simple_C3B"].hide(); me["Simple_C4B"].hide(); - showCenterS(me,1, 1, 1, -1, -1, -1); + showCenterS(me,1, 1, 1, -1, 1, -1); me.fontSizeLeft(normal, normal, normal, normal, 0, normal); me.fontSizeRight(normal, small, 0, 0, 0, normal); - me.fontSizeCenter(small, small, small, 0, 0, 0); - me.fontSizeCenterS(small, small, small, small, small, small); + me.fontSizeCenter(small, small, small, 0, small, 0); + me.fontSizeCenterS(small, small, small, small, 0, small); me.colorLeft("blu", "blu", "blu", "blu", "blu", "wht"); me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht"); @@ -4310,7 +4310,7 @@ var canvas_MCDU_base = { me.colorRight("grn", "blu", "blu", "blu", "blu", "wht"); me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht"); me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht"); - me.colorCenter("grn", "grn", "grn", "wht", "wht", "wht"); + me.colorCenter("grn", "grn", "grn", "wht", "blu", "wht"); me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht"); me["Simple_Title"].setText("TAKE OFF"); @@ -4353,6 +4353,7 @@ var canvas_MCDU_base = { if (fmgc.FMGCInternal.phase == 1) { # GREEN title and not modifiable on TO phase me["Simple_Title"].setColor(GREEN); me.colorLeft("grn", "grn", "grn", "blu", "grn", "wht"); + me.colorCenter("grn", "grn", "grn", "blu", "grn", "wht"); me.colorRight("grn", "blu", "grn", "grn", "grn", "wht"); } else { me["Simple_Title"].setColor(WHITE); @@ -4402,24 +4403,39 @@ var canvas_MCDU_base = { if (accSetManual.getBoolValue() and thrRedSetManual.getBoolValue()){ me["Simple_L5"].setColor(BLUE); me["Simple_L5"].setFontSize(normal); - me["Simple_L5"].setText("" ~ sprintf("%4.0f", clbReducFt.getValue()) ~ sprintf("/%4.0f", accelAltFt.getValue())); + me["Simple_L5"].setText(sprintf("%4.0f", clbReducFt.getValue())); + me["Simple_C5"].setColor(BLUE); + me["Simple_C5"].setFontSize(normal); + me["Simple_C5"].setText(sprintf("/%4.0f ", accelAltFt.getValue())); } else { me["Simple_L5"].setColor(WHITE); me["Simple_L5"].setFontSize(small); - me["Simple_L5"].setText("-----/-----"); + me["Simple_L5"].setText("-----"); + me["Simple_C5"].setColor(WHITE); + me["Simple_C5"].setFontSize(small); + me["Simple_C5"].setText(sprintf("/----- ", accelAltFt.getValue())); } } else { - # todo: split font size if just one value set manulally - # for now both set to normal if one is set - - if (accSetManual.getBoolValue() or thrRedSetManual.getBoolValue()){ - me["Simple_L5"].setColor(BLUE); + if (thrRedSetManual.getBoolValue()){ me["Simple_L5"].setFontSize(normal); - me["Simple_L5"].setText("" ~ sprintf("%4.0f", clbReducFt.getValue()) ~ sprintf("/%4.0f", accelAltFt.getValue())); + me["Simple_L5"].setText(sprintf("%4.0f", clbReducFt.getValue())); + if (accSetManual.getBoolValue()) { + me["Simple_C5"].setFontSize(normal); + me["Simple_C5"].setText(sprintf("/%4.0f ", accelAltFt.getValue())); + } else { + me["Simple_C5"].setFontSize(small); + me["Simple_C5"].setText(sprintf("/%4.0f ", accelAltFt.getValue())); + } } else { - me["Simple_L5"].setColor(BLUE); me["Simple_L5"].setFontSize(small); - me["Simple_L5"].setText("" ~ sprintf("%4.0f", clbReducFt.getValue()) ~ sprintf("/%4.0f", accelAltFt.getValue())); + me["Simple_L5"].setText(sprintf("%4.0f", clbReducFt.getValue())); + if (accSetManual.getBoolValue()) { + me["Simple_C5"].setFontSize(normal); + me["Simple_C5"].setText(sprintf("/%4.0f ", accelAltFt.getValue())); + } else { + me["Simple_C5"].setFontSize(small); + me["Simple_C5"].setText(sprintf("/%4.0f ", accelAltFt.getValue())); + } } } diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index dfa9585b..1f918a17 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -37,7 +37,10 @@ var windsDidChange = 0; var tempOverspeed = nil; setprop("/position/gear-agl-ft", 0); -setprop("/it-autoflight/settings/accel-ft", 1500); #eventually set to 1500 above runway +# 1500 ft is a default value not shown anywhere. It may not exist. +# In case it does not exist, a takeoff with no departure airport and no accel set would never go from TO PHASE to CLB PHASE +# unless manually set. +setprop("/it-autoflight/settings/accel-ft", 1500); setprop("/it-autoflight/internal/vert-speed-fpm", 0); setprop("/instrumentation/nav[0]/nav-id", "XXX"); setprop("/instrumentation/nav[1]/nav-id", "XXX"); diff --git a/Nasal/MCDU/INITA.nas b/Nasal/MCDU/INITA.nas index 7a017e7f..e6402171 100644 --- a/Nasal/MCDU/INITA.nas +++ b/Nasal/MCDU/INITA.nas @@ -7,8 +7,19 @@ var resetFlightplan = func(i) { fmgc.FMGCInternal.depApt = ""; fmgc.FMGCInternal.arrApt = ""; fmgc.FMGCInternal.toFromSet = 0; + fmgc.FMGCInternal.depAptElev = 0; fmgc.FMGCNodes.toFromSet.setValue(0); fmgc.windController.resetDesWinds(); + + # clbreduc-ft and accel-agl-ft are set to arbitrary values they may not exist. + # In case they do not exist, a takeoff with no departure airport and no accel set would never go from TO PHASE to CLB PHASE + # unless manually changed. + setprop("/FMGC/internal/accel-agl-ft", 1500); + setprop("/fdm/jsbsim/fadec/clbreduc-ft", 1500); + setprop("MCDUC/thracc-set", 0); + setprop("MCDUC/acc-set-manual", 0); + setprop("MCDUC/thrRed-set-manual", 0); + setprop("/FMGC/internal/align-ref-lat", 0); setprop("/FMGC/internal/align-ref-long", 0); setprop("/FMGC/internal/align-ref-lat-edit", 0); diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index d0272856..0da6b452 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -199,14 +199,14 @@ var perfTOInput = func(key, i) { #} else { # mcdu_message(i, "NOT ALLOWED"); #} - } else if (thrreds == 0 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= minAccelAlt and acc <= 39000) { + } else if (thrreds == 0 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= minAccelAlt and acc <= 39000 and fmgc.FMGCInternal.depAptElev > 0) { setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); setprop("MCDUC/acc-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "FORMAT ERROR"); } - } else if (num(scratchpad) != nil and (tfs >= 3 and tfs <= 5) and scratchpad >= minThrRed and scratchpad <= 39000) { + } else if (num(scratchpad) != nil and (tfs >= 3 and tfs <= 5) and scratchpad >= minThrRed and scratchpad <= 39000 and fmgc.FMGCInternal.depAptElev > 0) { setprop("/fdm/jsbsim/fadec/clbreduc-ft", int(scratchpad / 10) * 10); setprop("MCDUC/thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); From 8f9d0a5c777d65183b31900af2ed424dbb63d8b0 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Wed, 18 Oct 2023 16:08:02 +0200 Subject: [PATCH 08/54] Accel/ThrRed working as tested --- Nasal/MCDU/MCDU.nas | 1 - Nasal/MCDU/PERFTO.nas | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 04a759da..54f8f6b0 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -153,7 +153,6 @@ var MCDU_reset = func(i) { fmgc.FMGCInternal.vrset = 0; fmgc.FMGCInternal.v2 = 0; fmgc.FMGCInternal.v2set = 0; - print("Default accel ", getprop("/options/default-accel-agl")); setprop("/FMGC/internal/accel-agl-ft", 1500); #eventually set to 1500 above runway setprop("/MCDUC/thracc-set", 0); fmgc.FMGCInternal.toFlap = 0; diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index 0da6b452..cf00e09d 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -162,8 +162,8 @@ var perfTOInput = func(key, i) { fmgc.FMGCInternal.thrRedAlt = 400 + fmgc.FMGCInternal.depAptElev; # todo: minimum thrRed agl if no company option } } else { - fmgc.FMGCInternal.AccelAlt = 1500; # todo: default accel if no depApt - fmgc.FMGCInternal.thrRedAlt = 1500; # todo: ThrRed accel if no depApt + fmgc.FMGCInternal.AccelAlt = 1500; # todo: default accel if no depApt / probably doesn't exist? + fmgc.FMGCInternal.thrRedAlt = 1500; # todo: default ThrRed if no depApt / probably doesn't exist? } setprop("/FMGC/internal/accel-agl-ft", fmgc.FMGCInternal.AccelAlt); setprop("/fdm/jsbsim/fadec/clbreduc-ft", fmgc.FMGCInternal.thrRedAlt); From 110dcc02bb90a4c8034747bc466f16007751e580 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Tue, 24 Oct 2023 19:01:54 +0200 Subject: [PATCH 09/54] corrected manual thr/acc alt with no depApt --- Models/Instruments/MCDU/MCDU.nas | 31 +++++++++++++++++++++++++------ Nasal/MCDU/PERFTO.nas | 9 ++------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 0cf59272..d328a937 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -4408,12 +4408,31 @@ var canvas_MCDU_base = { me["Simple_C5"].setFontSize(normal); me["Simple_C5"].setText(sprintf("/%4.0f ", accelAltFt.getValue())); } else { - me["Simple_L5"].setColor(WHITE); - me["Simple_L5"].setFontSize(small); - me["Simple_L5"].setText("-----"); - me["Simple_C5"].setColor(WHITE); - me["Simple_C5"].setFontSize(small); - me["Simple_C5"].setText(sprintf("/----- ", accelAltFt.getValue())); + if (thrRedSetManual.getBoolValue()){ + me["Simple_L5"].setFontSize(normal); + me["Simple_L5"].setText(sprintf("%4.0f", clbReducFt.getValue())); + if (accSetManual.getBoolValue()) { + me["Simple_C5"].setFontSize(normal); + me["Simple_C5"].setText(sprintf("/%4.0f ", accelAltFt.getValue())); + } else { + me["Simple_C5"].setColor(WHITE); + me["Simple_C5"].setFontSize(small); + me["Simple_C5"].setText(sprintf("/----- ", accelAltFt.getValue())); + } + } else { + me["Simple_L5"].setColor(WHITE); + me["Simple_L5"].setFontSize(small); + me["Simple_L5"].setText("-----"); + if (accSetManual.getBoolValue()) { + me["Simple_C5"].setColor(BLUE); + me["Simple_C5"].setFontSize(normal); + me["Simple_C5"].setText(sprintf("/%4.0f ", accelAltFt.getValue())); + } else { + me["Simple_C5"].setColor(WHITE); + me["Simple_C5"].setFontSize(small); + me["Simple_C5"].setText(sprintf("/----- ", accelAltFt.getValue())); + } + } } } else { if (thrRedSetManual.getBoolValue()){ diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index cf00e09d..200ce145 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -188,25 +188,20 @@ var perfTOInput = func(key, i) { #TODO - manual check - four digit alwway 0000 - default = runaway_elevation + 800 ft, min values runaway_elevation+400ft if (int(thrred) != nil and (thrreds >= 3 and thrreds <= 5) and thrred >= minThrRed and thrred <= 39000 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= minAccelAlt and acc <= 39000) { - - # if (thrred<=acc) { # validation setprop("/fdm/jsbsim/fadec/clbreduc-ft", int(thrred / 10) * 10); setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); setprop("MCDUC/thracc-set", 1); setprop("MCDUC/acc-set-manual", 1); setprop("MCDUC/thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); - #} else { - # mcdu_message(i, "NOT ALLOWED"); - #} - } else if (thrreds == 0 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= minAccelAlt and acc <= 39000 and fmgc.FMGCInternal.depAptElev > 0) { + } else if (thrreds == 0 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= minAccelAlt and acc <= 39000) { setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); setprop("MCDUC/acc-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "FORMAT ERROR"); } - } else if (num(scratchpad) != nil and (tfs >= 3 and tfs <= 5) and scratchpad >= minThrRed and scratchpad <= 39000 and fmgc.FMGCInternal.depAptElev > 0) { + } else if (num(scratchpad) != nil and (tfs >= 3 and tfs <= 5) and scratchpad >= minThrRed and scratchpad <= 39000) { setprop("/fdm/jsbsim/fadec/clbreduc-ft", int(scratchpad / 10) * 10); setprop("MCDUC/thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); From 5a76df6aeb692c271753ae46541e074664297c63 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 30 Oct 2023 14:57:57 +0100 Subject: [PATCH 10/54] introducing ga-accel and ga-thrRed variables --- Models/Instruments/MCDU/MCDU.nas | 10 +++++++--- Models/Liveries/PW-NEO/DLH.xml | 2 ++ Nasal/FMGC/FCU.nas | 2 ++ Nasal/FMGC/FMGC.nas | 6 ++++++ Nasal/MCDU/INITA.nas | 34 +++++++++++++++++++++++++------- Nasal/MCDU/MCDU.nas | 9 ++++++++- Nasal/MCDU/PERFGA.nas | 6 ++++-- Nasal/MCDU/PERFTO.nas | 6 ++++-- 8 files changed, 60 insertions(+), 15 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index d328a937..e8b85849 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -90,7 +90,7 @@ var state2 = props.globals.getNode("/engines/engine[1]/state", 1); var altitude = props.globals.getNode("/instrumentation/altimeter/indicated-altitude-ft", 1); # TO PERF var clbReducFt = props.globals.getNode("/fdm/jsbsim/fadec/clbreduc-ft", 1); -var accelAltFt = props.globals.getNode("/FMGC/internal/accel-agl-ft", 1); # It's not AGL anymore +var accelAltFt = props.globals.getNode("/FMGC/internal/accel-agl-ft", 1); var thrAccSet = props.globals.getNode("/MCDUC/thracc-set", 1); var accSetManual = props.globals.getNode("/MCDUC/acc-set-manual", 1); var thrRedSetManual = props.globals.getNode("/MCDUC/thrRed-set-manual", 1); @@ -111,6 +111,10 @@ var final = props.globals.getNode("/FMGC/internal/final", 1); var radio = props.globals.getNode("/FMGC/internal/radio", 1); var baro = props.globals.getNode("/FMGC/internal/baro", 1); # GA PERF +var ga_clbReducFt = props.globals.getNode("/fdm/jsbsim/fadec/ga-clbreduc-ft", 1); # differs from TO clbRedcFt +var ga_accelAltFt = props.globals.getNode("/FMGC/internal/ga-accel-agl-ft", 1); # differs from TO accelAltFt +var ga_accSetManual = props.globals.getNode("/MCDUC/ga-acc-set-manual", 1); +var ga_thrRedSetManual = props.globals.getNode("/MCDUC/ga-thrRed-set-manual", 1); # AOC - SENSORS var gear0_wow = props.globals.getNode("/gear/gear[0]/wow", 1); var doorL1_pos = props.globals.getNode("/sim/model/door-positions/doorl1/position-norm", 1); #FWD door @@ -5129,7 +5133,7 @@ var canvas_MCDU_base = { me["Simple_Title"].setColor(WHITE); } - if (thrAccSet.getValue() == 1) { + if (ga_thrRedSetManual.getValue() == 1) { me["Simple_L5"].setFontSize(normal); } else { me["Simple_L5"].setFontSize(small); @@ -5140,7 +5144,7 @@ var canvas_MCDU_base = { me["Simple_R5"].setFontSize(small); } - me["Simple_L5"].setText(sprintf("%3.0f", clbReducFt.getValue()) ~ sprintf("/%3.0f", accelAltFt.getValue())); + me["Simple_L5"].setText(sprintf("%3.0f", ga_clbReducFt.getValue()) ~ sprintf("/%3.0f", ga_accelAltFt.getValue())); me["Simple_L6"].setText(" PHASE"); me["Simple_L5S"].setText("THR RED/ACC"); me["Simple_L6S"].setText(" PREV"); diff --git a/Models/Liveries/PW-NEO/DLH.xml b/Models/Liveries/PW-NEO/DLH.xml index fde2a643..c456a13d 100644 --- a/Models/Liveries/PW-NEO/DLH.xml +++ b/Models/Liveries/PW-NEO/DLH.xml @@ -21,6 +21,8 @@ +0.0 1000 1000 + 1000 + 1000 D-AINK diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 537c9212..546bf9a6 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -288,6 +288,8 @@ var FCUController = { fmgc.Input.kts.setValue(me.iasTemp); } } + } else { + # speed preselection on FCU as speed is managed } } }, diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 1f918a17..2b3819c6 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -146,6 +146,12 @@ var FMGCInternal = { ldgConfig3: 0, ldgConfigFull: 0, + # PERF GA + gaAccelAlt: 0, + gaAccelAltSet: 0, + gaThrRedAlt: 0, + gaThrRedAltSet: 0, + # INIT A altAirport: "", altAirportSet: 0, diff --git a/Nasal/MCDU/INITA.nas b/Nasal/MCDU/INITA.nas index e6402171..1fe0e852 100644 --- a/Nasal/MCDU/INITA.nas +++ b/Nasal/MCDU/INITA.nas @@ -8,6 +8,7 @@ var resetFlightplan = func(i) { fmgc.FMGCInternal.arrApt = ""; fmgc.FMGCInternal.toFromSet = 0; fmgc.FMGCInternal.depAptElev = 0; + fmgc.FMGCInternal.destAptElev = 0; fmgc.FMGCNodes.toFromSet.setValue(0); fmgc.windController.resetDesWinds(); @@ -20,6 +21,11 @@ var resetFlightplan = func(i) { setprop("MCDUC/acc-set-manual", 0); setprop("MCDUC/thrRed-set-manual", 0); + setprop("/FMGC/internal/ga-accel-agl-ft", 1500); + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", 1500); + setprop("MCDUC/ga-acc-set-manual", 0); + setprop("MCDUC/ga-thrRed-set-manual", 0); + setprop("/FMGC/internal/align-ref-lat", 0); setprop("/FMGC/internal/align-ref-long", 0); setprop("/FMGC/internal/align-ref-lat-edit", 0); @@ -276,24 +282,38 @@ var initInputA = func(key, i) { fmgc.FMGCNodes.toFromSet.setValue(1); mcdu_scratchpad.scratchpads[i].empty(); fmgc.FMGCInternal.depAptElev = math.round(airportinfo(fromto[0]).elevation * M2FT, 10); - - if (getprop("/options/company-options/default-accel-agl")) { - fmgc.FMGCInternal.AccelAlt = getprop("/options/company-options/default-accel-agl") + fmgc.FMGCInternal.depAptElev; - } else { - fmgc.FMGCInternal.AccelAlt = 400 + fmgc.FMGCInternal.depAptElev; # todo: minimum accel agl if no company option - } + fmgc.FMGCInternal.destAptElev = math.round(airportinfo(fromto[1]).elevation * M2FT, 10); if (getprop("/options/company-options/default-thrRed-agl")) { fmgc.FMGCInternal.thrRedAlt = getprop("/options/company-options/default-thrRed-agl") + fmgc.FMGCInternal.depAptElev; + fmgc.FMGCInternal.gaThrRedAlt = getprop("/options/company-options/default-ga-thrRed-agl") + fmgc.FMGCInternal.destAptElev; } else { fmgc.FMGCInternal.thrRedAlt = 400 + fmgc.FMGCInternal.depAptElev; # todo: minimum thrRed agl if no company option + fmgc.FMGCInternal.gaThrRedAlt = 1500 + fmgc.FMGCInternal.destAptElev; # as per FCOM 12-22_20-50-10-MCDU - Page Description - FMS2 Thales - PERF Page } - setprop("/FMGC/internal/accel-agl-ft", fmgc.FMGCInternal.AccelAlt); + + if (getprop("/options/company-options/default-accel-agl")) { + fmgc.FMGCInternal.accelAlt = getprop("/options/company-options/default-accel-agl") + fmgc.FMGCInternal.depAptElev; + fmgc.FMGCInternal.gaAccelAlt = getprop("/options/company-options/default-ga-accel-agl") + fmgc.FMGCInternal.destAptElev; + if (fmgc.FMGCInternal.gaAccelAlt < fmgc.FMGCInternal.gaThrRedAlt){ + fmgc.FMGCInternal.gaThrRedAlt = fmgc.FMGCInternal.gaAccelAlt; + } + } else { + fmgc.FMGCInternal.accelAlt = 400 + fmgc.FMGCInternal.depAptElev; # todo: minimum accel agl if no company option + fmgc.FMGCInternal.gaAccelAlt = 1500 + fmgc.FMGCInternal.destAptElev; # as per FCOM 12-22_20-50-10-MCDU - Page Description - FMS2 Thales - PERF Page + } + + setprop("/FMGC/internal/accel-agl-ft", fmgc.FMGCInternal.accelAlt); setprop("/fdm/jsbsim/fadec/clbreduc-ft", fmgc.FMGCInternal.thrRedAlt); setprop("MCDUC/thracc-set", 0); setprop("MCDUC/acc-set-manual", 0); setprop("MCDUC/thrRed-set-manual", 0); + setprop("/FMGC/internal/ga-accel-agl-ft", fmgc.FMGCInternal.gaAccelAlt); + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", fmgc.FMGCInternal.gaThrRedAlt); + setprop("MCDUC/ga-acc-set-manual", 0); + setprop("MCDUC/ga-thrRed-set-manual", 0); + fmgc.flightPlanController.updateAirports(fromto[0], fromto[1], 2); fmgc.FMGCInternal.altSelected = 0; fmgc.updateARPT(); diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 54f8f6b0..39cb5eae 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -154,7 +154,10 @@ var MCDU_reset = func(i) { fmgc.FMGCInternal.v2 = 0; fmgc.FMGCInternal.v2set = 0; setprop("/FMGC/internal/accel-agl-ft", 1500); #eventually set to 1500 above runway - setprop("/MCDUC/thracc-set", 0); + setprop("/fdm/jsbsim/fadec/clbreduc-ft", 1500); + setprop("MCDUC/thracc-set", 0); + setprop("MCDUC/acc-set-manual", 0); + setprop("MCDUC/thrRed-set-manual", 0); fmgc.FMGCInternal.toFlap = 0; fmgc.FMGCInternal.toThs = 0.0; fmgc.FMGCInternal.toFlapThsSet = 0; @@ -190,6 +193,10 @@ var MCDU_reset = func(i) { fmgc.FMGCInternal.ldgConfigFull = 1; # GA PERF + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", 1500); + setprop("/FMGC/internal/ga-accel-agl-ft", 1500); + setprop("MCDUC/ga-acc-set-manual", 0); + setprop("MCDUC/ga-thracc-set", 0); } var setMode = func(will) { diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas index fc74d6f7..0ab3f156 100644 --- a/Nasal/MCDU/PERFGA.nas +++ b/Nasal/MCDU/PERFGA.nas @@ -9,6 +9,8 @@ var perfGAInput = func(key, i) { setprop("/fdm/jsbsim/fadec/clbreduc-ft", 1500); setprop("/FMGC/internal/accel-agl-ft", 1500); setprop("MCDUC/thracc-set", 0); + setprop("MCDUC/ga-acc-set-manual", 0); + setprop("MCDUC/ga-thracc-set", 0); mcdu_scratchpad.scratchpads[i].empty(); } else { var tfs = size(scratchpad); @@ -17,8 +19,8 @@ var perfGAInput = func(key, i) { var thrred = size(thracc[0]); var acc = size(thracc[1]); if (int(thrred) != nil and int(acc) != nil and (thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) { - setprop("/fdm/jsbsim/fadec/clbreduc-ft", thracc[0]); - setprop("/FMGC/internal/accel-agl-ft", thracc[1]); + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", thracc[0]); + setprop("/FMGC/internal/ga-accel-agl-ft", thracc[1]); setprop("MCDUC/thracc-set", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index 200ce145..8163e035 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -153,13 +153,15 @@ var perfTOInput = func(key, i) { if (getprop("/options/company-options/default-accel-agl")) { fmgc.FMGCInternal.AccelAlt = getprop("/options/company-options/default-accel-agl") + fmgc.FMGCInternal.depAptElev; } else { - fmgc.FMGCInternal.AccelAlt = 400 + fmgc.FMGCInternal.depAptElev; # todo: minimum accel agl if no company option + # to check: minimum value if no company option is 400 ft above dep aerodrome + fmgc.FMGCInternal.AccelAlt = 400 + fmgc.FMGCInternal.depAptElev; } if (getprop("/options/company-options/default-thrRed-agl")) { fmgc.FMGCInternal.thrRedAlt = getprop("/options/company-options/default-thrRed-agl") + fmgc.FMGCInternal.depAptElev; } else { - fmgc.FMGCInternal.thrRedAlt = 400 + fmgc.FMGCInternal.depAptElev; # todo: minimum thrRed agl if no company option + # to check: minimum value if no company option is 400 ft above dep aerodrome + fmgc.FMGCInternal.thrRedAlt = 400 + fmgc.FMGCInternal.depAptElev; } } else { fmgc.FMGCInternal.AccelAlt = 1500; # todo: default accel if no depApt / probably doesn't exist? From 1e0a23cfce40d59332f31ace6829ff95434fd0ae Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Tue, 31 Oct 2023 00:35:24 +0100 Subject: [PATCH 11/54] print accel/thrred accordingly --- Models/Instruments/MCDU/MCDU.nas | 20 ++++++++++++++++---- Nasal/FMGC/FMGC.nas | 1 + 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index e8b85849..12da9f5b 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -5113,7 +5113,8 @@ var canvas_MCDU_base = { me.fontSizeLeft(normal, normal, normal, normal, 0, normal); me.fontSizeRight(normal, small, 0, 0, 0, normal); - me.fontSizeCenter(small, small, small, 0, 0, 0); + me.fontSizeCenter(small, small, small, 0, small, 0); + me.fontSizeCenterS(small, small, small, 0, small, 0); me.colorLeft("blu", "blu", "blu", "blu", "blu", "wht"); me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht"); @@ -5121,8 +5122,8 @@ var canvas_MCDU_base = { me.colorRight("wht", "blu", "blu", "blu", "blu", "wht"); me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht"); me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht"); - me.colorCenter("grn", "grn", "grn", "wht", "wht", "wht"); - me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht"); + me.colorCenter("grn", "grn", "grn", "wht", "blu", "wht"); + me.colorCenterS("wht", "wht", "wht", "wht", "blu", "wht"); pageSwitch[i].setBoolValue(1); } @@ -5144,7 +5145,18 @@ var canvas_MCDU_base = { me["Simple_R5"].setFontSize(small); } - me["Simple_L5"].setText(sprintf("%3.0f", ga_clbReducFt.getValue()) ~ sprintf("/%3.0f", ga_accelAltFt.getValue())); + if(fmgc.FMGCInternal.arrApt == nil){ + me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); + if (ga_accSetManual.getBoolValue()) { + me["Simple_C5"].setFontSize(normal); + me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); + } else { + me["Simple_C5"].setFontSize(small); + me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); + } + me["Simple_C5"].show(); + } + me["Simple_L6"].setText(" PHASE"); me["Simple_L5S"].setText("THR RED/ACC"); me["Simple_L6S"].setText(" PREV"); diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 2b3819c6..5716247f 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -157,6 +157,7 @@ var FMGCInternal = { altAirportSet: 0, altSelected: 0, arrApt: "", + destAptElev: 0, coRoute: "", coRouteSet: 0, costIndex: 0, From 8636dcadce34b016dc76020bca1ba4211109bd65 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Wed, 1 Nov 2023 18:54:41 +0100 Subject: [PATCH 12/54] ga accel/trhRed vars working- MCDU not correct --- Models/Instruments/MCDU/MCDU.nas | 28 +++++++++++++++++----------- Models/Liveries/PW-NEO/DLH.xml | 4 ++-- Nasal/FMGC/FMGC.nas | 13 ++++++++++++- Nasal/MCDU/MCDU.nas | 2 +- Nasal/MCDU/PERFGA.nas | 25 ++++++++++++++++++++----- Nasal/MCDU/PERFTO.nas | 11 +++-------- 6 files changed, 55 insertions(+), 28 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 12da9f5b..7fa29057 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -4421,7 +4421,7 @@ var canvas_MCDU_base = { } else { me["Simple_C5"].setColor(WHITE); me["Simple_C5"].setFontSize(small); - me["Simple_C5"].setText(sprintf("/----- ", accelAltFt.getValue())); + me["Simple_C5"].setText(sprintf("/----- ")); } } else { me["Simple_L5"].setColor(WHITE); @@ -4434,7 +4434,7 @@ var canvas_MCDU_base = { } else { me["Simple_C5"].setColor(WHITE); me["Simple_C5"].setFontSize(small); - me["Simple_C5"].setText(sprintf("/----- ", accelAltFt.getValue())); + me["Simple_C5"].setText(sprintf("/----- ")); } } } @@ -5106,7 +5106,7 @@ var canvas_MCDU_base = { showRight(me,-1, -1, -1, -1, 1, -1); showRightS(me,-1, -1, -1, -1, 1, -1); showRightArrow(me,-1, -1, -1, -1, -1, -1); - showCenter(me,1, 1, 1, -1, -1, -1); + showCenter(me,1, 1, 1, -1, 1, -1); me["Simple_C3B"].hide(); me["Simple_C4B"].hide(); showCenterS(me,1, 1, 1, -1, -1, -1); @@ -5133,19 +5133,26 @@ var canvas_MCDU_base = { } else { me["Simple_Title"].setColor(WHITE); } - - if (ga_thrRedSetManual.getValue() == 1) { - me["Simple_L5"].setFontSize(normal); - } else { - me["Simple_L5"].setFontSize(small); - } + if (engOutAccSet.getValue() == 1) { me["Simple_R5"].setFontSize(normal); } else { me["Simple_R5"].setFontSize(small); } - if(fmgc.FMGCInternal.arrApt == nil){ + if(fmgc.FMGCInternal.arrApt == ""){ + if (ga_thrRedSetManual.getBoolValue()) { + #me["Simple_L5"].setFontSize(normal); + me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); + } else { + me["Simple_L5"].setText("-----"); +# if (ga_accSetManual.getBoolValue()) { + me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); +# } else { +# me["Simple_C5"].setText(sprintf("/----- ")); +# } + } + } else { me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); if (ga_accSetManual.getBoolValue()) { me["Simple_C5"].setFontSize(normal); @@ -5154,7 +5161,6 @@ var canvas_MCDU_base = { me["Simple_C5"].setFontSize(small); me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); } - me["Simple_C5"].show(); } me["Simple_L6"].setText(" PHASE"); diff --git a/Models/Liveries/PW-NEO/DLH.xml b/Models/Liveries/PW-NEO/DLH.xml index c456a13d..f5d8c682 100644 --- a/Models/Liveries/PW-NEO/DLH.xml +++ b/Models/Liveries/PW-NEO/DLH.xml @@ -21,8 +21,8 @@ +0.0 1000 1000 - 1000 - 1000 + 1500 + 1500 D-AINK diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 5716247f..c6bf0d3a 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -15,7 +15,6 @@ var gs = 0; var state1 = 0; var state2 = 0; var accel_agl_ft = 0; -var accelAltValid = 0; # barrier to say it is not initialized var fd1 = 0; var fd2 = 0; var spd = 0; @@ -35,6 +34,18 @@ var windHdg = 0; var windSpeed = 0; var windsDidChange = 0; var tempOverspeed = nil; +var pinOptionGaAccelAlt = 1500; +if (getprop("/options/company-options/default-ga-accel-agl") != nil) { + pinOptionGaAccelAlt = getprop("/options/company-options/default-ga-accel-agl"); +} +var pinOptionGaThrRedAlt = 400; +if (getprop("/options/company-options/default-ga-thrRed-agl") != nil) { + pinOptionGaThrRedAlt = getprop("/options/company-options/default-ga-thrRed-agl"); +} +# min Value for ThrRed and AccelAlt are the company pin option defaults +var minAccelAlt = getprop("/options/company-options/default-accel-agl"); +var minThrRed = getprop("/options/company-options/default-thrRed-agl"); + setprop("/position/gear-agl-ft", 0); # 1500 ft is a default value not shown anywhere. It may not exist. diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 39cb5eae..0638b9a7 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -196,7 +196,7 @@ var MCDU_reset = func(i) { setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", 1500); setprop("/FMGC/internal/ga-accel-agl-ft", 1500); setprop("MCDUC/ga-acc-set-manual", 0); - setprop("MCDUC/ga-thracc-set", 0); + setprop("MCDUC/ga-thrRed-set-manual", 0); } var setMode = func(will) { diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas index 0ab3f156..9dea391f 100644 --- a/Nasal/MCDU/PERFGA.nas +++ b/Nasal/MCDU/PERFGA.nas @@ -6,12 +6,21 @@ var perfGAInput = func(key, i) { var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad; if (key == "L5") { if (scratchpad == "CLR") { - setprop("/fdm/jsbsim/fadec/clbreduc-ft", 1500); - setprop("/FMGC/internal/accel-agl-ft", 1500); - setprop("MCDUC/thracc-set", 0); + if (fmgc.FMGCInternal.arrApt != "") { + fmgc.FMGCInternal.gaThrRedAlt = fmgc.pinOptionGaThrRedAlt + fmgc.FMGCInternal.destAptElev; + fmgc.FMGCInternal.gaAccelAlt = fmgc.pinOptionGaAccelAlt + fmgc.FMGCInternal.destAptElev; + } else { + fmgc.FMGCInternal.gathrRedAlt = fmgc.pinOptionGaThrRedAlt; + fmgc.FMGCInternal.gaAccelAlt = fmgc.pinOptionGaAccelAlt; + } + + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", fmgc.FMGCInternal.gaThrRedAlt); + setprop("/FMGC/internal/ga-accel-agl-ft", fmgc.FMGCInternal.gaAccelAlt); setprop("MCDUC/ga-acc-set-manual", 0); - setprop("MCDUC/ga-thracc-set", 0); + setprop("MCDUC/ga-thrRed-set-manual", 0); + mcdu_scratchpad.scratchpads[i].empty(); + } else { var tfs = size(scratchpad); if (tfs >= 7 and tfs <= 9 and find("/", scratchpad) != -1) { @@ -21,7 +30,13 @@ var perfGAInput = func(key, i) { if (int(thrred) != nil and int(acc) != nil and (thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) { setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", thracc[0]); setprop("/FMGC/internal/ga-accel-agl-ft", thracc[1]); - setprop("MCDUC/thracc-set", 1); +# setprop("MCDUC/thracc-set", 1); + setprop("MCDUC/ga-acc-set-manual", 1); + setprop("MCDUC/ga-thrRed-set-manual", 1); + mcdu_scratchpad.scratchpads[i].empty(); + } else if (int(thrred) == nil and int(acc) != nil and (acc >= 3 and acc <= 5) and acc >= fmgc.minAccelAlt and acc <= 39000) { + setprop("/FMGC/internal/ga-accel-agl-ft", int(acc / 10) * 10); + setprop("MCDUC/ga-acc-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "NOT ALLOWED"); diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index 8163e035..88c29ddf 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -176,11 +176,6 @@ var perfTOInput = func(key, i) { mcdu_scratchpad.scratchpads[i].empty(); } else { var tfs = size(scratchpad); - - # min Value for ThrRed and AccelAlt are the company defaults - var minAccelAlt = getprop("/options/company-options/default-accel-agl"); - var minThrRed = getprop("/options/company-options/default-thrRed-agl"); - if (find("/", scratchpad) != -1) { var thracc = split("/", scratchpad); var thrred = thracc[0]; @@ -189,21 +184,21 @@ var perfTOInput = func(key, i) { var accs = size(acc); #TODO - manual check - four digit alwway 0000 - default = runaway_elevation + 800 ft, min values runaway_elevation+400ft - if (int(thrred) != nil and (thrreds >= 3 and thrreds <= 5) and thrred >= minThrRed and thrred <= 39000 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= minAccelAlt and acc <= 39000) { + if (int(thrred) != nil and (thrreds >= 3 and thrreds <= 5) and thrred >= minThrRed and thrred <= 39000 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= fmgc.minAccelAlt and acc <= 39000) { setprop("/fdm/jsbsim/fadec/clbreduc-ft", int(thrred / 10) * 10); setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); setprop("MCDUC/thracc-set", 1); setprop("MCDUC/acc-set-manual", 1); setprop("MCDUC/thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); - } else if (thrreds == 0 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= minAccelAlt and acc <= 39000) { + } else if (thrreds == 0 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= fmgc.minAccelAlt and acc <= 39000) { setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); setprop("MCDUC/acc-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "FORMAT ERROR"); } - } else if (num(scratchpad) != nil and (tfs >= 3 and tfs <= 5) and scratchpad >= minThrRed and scratchpad <= 39000) { + } else if (num(scratchpad) != nil and (tfs >= 3 and tfs <= 5) and scratchpad >= fmgc.minThrRed and scratchpad <= 39000) { setprop("/fdm/jsbsim/fadec/clbreduc-ft", int(scratchpad / 10) * 10); setprop("MCDUC/thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); From 6f8f9996b0153aa1f1badf772af8e539c78bc0e5 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Thu, 2 Nov 2023 13:40:40 +0100 Subject: [PATCH 13/54] trying to change fonrt size in perfga --- Models/Instruments/MCDU/MCDU.nas | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 7fa29057..d54ce2a3 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -5111,7 +5111,7 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); showCenterS(me,1, 1, 1, -1, -1, -1); - me.fontSizeLeft(normal, normal, normal, normal, 0, normal); + me.fontSizeLeft(normal, normal, normal, normal, small, normal); me.fontSizeRight(normal, small, 0, 0, 0, normal); me.fontSizeCenter(small, small, small, 0, small, 0); me.fontSizeCenterS(small, small, small, 0, small, 0); @@ -5140,29 +5140,24 @@ var canvas_MCDU_base = { me["Simple_R5"].setFontSize(small); } + print("ga-acc : " ~ ga_accSetManual.getBoolValue() ~ "," ~ ga_accelAltFt.getValue() ~ + ", ga-thrRed " ~ ga_thrRedSetManual.getBoolValue() ~ "," ~ ga_clbReducFt.getValue()); + if(fmgc.FMGCInternal.arrApt == ""){ - if (ga_thrRedSetManual.getBoolValue()) { - #me["Simple_L5"].setFontSize(normal); + if(ga_accSetManual.getBoolValue()) + { me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); + me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); } else { me["Simple_L5"].setText("-----"); -# if (ga_accSetManual.getBoolValue()) { - me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); -# } else { -# me["Simple_C5"].setText(sprintf("/----- ")); -# } + me["Simple_C5"].setText(sprintf("/----- ")); } } else { me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); - if (ga_accSetManual.getBoolValue()) { - me["Simple_C5"].setFontSize(normal); - me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); - } else { - me["Simple_C5"].setFontSize(small); - me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); - } + me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); } + me["Simple_L6"].setText(" PHASE"); me["Simple_L5S"].setText("THR RED/ACC"); me["Simple_L6S"].setText(" PREV"); From 9e3f5c72d837e2fa2ca7f773ccc083ce2cc7bf18 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Thu, 2 Nov 2023 13:49:16 +0100 Subject: [PATCH 14/54] cannot change fontsize prfga page --- Models/Instruments/MCDU/MCDU.nas | 3 --- 1 file changed, 3 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index d54ce2a3..9ca217f4 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -5140,9 +5140,6 @@ var canvas_MCDU_base = { me["Simple_R5"].setFontSize(small); } - print("ga-acc : " ~ ga_accSetManual.getBoolValue() ~ "," ~ ga_accelAltFt.getValue() ~ - ", ga-thrRed " ~ ga_thrRedSetManual.getBoolValue() ~ "," ~ ga_clbReducFt.getValue()); - if(fmgc.FMGCInternal.arrApt == ""){ if(ga_accSetManual.getBoolValue()) { From 6297d2ef0fa11789a2ad661dfdac7a4d59b966c9 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Thu, 2 Nov 2023 17:49:37 +0100 Subject: [PATCH 15/54] input in perfga almost working --- Nasal/FMGC/FMGC.nas | 2 +- Nasal/MCDU/PERFGA.nas | 30 ++++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index c6bf0d3a..47103c0b 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -46,8 +46,8 @@ if (getprop("/options/company-options/default-ga-thrRed-agl") != nil) { var minAccelAlt = getprop("/options/company-options/default-accel-agl"); var minThrRed = getprop("/options/company-options/default-thrRed-agl"); - setprop("/position/gear-agl-ft", 0); + # 1500 ft is a default value not shown anywhere. It may not exist. # In case it does not exist, a takeoff with no departure airport and no accel set would never go from TO PHASE to CLB PHASE # unless manually set. diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas index 9dea391f..c4eef4df 100644 --- a/Nasal/MCDU/PERFGA.nas +++ b/Nasal/MCDU/PERFGA.nas @@ -23,10 +23,12 @@ var perfGAInput = func(key, i) { } else { var tfs = size(scratchpad); - if (tfs >= 7 and tfs <= 9 and find("/", scratchpad) != -1) { + print("Scr:" ~ scratchpad); + if (find("/", scratchpad) != -1) { var thracc = split("/", scratchpad); var thrred = size(thracc[0]); var acc = size(thracc[1]); + print("red " ~ thracc[0] ~ "," ~ thrred ~ " acc " ~ thracc[1] ~ "," ~ acc ~ " tfs " ~ tfs); if (int(thrred) != nil and int(acc) != nil and (thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) { setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", thracc[0]); setprop("/FMGC/internal/ga-accel-agl-ft", thracc[1]); @@ -34,13 +36,29 @@ var perfGAInput = func(key, i) { setprop("MCDUC/ga-acc-set-manual", 1); setprop("MCDUC/ga-thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); - } else if (int(thrred) == nil and int(acc) != nil and (acc >= 3 and acc <= 5) and acc >= fmgc.minAccelAlt and acc <= 39000) { - setprop("/FMGC/internal/ga-accel-agl-ft", int(acc / 10) * 10); - setprop("MCDUC/ga-acc-set-manual", 1); - mcdu_scratchpad.scratchpads[i].empty(); } else { - mcdu_message(i, "NOT ALLOWED"); + if (int(thrred) == 0 and int(acc) != nil + and (acc >= 3 and acc <= 5) + and thracc[1] >= 1500 and thracc[1] <= 39000) { + setprop("/FMGC/internal/ga-accel-agl-ft", int(thracc[1] / 10) * 10); + setprop("MCDUC/ga-acc-set-manual", 1); + mcdu_scratchpad.scratchpads[i].empty(); + } + if (int(thrred) != nil and int(acc) == nil + and thracc[0] >= 400 and thracc[0] <= 39000 + and (thrred >= 3 and thrred <= 5)) { + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", int(thracc[0] / 10) * 10); + setprop("MCDUC/ga-thrRed-set-manual", 1); + mcdu_scratchpad.scratchpads[i].empty(); + } else { + mcdu_message(i, "NOT ALLOWED"); + } } + } else if ((num(scratchpad) != nil) and (tfs >= 3 and tfs <= 5) + and (scratchpad >= 400) and (scratchpad <= 39000)) { + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", int(scratchpad / 10) * 10); + setprop("MCDUC/ga-thrRed-set-manual", 1); + mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "NOT ALLOWED"); } From d1fd0f07e1de8bdf0e068abc4940679b7edf0386 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Thu, 2 Nov 2023 21:23:24 +0100 Subject: [PATCH 16/54] check if acc > thrRed --- Nasal/MCDU/PERFGA.nas | 46 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas index c4eef4df..c9f8b6f6 100644 --- a/Nasal/MCDU/PERFGA.nas +++ b/Nasal/MCDU/PERFGA.nas @@ -10,7 +10,7 @@ var perfGAInput = func(key, i) { fmgc.FMGCInternal.gaThrRedAlt = fmgc.pinOptionGaThrRedAlt + fmgc.FMGCInternal.destAptElev; fmgc.FMGCInternal.gaAccelAlt = fmgc.pinOptionGaAccelAlt + fmgc.FMGCInternal.destAptElev; } else { - fmgc.FMGCInternal.gathrRedAlt = fmgc.pinOptionGaThrRedAlt; + fmgc.FMGCInternal.gaThrRedAlt = fmgc.pinOptionGaThrRedAlt; fmgc.FMGCInternal.gaAccelAlt = fmgc.pinOptionGaAccelAlt; } @@ -23,40 +23,38 @@ var perfGAInput = func(key, i) { } else { var tfs = size(scratchpad); - print("Scr:" ~ scratchpad); if (find("/", scratchpad) != -1) { var thracc = split("/", scratchpad); var thrred = size(thracc[0]); var acc = size(thracc[1]); - print("red " ~ thracc[0] ~ "," ~ thrred ~ " acc " ~ thracc[1] ~ "," ~ acc ~ " tfs " ~ tfs); - if (int(thrred) != nil and int(acc) != nil and (thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) { + if (thracc[0] > thracc[1]) { + thracc[1] = thracc[0]; # accel is always greater or eqal thrust reduction + } + if (int(thrred) != nil and int(acc) != nil + and (thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5) + and thracc[0] >= 400 and thracc[0] <= 39000 and thracc[1] >= 1500 and thracc[1] <= 39000) { setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", thracc[0]); setprop("/FMGC/internal/ga-accel-agl-ft", thracc[1]); -# setprop("MCDUC/thracc-set", 1); setprop("MCDUC/ga-acc-set-manual", 1); setprop("MCDUC/ga-thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); + } else if (int(thrred) == 0 and int(acc) != nil and (acc >= 3 and acc <= 5) and thracc[1] >= 1500 and thracc[1] <= 39000) { + setprop("/FMGC/internal/ga-accel-agl-ft", int(thracc[1] / 10) * 10); + setprop("MCDUC/ga-acc-set-manual", 1); + mcdu_scratchpad.scratchpads[i].empty(); + } else if (int(thrred) != nil and int(acc) == nil and thracc[0] >= 400 and thracc[0] <= 39000 and (thrred >= 3 and thrred <= 5)) { + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", int(thracc[0] / 10) * 10); + setprop("MCDUC/ga-thrRed-set-manual", 1); + mcdu_scratchpad.scratchpads[i].empty(); + } else { + mcdu_message(i, "NOT ALLOWED"); + } + } else if ((num(scratchpad) != nil) and (tfs >= 3 and tfs <= 5) and (scratchpad >= 400) and (scratchpad <= 39000)) { + if (scratchpad > getprop("/FMGC/internal/ga-accel-agl-ft")){ + setprop("/FMGC/internal/ga-accel-agl-ft", scratchpad); # set accel as high as thrRed } else { - if (int(thrred) == 0 and int(acc) != nil - and (acc >= 3 and acc <= 5) - and thracc[1] >= 1500 and thracc[1] <= 39000) { - setprop("/FMGC/internal/ga-accel-agl-ft", int(thracc[1] / 10) * 10); - setprop("MCDUC/ga-acc-set-manual", 1); - mcdu_scratchpad.scratchpads[i].empty(); - } - if (int(thrred) != nil and int(acc) == nil - and thracc[0] >= 400 and thracc[0] <= 39000 - and (thrred >= 3 and thrred <= 5)) { - setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", int(thracc[0] / 10) * 10); - setprop("MCDUC/ga-thrRed-set-manual", 1); - mcdu_scratchpad.scratchpads[i].empty(); - } else { - mcdu_message(i, "NOT ALLOWED"); - } + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", int(scratchpad / 10) * 10); } - } else if ((num(scratchpad) != nil) and (tfs >= 3 and tfs <= 5) - and (scratchpad >= 400) and (scratchpad <= 39000)) { - setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", int(scratchpad / 10) * 10); setprop("MCDUC/ga-thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { From ef04b86b0b3ab8ab310da7ae2f2360452dcbf1c0 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Thu, 2 Nov 2023 22:51:04 +0100 Subject: [PATCH 17/54] round error corrected in acc/thrRed --- Nasal/MCDU/PERFGA.nas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas index c9f8b6f6..6bd7422a 100644 --- a/Nasal/MCDU/PERFGA.nas +++ b/Nasal/MCDU/PERFGA.nas @@ -33,8 +33,8 @@ var perfGAInput = func(key, i) { if (int(thrred) != nil and int(acc) != nil and (thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5) and thracc[0] >= 400 and thracc[0] <= 39000 and thracc[1] >= 1500 and thracc[1] <= 39000) { - setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", thracc[0]); - setprop("/FMGC/internal/ga-accel-agl-ft", thracc[1]); + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", int(thracc[0] / 10) * 10); + setprop("/FMGC/internal/ga-accel-agl-ft", int(thracc[1] / 10) * 10); setprop("MCDUC/ga-acc-set-manual", 1); setprop("MCDUC/ga-thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); From 7dc9b68ca0e97a77ac73803fc90103163ac1c2b0 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Fri, 3 Nov 2023 09:45:56 +0100 Subject: [PATCH 18/54] Startpoint for GA Property insertion --- Models/Instruments/MCDU/MCDU.nas | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 9ca217f4..e9bc227c 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -5141,20 +5141,26 @@ var canvas_MCDU_base = { } if(fmgc.FMGCInternal.arrApt == ""){ - if(ga_accSetManual.getBoolValue()) - { + if(ga_thrRedSetManual.getBoolValue()) { + # should be in normal font me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); - me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); - } else { + + if(ga_accSetManual.getBoolValue()){ + # should be in normal font + me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); + + } else { + # should be in small font + me["Simple_C5"].setText(sprintf("/----- ")); + } + } else { me["Simple_L5"].setText("-----"); - me["Simple_C5"].setText(sprintf("/----- ")); } } else { me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); } - me["Simple_L6"].setText(" PHASE"); me["Simple_L5S"].setText("THR RED/ACC"); me["Simple_L6S"].setText(" PREV"); From 1e5ce330f2198ff037f673a27f12d2bdb7261836 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Fri, 3 Nov 2023 16:34:12 +0100 Subject: [PATCH 19/54] improved imput on perf-ga page --- A320-main.xml | 1 + Models/Instruments/MCDU/MCDU.nas | 17 +++++------ Nasal/MCDU/PERFGA.nas | 50 ++++++++++++++++++++------------ Nasal/Systems/fadec-common.nas | 1 + Systems/fmgc-drivers.xml | 45 ++++++++++++++++++++++++++++ 5 files changed, 86 insertions(+), 28 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 8dd13cf0..cedabf6c 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -711,6 +711,7 @@ 0 1500 + 1500 IDLE 0 diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index e9bc227c..43b567bb 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -5144,18 +5144,17 @@ var canvas_MCDU_base = { if(ga_thrRedSetManual.getBoolValue()) { # should be in normal font me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); - - if(ga_accSetManual.getBoolValue()){ - # should be in normal font - me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); - - } else { - # should be in small font - me["Simple_C5"].setText(sprintf("/----- ")); - } } else { me["Simple_L5"].setText("-----"); } + + if(ga_accSetManual.getBoolValue()){ + # should be in normal font + me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); + } else { + # should be in small font + me["Simple_C5"].setText(sprintf("/----- ")); + } } else { me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas index 6bd7422a..783c90e2 100644 --- a/Nasal/MCDU/PERFGA.nas +++ b/Nasal/MCDU/PERFGA.nas @@ -27,38 +27,50 @@ var perfGAInput = func(key, i) { var thracc = split("/", scratchpad); var thrred = size(thracc[0]); var acc = size(thracc[1]); - if (thracc[0] > thracc[1]) { - thracc[1] = thracc[0]; # accel is always greater or eqal thrust reduction + var tempThrRed = 0; + var tempAcc = 0; + if (thrred >= 3 and thrred <= 5) {tempThrRed = int(thracc[0]/ 10) * 10;} + if (acc >= 3 and acc <= 5) {tempAcc = int(thracc[1]/ 10) * 10;} + + if (thrred and acc and tempAcc < tempThrRed) { + tempAcc = tempThrRed; # accel is always greater or eqal thrust reduction } - if (int(thrred) != nil and int(acc) != nil - and (thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5) - and thracc[0] >= 400 and thracc[0] <= 39000 and thracc[1] >= 1500 and thracc[1] <= 39000) { - setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", int(thracc[0] / 10) * 10); - setprop("/FMGC/internal/ga-accel-agl-ft", int(thracc[1] / 10) * 10); + + if (tempThrRed >= 400 and tempThrRed <= 39000 and tempAcc >= 1500 and tempAcc <= 39000) { + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", tempThrRed); + setprop("/FMGC/internal/ga-accel-agl-ft", tempAcc); setprop("MCDUC/ga-acc-set-manual", 1); setprop("MCDUC/ga-thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); - } else if (int(thrred) == 0 and int(acc) != nil and (acc >= 3 and acc <= 5) and thracc[1] >= 1500 and thracc[1] <= 39000) { - setprop("/FMGC/internal/ga-accel-agl-ft", int(thracc[1] / 10) * 10); + } else if (tempAcc >= 1500 and tempAcc <= 39000) { + setprop("/FMGC/internal/ga-accel-agl-ft", tempAcc); setprop("MCDUC/ga-acc-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); - } else if (int(thrred) != nil and int(acc) == nil and thracc[0] >= 400 and thracc[0] <= 39000 and (thrred >= 3 and thrred <= 5)) { - setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", int(thracc[0] / 10) * 10); + } else if (tempThrRed >= 400 and tempThrRed <= 39000) { + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", tempThrRed); setprop("MCDUC/ga-thrRed-set-manual", 1); mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "NOT ALLOWED"); } - } else if ((num(scratchpad) != nil) and (tfs >= 3 and tfs <= 5) and (scratchpad >= 400) and (scratchpad <= 39000)) { - if (scratchpad > getprop("/FMGC/internal/ga-accel-agl-ft")){ - setprop("/FMGC/internal/ga-accel-agl-ft", scratchpad); # set accel as high as thrRed + } else { + if (tfs >= 3 and tfs <= 5){ + var tempImp = int(scratchpad / 10) * 10; + if (tempImp and (tempImp >= 400) and (tempImp <= 39000)) { + setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", tempImp); + setprop("MCDUC/ga-thrRed-set-manual", 1); + + if (tempImp > getprop("/FMGC/internal/ga-accel-agl-ft")){ # set accel as high as thrRed + setprop("/FMGC/internal/ga-accel-agl-ft", tempImp); + setprop("MCDUC/ga-acc-set-manual", 1); + } + mcdu_scratchpad.scratchpads[i].empty(); + } else { + mcdu_message(i, "NOT ALLOWED"); + } } else { - setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", int(scratchpad / 10) * 10); + mcdu_message(i, "NOT ALLOWED"); } - setprop("MCDUC/ga-thrRed-set-manual", 1); - mcdu_scratchpad.scratchpads[i].empty(); - } else { - mcdu_message(i, "NOT ALLOWED"); } } } else if (key == "L6") { diff --git a/Nasal/Systems/fadec-common.nas b/Nasal/Systems/fadec-common.nas index 0678d7aa..5a01aed7 100644 --- a/Nasal/Systems/fadec-common.nas +++ b/Nasal/Systems/fadec-common.nas @@ -11,6 +11,7 @@ var FADEC = { alphaFloor: props.globals.getNode("/fdm/jsbsim/fadec/alpha-floor"), alphaFloorSwitch: props.globals.getNode("/fdm/jsbsim/fadec/alpha-floor-switch"), clbReduc: props.globals.getNode("/fdm/jsbsim/fadec/clbreduc-ft"), + gaClbReduc: props.globals.getNode("/fdm/jsbsim/fadec/ga-clbreduc-ft"), detent: [props.globals.getNode("/fdm/jsbsim/fadec/control-1/detent", 1), props.globals.getNode("/fdm/jsbsim/fadec/control-2/detent", 1)], detentTemp: [0, 0], detentText: [props.globals.getNode("/fdm/jsbsim/fadec/control-1/detent-text"), props.globals.getNode("/fdm/jsbsim/fadec/control-2/detent-text")], diff --git a/Systems/fmgc-drivers.xml b/Systems/fmgc-drivers.xml index 62f58453..a8e02840 100644 --- a/Systems/fmgc-drivers.xml +++ b/Systems/fmgc-drivers.xml @@ -935,6 +935,51 @@ /it-autoflight/settings/accel-ft + + + GA Accel Altitude + gain + 1.0 + + + + + + /engines/engine[0]/state + 3 + + + + /engines/engine[1]/state + 3 + + + + + + + /engines/engine[0]/state + 3 + + + + /engines/engine[1]/state + 3 + + + + + + /FMGC/internal/ga-eng-out-reduc + + + + + /FMGC/internal/ga-accel-agl-ft + + + /it-autoflight/settings/ga-accel-ft + From f1f68ef05d3514998edfeaba2dc1e67ea7e151f3 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Fri, 3 Nov 2023 16:59:38 +0100 Subject: [PATCH 20/54] setting fonts --- Models/Instruments/MCDU/MCDU.nas | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 43b567bb..081b288e 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -5142,18 +5142,19 @@ var canvas_MCDU_base = { if(fmgc.FMGCInternal.arrApt == ""){ if(ga_thrRedSetManual.getBoolValue()) { - # should be in normal font + me["Simple_L5"].setFontSize(normal); me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); } else { + me["Simple_L5"].setFontSize(small); me["Simple_L5"].setText("-----"); } if(ga_accSetManual.getBoolValue()){ - # should be in normal font - me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); + me["Simple_C5"].setFontSize(normal); + me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); } else { # should be in small font - me["Simple_C5"].setText(sprintf("/----- ")); + me["Simple_C5"].setText(sprintf("/----- ")); } } else { me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); From e243487c4788798eff7ddbeb8a19d3dd828bd42b Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Fri, 3 Nov 2023 20:11:05 +0100 Subject: [PATCH 21/54] input on perf ga further improved --- Models/Instruments/MCDU/MCDU.nas | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 081b288e..3123f127 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -5111,10 +5111,10 @@ var canvas_MCDU_base = { me["Simple_C4B"].hide(); showCenterS(me,1, 1, 1, -1, -1, -1); - me.fontSizeLeft(normal, normal, normal, normal, small, normal); - me.fontSizeRight(normal, small, 0, 0, 0, normal); - me.fontSizeCenter(small, small, small, 0, small, 0); - me.fontSizeCenterS(small, small, small, 0, small, 0); + #me.fontSizeLeft(normal, normal, normal, normal, small, normal); + #me.fontSizeRight(normal, small, 0, 0, 0, normal); + #me.fontSizeCenter(small, small, small, 0, small, 0); + #me.fontSizeCenterS(small, small, small, 0, small, 0); me.colorLeft("blu", "blu", "blu", "blu", "blu", "wht"); me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht"); @@ -5151,13 +5151,15 @@ var canvas_MCDU_base = { if(ga_accSetManual.getBoolValue()){ me["Simple_C5"].setFontSize(normal); - me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); + me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); } else { - # should be in small font + me["Simple_C5"].setFontSize(small); me["Simple_C5"].setText(sprintf("/----- ")); } } else { + me["Simple_L5"].setFontSize(small); me["Simple_L5"].setText(sprintf("%4.0f", ga_clbReducFt.getValue())); + me["Simple_C5"].setFontSize(small); me["Simple_C5"].setText(sprintf("/%4.0f ", ga_accelAltFt.getValue())); } From e48242630fc0334d40c508386e58cb53388ca480 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Sat, 4 Nov 2023 19:25:51 +0100 Subject: [PATCH 22/54] fadec thrRed changed in ga by variables --- Nasal/FMGC/FMGC.nas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 47103c0b..5eda83be 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -667,6 +667,9 @@ var masterFMGC = maketimer(0.2, func { systems.PNEU.pressMode.setValue("TO"); } } elsif (FMGCInternal.phase == 2) { + # change FADEC thrReduction from T/O-thrRedAlt to G/A-thrRedAlt + systems.FADEC.clbReduc = systems.FADEC.gaClbReduc; + if ((Modes.PFD.FMA.pitchMode == "ALT CRZ" or Modes.PFD.FMA.pitchMode == "ALT CRZ*")) { newphase = 3; systems.PNEU.pressMode.setValue("CR"); @@ -694,7 +697,7 @@ var masterFMGC = maketimer(0.2, func { Input.toga.setValue(1); } } elsif (FMGCInternal.phase == 6) { - if (alt >= accel_agl_ft) { # todo when insert altn or new dest + if (alt >= getprop("/FMGC/internal/ga-accel-agl-ft")) { # todo when insert altn or new dest newphase = 2; } } From 3bb92d0ecc06f6ed1ec219b7657ab6d3cd9c9020 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 6 Nov 2023 15:56:26 +0100 Subject: [PATCH 23/54] minor errors corrected --- Models/Instruments/MCDU/MCDU.nas | 2 +- Nasal/MCDU/PERFGA.nas | 2 ++ Nasal/MCDU/PERFTO.nas | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 3123f127..dceb7cd0 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -4301,7 +4301,7 @@ var canvas_MCDU_base = { showCenter(me,1, 1, 1, -1, 1, -1); me["Simple_C3B"].hide(); me["Simple_C4B"].hide(); - showCenterS(me,1, 1, 1, -1, 1, -1); + showCenterS(me,1, 1, 1, -1, -1, -1); me.fontSizeLeft(normal, normal, normal, normal, 0, normal); me.fontSizeRight(normal, small, 0, 0, 0, normal); diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas index 783c90e2..d622c217 100644 --- a/Nasal/MCDU/PERFGA.nas +++ b/Nasal/MCDU/PERFGA.nas @@ -36,6 +36,8 @@ var perfGAInput = func(key, i) { tempAcc = tempThrRed; # accel is always greater or eqal thrust reduction } + # at the moment 400ft/1500ft and 39000ft are hard coded defaults. + # needs to be checked if (tempThrRed >= 400 and tempThrRed <= 39000 and tempAcc >= 1500 and tempAcc <= 39000) { setprop("/fdm/jsbsim/fadec/ga-clbreduc-ft", tempThrRed); setprop("/FMGC/internal/ga-accel-agl-ft", tempAcc); diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index 88c29ddf..eaf181c8 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -184,7 +184,7 @@ var perfTOInput = func(key, i) { var accs = size(acc); #TODO - manual check - four digit alwway 0000 - default = runaway_elevation + 800 ft, min values runaway_elevation+400ft - if (int(thrred) != nil and (thrreds >= 3 and thrreds <= 5) and thrred >= minThrRed and thrred <= 39000 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= fmgc.minAccelAlt and acc <= 39000) { + if (int(thrred) != nil and (thrreds >= 3 and thrreds <= 5) and thrred >= fmgc.minThrRed and thrred <= 39000 and int(acc) != nil and (accs >= 3 and accs <= 5) and acc >= fmgc.minAccelAlt and acc <= 39000) { setprop("/fdm/jsbsim/fadec/clbreduc-ft", int(thrred / 10) * 10); setprop("/FMGC/internal/accel-agl-ft", int(acc / 10) * 10); setprop("MCDUC/thracc-set", 1); From 23dcd7323528d09b86b69fbaf221683d5ce24ca1 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 6 Nov 2023 17:48:44 +0100 Subject: [PATCH 24/54] adding comments --- Nasal/MCDU/PERFGA.nas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas index d622c217..400ee9c0 100644 --- a/Nasal/MCDU/PERFGA.nas +++ b/Nasal/MCDU/PERFGA.nas @@ -1,5 +1,7 @@ # Copyright (c) 2020 Matthew Maring (mattmaring) +# and flinkekoralle 2023 + # uses universal values, will implement separately once FPLN is finished var perfGAInput = func(key, i) { From ca2a482687c54506cd7766866fa0773296c56a7f Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 6 Nov 2023 17:56:15 +0100 Subject: [PATCH 25/54] Minor change to test push request --- Nasal/MCDU/PERFGA.nas | 2 -- 1 file changed, 2 deletions(-) diff --git a/Nasal/MCDU/PERFGA.nas b/Nasal/MCDU/PERFGA.nas index 400ee9c0..d622c217 100644 --- a/Nasal/MCDU/PERFGA.nas +++ b/Nasal/MCDU/PERFGA.nas @@ -1,7 +1,5 @@ # Copyright (c) 2020 Matthew Maring (mattmaring) -# and flinkekoralle 2023 - # uses universal values, will implement separately once FPLN is finished var perfGAInput = func(key, i) { From 67e28bd44d1f92003d8f59e8e02b898e0e22c2fa Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Tue, 7 Nov 2023 23:36:12 +0100 Subject: [PATCH 26/54] testing a timer with FD1 button --- Nasal/FMGC/FCU.nas | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 546bf9a6..0b1558f6 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -41,6 +41,12 @@ var FCU = { }, }; +# adding a test timer function +var timer = maketimer(5, func(){ + print("Hello, World!"); # print "Hello, World!" once every second (call timer.stop() to stop it) +}); +timer.singleShot = 1; # timer will only be run once + var FCUController = { FCU1: nil, FCU2: nil, @@ -118,6 +124,14 @@ var FCUController = { if (me.FCUworking) { if (!fmgc.Output.fd1.getBoolValue()) { fmgc.Input.fd1.setValue(1); + + # timer is started by pressing fd1 and reset by pressing again + if (!timer.isRunning){ + timer.start(); + } else { + timer.restart(5); + } + } else { fmgc.Input.fd1.setValue(0); } From 9d8a7da5867ac366bf123c08c91d25cc18afa00e Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 13 Nov 2023 23:21:54 +0100 Subject: [PATCH 27/54] default fcu alt set to 100 ft --- Nasal/FMGC/FMGC-b.nas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index 0dba415d..6983f931 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -204,7 +204,7 @@ var ITAF = { Input.fd1.setBoolValue(1); Input.fd2.setBoolValue(1); Input.hdg.setValue(360); - Input.alt.setValue(10000); + Input.alt.setValue(20000); Input.vs.setValue(0); Custom.Output.vsFCU.setValue(left(sprintf("%+05.0f",0),3)); Input.fpa.setValue(0); @@ -228,7 +228,7 @@ var ITAF = { Internal.minVs.setValue(-500); Internal.maxVs.setValue(500); Internal.bankLimit.setValue(30); - Internal.alt.setValue(10000); + Internal.alt.setValue(100); Internal.altCaptureActive = 0; Input.kts.setValue(100); Input.mach.setValue(0.5); From 3db9d0bbe8eeffcd1fd39967912bd25f7f5ad970 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 13 Nov 2023 23:38:43 +0100 Subject: [PATCH 28/54] fcu alt selection for 1k position corrected --- Nasal/FMGC/FCU.nas | 8 ++++---- Nasal/FMGC/FMGC-b.nas | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 0b1558f6..53afaa54 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -403,13 +403,13 @@ var FCUController = { me.altTemp = fmgc.Input.alt.getValue(); if (d == 1) { if (altSetMode.getBoolValue()) { - me.altTemp = me.altTemp + 1000; + me.altTemp = math.ceil((me.altTemp + 100)/1000) * 1000; } else { me.altTemp = me.altTemp + 100; } } else if (d == -1) { if (altSetMode.getBoolValue()) { - me.altTemp = me.altTemp - 1000; + me.altTemp = math.floor((me.altTemp - 100)/1000) * 1000; } else { me.altTemp = me.altTemp - 100; } @@ -418,9 +418,9 @@ var FCUController = { } else if (d == -2) { me.altTemp = me.altTemp - 100; } else if (d == 10) { - me.altTemp = me.altTemp + 1000; + me.altTemp = math.ceil((me.altTemp + 100)/1000) * 1000; } else if (d == -10) { - me.altTemp = me.altTemp - 1000; + me.altTemp = math.floor((me.altTemp - 100)/1000) * 1000; } if (me.altTemp < 100) { fmgc.Input.alt.setValue(100); diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index 6983f931..1f74028c 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -204,7 +204,7 @@ var ITAF = { Input.fd1.setBoolValue(1); Input.fd2.setBoolValue(1); Input.hdg.setValue(360); - Input.alt.setValue(20000); + Input.alt.setValue(100); Input.vs.setValue(0); Custom.Output.vsFCU.setValue(left(sprintf("%+05.0f",0),3)); Input.fpa.setValue(0); @@ -228,7 +228,7 @@ var ITAF = { Internal.minVs.setValue(-500); Internal.maxVs.setValue(500); Internal.bankLimit.setValue(30); - Internal.alt.setValue(100); + Internal.alt.setValue(10000); Internal.altCaptureActive = 0; Input.kts.setValue(100); Input.mach.setValue(0.5); From 5dbc7139102555307edbe95450d16b355d836e0c Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Sun, 26 Nov 2023 21:38:11 +0100 Subject: [PATCH 29/54] finding FCU outputs --- Nasal/FMGC/FCU.nas | 39 +++++++++++++ Nasal/FMGC/FMGC-b.nas | 1 + Session.vim | 89 +++++++++++++++++++++++++++++ gui/dialogs/a3xx-autoflight-dlg.xml | 24 -------- 4 files changed, 129 insertions(+), 24 deletions(-) create mode 100644 Session.vim diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 53afaa54..4f7fb683 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -304,6 +304,45 @@ var FCUController = { } } else { # speed preselection on FCU as speed is managed + if (fmgc.Input.ktsMach.getBoolValue()) { + me.machTemp = fmgc.Input.mach.getValue(); + if (d == 1) { + me.machTemp = math.round(me.machTemp + 0.001, 0.001); # Kill floating point error + } else if (d == -1) { + me.machTemp = math.round(me.machTemp - 0.001, 0.001); # Kill floating point error + } else if (d == 10) { + me.machTemp = math.round(me.machTemp + 0.01, 0.01); # Kill floating point error + } else if (d == -10) { + me.machTemp = math.round(me.machTemp - 0.01, 0.01); # Kill floating point error + } + if (me.machTemp < 0.10) { + fmgc.Input.mach.setValue(0.10); + } else if (me.machTemp > 0.99) { + fmgc.Input.mach.setValue(0.99); + } else { + fmgc.Input.mach.setValue(me.machTemp); + } + print("managed speed select mach"); + } else { + me.iasTemp = fmgc.Input.kts.getValue(); + if (d == 1) { + me.iasTemp = me.iasTemp + 1; + } else if (d == -1) { + me.iasTemp = me.iasTemp - 1; + } else if (d == 10) { + me.iasTemp = me.iasTemp + 10; + } else if (d == -10) { + me.iasTemp = me.iasTemp - 10; + } + if (me.iasTemp < 100) { + fmgc.Input.kts.setValue(100); + } else if (me.iasTemp > 399) { + fmgc.Input.kts.setValue(399); + } else { + fmgc.Input.kts.setValue(me.iasTemp); + } + print("managed speed select kts"); + } } } }, diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index 1f74028c..0a8a9460 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -125,6 +125,7 @@ var Internal = { hdgErrorDeg: props.globals.initNode("/it-autoflight/internal/heading-error-deg", 0, "DOUBLE"), hdgPredicted: props.globals.initNode("/it-autoflight/internal/heading-predicted", 0, "DOUBLE"), hdgTrk: props.globals.initNode("/it-autoflight/internal/heading", 0, "DOUBLE"), + kts: props.globals.initNode("/it-autoflight/internal/kts", 100, "INT"), lnavAdvanceNm: props.globals.initNode("/it-autoflight/internal/lnav-advance-nm", 0, "DOUBLE"), minVs: props.globals.initNode("/it-autoflight/internal/min-vs", -500, "INT"), maxVs: props.globals.initNode("/it-autoflight/internal/max-vs", 500, "INT"), diff --git a/Session.vim b/Session.vim new file mode 100644 index 00000000..f00bf7e8 --- /dev/null +++ b/Session.vim @@ -0,0 +1,89 @@ +let SessionLoad = 1 +if &cp | set nocp | endif +let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1 +let v:this_session=expand(":p") +silent only +silent tabonly +cd ~/.fgfs/Aircraft/A320-family +if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' + let s:wipebuf = bufnr('%') +endif +let s:shortmess_save = &shortmess +if &shortmess =~ 'A' + set shortmess=aoOA +else + set shortmess=aoO +endif +badd +287 Nasal/FMGC/FCU.nas +badd +98 Nasal/FMGC/FMGC-b.nas +badd +816 A320-main.xml +argglobal +%argdel +edit A320-main.xml +let s:save_splitbelow = &splitbelow +let s:save_splitright = &splitright +set splitbelow splitright +wincmd _ | wincmd | +vsplit +1wincmd h +wincmd w +let &splitbelow = s:save_splitbelow +let &splitright = s:save_splitright +wincmd t +let s:save_winminheight = &winminheight +let s:save_winminwidth = &winminwidth +set winminheight=0 +set winheight=1 +set winminwidth=0 +set winwidth=1 +exe 'vert 1resize ' . ((&columns * 288 + 159) / 319) +exe 'vert 2resize ' . ((&columns * 30 + 159) / 319) +argglobal +balt Nasal/FMGC/FMGC-b.nas +setlocal fdm=marker +setlocal fde=0 +setlocal fmr={{{,}}} +setlocal fdi=# +setlocal fdl=0 +setlocal fml=1 +setlocal fdn=20 +setlocal fen +let s:l = 816 - ((28 * winheight(0) + 28) / 57) +if s:l < 1 | let s:l = 1 | endif +keepjumps exe s:l +normal! zt +keepjumps 816 +normal! 032| +wincmd w +argglobal +enew +file NERD_tree_2 +balt A320-main.xml +setlocal fdm=manual +setlocal fde=0 +setlocal fmr={{{,}}} +setlocal fdi=# +setlocal fdl=0 +setlocal fml=1 +setlocal fdn=20 +setlocal nofen +wincmd w +exe 'vert 1resize ' . ((&columns * 288 + 159) / 319) +exe 'vert 2resize ' . ((&columns * 30 + 159) / 319) +tabnext 1 +if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 + silent exe 'bwipe ' . s:wipebuf +endif +unlet! s:wipebuf +set winheight=1 winwidth=20 +let &shortmess = s:shortmess_save +let &winminheight = s:save_winminheight +let &winminwidth = s:save_winminwidth +let s:sx = expand(":p:r")."x.vim" +if filereadable(s:sx) + exe "source " . fnameescape(s:sx) +endif +let &g:so = s:so_save | let &g:siso = s:siso_save +doautoall SessionLoadPost +unlet SessionLoad +" vim: set ft=vim : diff --git a/gui/dialogs/a3xx-autoflight-dlg.xml b/gui/dialogs/a3xx-autoflight-dlg.xml index 15ec22f3..795abb6a 100644 --- a/gui/dialogs/a3xx-autoflight-dlg.xml +++ b/gui/dialogs/a3xx-autoflight-dlg.xml @@ -359,16 +359,10 @@ 25 << - /it-autoflight/input/kts-mach 0 - - /it-autoflight/input/spd-managed - 0 - - nasal @@ -382,16 +376,10 @@ 25 < - /it-autoflight/input/kts-mach 0 - - /it-autoflight/input/spd-managed - 0 - - nasal @@ -426,16 +414,10 @@ 25 > - /it-autoflight/input/kts-mach 0 - - /it-autoflight/input/spd-managed - 0 - - nasal @@ -450,16 +432,10 @@ 25 >> - /it-autoflight/input/kts-mach 0 - - /it-autoflight/input/spd-managed - 0 - - nasal From 96b4227ed2b672f60eb21f971238fb1bff3f94e3 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Tue, 19 Dec 2023 22:33:09 +0100 Subject: [PATCH 30/54] spd preselection timer in managed todo: separate fcu selected speed and autoflight commanded speed --- Nasal/FMGC/FCU.nas | 32 +++++++++++++++++--------------- Nasal/FMGC/FMGC.nas | 7 +++++-- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 4f7fb683..4c0cc27d 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -10,6 +10,7 @@ var apDiscBtn = props.globals.getNode("/sim/sound/apdiscbtn"); var FCUworkingNode = props.globals.initNode("/FMGC/FCU-working", 0, "BOOL"); var SidestickPriorityPressedLast = 0; var priorityTimer = 0; +var spdPreselectTime = 15; # Preselected Speed stays for 15 secs var FCU = { elecSupply: "", @@ -41,12 +42,6 @@ var FCU = { }, }; -# adding a test timer function -var timer = maketimer(5, func(){ - print("Hello, World!"); # print "Hello, World!" once every second (call timer.stop() to stop it) -}); -timer.singleShot = 1; # timer will only be run once - var FCUController = { FCU1: nil, FCU2: nil, @@ -124,14 +119,6 @@ var FCUController = { if (me.FCUworking) { if (!fmgc.Output.fd1.getBoolValue()) { fmgc.Input.fd1.setValue(1); - - # timer is started by pressing fd1 and reset by pressing again - if (!timer.isRunning){ - timer.start(); - } else { - timer.restart(5); - } - } else { fmgc.Input.fd1.setValue(0); } @@ -238,7 +225,6 @@ var FCUController = { SPDPull: func() { if (me.FCUworking) { fmgc.Custom.Input.spdManaged.setBoolValue(0); - fmgc.ManagedSPD.stop(); me.ias = fmgc.Velocities.indicatedAirspeedKt.getValue(); me.mach = fmgc.Velocities.indicatedMach.getValue(); if (!fmgc.Input.ktsMach.getBoolValue()) { @@ -262,6 +248,7 @@ var FCUController = { }, machTemp: nil, iasTemp: nil, + spdPreselect: nil, SPDAdjust: func(d) { if (me.FCUworking) { if (!fmgc.Custom.Input.spdManaged.getBoolValue()) { @@ -304,6 +291,21 @@ var FCUController = { } } else { # speed preselection on FCU as speed is managed + me.spdPreselect = 1; + + # timer is started by rotating speed selection knob + # and reset by rotating again + if (!spdSelectTimer.isRunning){ + var spdSelectTimer = maketimer(spdPreselectTime, func(){ + me.spdPreselect = 0; + print("Setting spdPreselect to 0"); + }); + spdSelectTimer.singleShot = 1; # timer will only be run once + spdSelectTimer.start(); + } else { + spdSelectTimer.restart(spdPreselectTime); + } + if (fmgc.Input.ktsMach.getBoolValue()) { me.machTemp = fmgc.Input.mach.getValue(); if (d == 1) { diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 5eda83be..c4a54286 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -990,6 +990,7 @@ var machToKt = func(val) { return val * FMGCNodes.machToKtsFactor.getValue(); } var ManagedSPD = maketimer(0.25, func { if (FMGCInternal.crzSet and FMGCInternal.costIndexSet) { if (Custom.Input.spdManaged.getBoolValue()) { + # Managed Speed altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue(); ktsmach = Input.ktsMach.getValue(); @@ -1072,13 +1073,15 @@ var ManagedSPD = maketimer(0.25, func { Input.ktsMach.setValue(1); } - # Set target speed - if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach) { + # Show target speed on FCU + # only if in preselection + if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach and !fcu.FCUController.spdPreselect) { Input.kts.setValue(FMGCInternal.mngSpd); } elsif (Input.mach.getValue() != FMGCInternal.mngSpd and ktsmach) { Input.mach.setValue(FMGCInternal.mngSpd); } } else { + # Selected Speed ManagedSPD.stop(); } } else { From 429521f6be5d4eda174096944f26c79f5ef10ff6 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Wed, 20 Dec 2023 13:58:02 +0100 Subject: [PATCH 31/54] preselection working todo: spd adjust in managed gets fmgc speed instead of current --- Models/FlightDeck/a320.flightdeck.xml | 6 +- Nasal/FMGC/FCU.nas | 185 +++++++++++++++----------- Session.vim | 39 +++--- 3 files changed, 130 insertions(+), 100 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 9baa6dca..3c38e92e 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -1758,7 +1758,7 @@ xy-plane number-value %3.0f - it-autoflight/input/kts + fcu/input/kts false Airbus7Seg.ttf true @@ -1784,7 +1784,7 @@ xy-plane number-value %0.3f - it-autoflight/input/mach + fcu/input/mach false Airbus7Seg.ttf true @@ -3143,11 +3143,11 @@ select spd-text + controls/switches/annun-test it-autoflight/input/kts-mach - it-autoflight/input/spd-managed FMGC/FCU-working diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 4c0cc27d..e7319e8b 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -8,9 +8,13 @@ var apWarningNode = props.globals.getNode("/it-autoflight/output/ap-warning"); var athrWarningNode = props.globals.getNode("/it-autoflight/output/athr-warning"); var apDiscBtn = props.globals.getNode("/sim/sound/apdiscbtn"); var FCUworkingNode = props.globals.initNode("/FMGC/FCU-working", 0, "BOOL"); +var input = { + kts: props.globals.initNode("/fcu/input/kts", 0, "INT"), + mach: props.globals.initNode("/fcu/input/mach", 0, "DOUBLE"), +}; var SidestickPriorityPressedLast = 0; var priorityTimer = 0; -var spdPreselectTime = 15; # Preselected Speed stays for 15 secs +var spdPreselectTime = 5; # Preselected Speed stays for 15 secs var FCU = { elecSupply: "", @@ -222,111 +226,128 @@ var FCUController = { }, ias: nil, mach: nil, + spdPreselect: nil, SPDPull: func() { if (me.FCUworking) { fmgc.Custom.Input.spdManaged.setBoolValue(0); + me.spdPreselect = 0; + spdSelectTimer.stop(); me.ias = fmgc.Velocities.indicatedAirspeedKt.getValue(); me.mach = fmgc.Velocities.indicatedMach.getValue(); if (!fmgc.Input.ktsMach.getBoolValue()) { if (me.ias >= 100 and me.ias <= 399) { fmgc.Input.kts.setValue(math.round(me.ias)); + fcu.input.kts.setValue(math.round(me.ias)); } else if (me.ias < 100) { fmgc.Input.kts.setValue(100); + fcu.input.kts.setValue(100); } else if (me.ias > 399) { fmgc.Input.kts.setValue(399); + fcu.input.kts.setValue(399); } } else if (fmgc.Input.ktsMach.getBoolValue()) { if (me.mach >= 0.10 and me.mach <= 0.99) { fmgc.Input.mach.setValue(math.round(me.mach, 0.001)); + fcu.input.mach.setValue(math.round(me.mach, 0.001)); } else if (me.mach < 0.10) { fmgc.Input.mach.setValue(0.10); + fcu.input.mach.setValue(0.10); } else if (me.mach > 0.99) { fmgc.Input.mach.setValue(0.99); + fcu.input.mach.setValue(0.99); } } } }, machTemp: nil, iasTemp: nil, - spdPreselect: nil, SPDAdjust: func(d) { if (me.FCUworking) { - if (!fmgc.Custom.Input.spdManaged.getBoolValue()) { - if (fmgc.Input.ktsMach.getBoolValue()) { - me.machTemp = fmgc.Input.mach.getValue(); - if (d == 1) { - me.machTemp = math.round(me.machTemp + 0.001, 0.001); # Kill floating point error - } else if (d == -1) { - me.machTemp = math.round(me.machTemp - 0.001, 0.001); # Kill floating point error - } else if (d == 10) { - me.machTemp = math.round(me.machTemp + 0.01, 0.01); # Kill floating point error - } else if (d == -10) { - me.machTemp = math.round(me.machTemp - 0.01, 0.01); # Kill floating point error - } - if (me.machTemp < 0.10) { - fmgc.Input.mach.setValue(0.10); - } else if (me.machTemp > 0.99) { - fmgc.Input.mach.setValue(0.99); - } else { - fmgc.Input.mach.setValue(me.machTemp); - } - } else { - me.iasTemp = fmgc.Input.kts.getValue(); - if (d == 1) { - me.iasTemp = me.iasTemp + 1; - } else if (d == -1) { - me.iasTemp = me.iasTemp - 1; - } else if (d == 10) { - me.iasTemp = me.iasTemp + 10; - } else if (d == -10) { - me.iasTemp = me.iasTemp - 10; - } - if (me.iasTemp < 100) { - fmgc.Input.kts.setValue(100); - } else if (me.iasTemp > 399) { - fmgc.Input.kts.setValue(399); - } else { - fmgc.Input.kts.setValue(me.iasTemp); - } - } - } else { - # speed preselection on FCU as speed is managed - me.spdPreselect = 1; + if (fmgc.Input.ktsMach.getBoolValue()) { + if (fmgc.Custom.Input.spdManaged.getBoolValue()) { + # get actual managed speed + # get from fmgc when window opens + # get from window if window already open + if(!me.spdPreselect) { + me.machTemp = fmgc.Input.mach.getValue(); + # speed preselection on FCU as speed is managed + me.spdPreselect = 1; + } else { + me.machTemp = fcu.input.mach.getValue(); + } - # timer is started by rotating speed selection knob - # and reset by rotating again - if (!spdSelectTimer.isRunning){ - var spdSelectTimer = maketimer(spdPreselectTime, func(){ - me.spdPreselect = 0; - print("Setting spdPreselect to 0"); - }); - spdSelectTimer.singleShot = 1; # timer will only be run once + # timer is started by rotating speed selection knob + # and reset by rotating again + if (!spdSelectTimer.isRunning){ spdSelectTimer.start(); - } else { + } else { spdSelectTimer.restart(spdPreselectTime); + } + + if (d == 1) { + me.machTemp = math.round(me.machTemp + 0.001, 0.001); # Kill floating point error + } else if (d == -1) { + me.machTemp = math.round(me.machTemp - 0.001, 0.001); # Kill floating point error + } else if (d == 10) { + me.machTemp = math.round(me.machTemp + 0.01, 0.01); # Kill floating point error + } else if (d == -10) { + me.machTemp = math.round(me.machTemp - 0.01, 0.01); # Kill floating point error + } + fcu.input.mach.setValue(math.clamp(me.machTemp, 0.10, 0.99)); + + } else { + # get actual selected speed + # speed is directly controlled if it is not managed + me.machTemp = fcu.input.mach.getValue(); + + if (d == 1) { + me.machTemp = math.round(me.machTemp + 0.001, 0.001); # Kill floating point error + } else if (d == -1) { + me.machTemp = math.round(me.machTemp - 0.001, 0.001); # Kill floating point error + } else if (d == 10) { + me.machTemp = math.round(me.machTemp + 0.01, 0.01); # Kill floating point error + } else if (d == -10) { + me.machTemp = math.round(me.machTemp - 0.01, 0.01); # Kill floating point error + } + fmgc.Input.mach.setValue(math.clamp(me.machTemp, 0.10, 0.99)); + fcu.input.mach.setValue(math.clamp(me.machTemp, 0.10, 0.99)); } + } else { + if (fmgc.Custom.Input.spdManaged.getBoolValue()) { + # get actual managed speed + # get from fmgc when window opens + # get from window if window already open + if(!me.spdPreselect) { + # speed preselection on FCU as speed is managed + me.spdPreselect = 1; + me.iasTemp = fmgc.Input.kts.getValue(); + } else { + me.iasTemp = fcu.input.kts.getValue(); + } + + # timer is started by rotating speed selection knob + # and reset by rotating again + if (!spdSelectTimer.isRunning){ + spdSelectTimer.start(); + } else { + spdSelectTimer.restart(spdPreselectTime); + } + + if (d == 1) { + me.iasTemp = me.iasTemp + 1; + } else if (d == -1) { + me.iasTemp = me.iasTemp - 1; + } else if (d == 10) { + me.iasTemp = me.iasTemp + 10; + } else if (d == -10) { + me.iasTemp = me.iasTemp - 10; + } + fcu.input.kts.setValue(math.clamp(me.iasTemp, 100, 399)); + } else { + # get actual selected speed + # speed is directly controlled if it is not managed + me.iasTemp = fcu.input.kts.getValue(); - if (fmgc.Input.ktsMach.getBoolValue()) { - me.machTemp = fmgc.Input.mach.getValue(); - if (d == 1) { - me.machTemp = math.round(me.machTemp + 0.001, 0.001); # Kill floating point error - } else if (d == -1) { - me.machTemp = math.round(me.machTemp - 0.001, 0.001); # Kill floating point error - } else if (d == 10) { - me.machTemp = math.round(me.machTemp + 0.01, 0.01); # Kill floating point error - } else if (d == -10) { - me.machTemp = math.round(me.machTemp - 0.01, 0.01); # Kill floating point error - } - if (me.machTemp < 0.10) { - fmgc.Input.mach.setValue(0.10); - } else if (me.machTemp > 0.99) { - fmgc.Input.mach.setValue(0.99); - } else { - fmgc.Input.mach.setValue(me.machTemp); - } - print("managed speed select mach"); - } else { - me.iasTemp = fmgc.Input.kts.getValue(); if (d == 1) { me.iasTemp = me.iasTemp + 1; } else if (d == -1) { @@ -336,14 +357,8 @@ var FCUController = { } else if (d == -10) { me.iasTemp = me.iasTemp - 10; } - if (me.iasTemp < 100) { - fmgc.Input.kts.setValue(100); - } else if (me.iasTemp > 399) { - fmgc.Input.kts.setValue(399); - } else { - fmgc.Input.kts.setValue(me.iasTemp); - } - print("managed speed select kts"); + fmgc.Input.kts.setValue(math.clamp(me.iasTemp, 100, 399)); + fcu.input.kts.setValue(math.clamp(me.iasTemp, 100, 399)); } } } @@ -621,3 +636,11 @@ var hdgInput = func { fmgc.Custom.hdgTime = pts.Sim.Time.elapsedSec.getValue(); } } + +# Selecting speed in managed goes into speed preselection +var spdSelectTimer = maketimer(spdPreselectTime, func(){ + FCUController.spdPreselect = 0; + print("Setting spdPreselect to 0"); + }); +spdSelectTimer.singleShot = 1; # timer will only be run once + diff --git a/Session.vim b/Session.vim index f00bf7e8..5a32c31f 100644 --- a/Session.vim +++ b/Session.vim @@ -14,12 +14,14 @@ if &shortmess =~ 'A' else set shortmess=aoO endif -badd +287 Nasal/FMGC/FCU.nas -badd +98 Nasal/FMGC/FMGC-b.nas -badd +816 A320-main.xml +badd +13 Nasal/FMGC/FCU.nas +badd +100 Nasal/FMGC/FMGC-b.nas +badd +1787 Models/FlightDeck/a320.flightdeck.xml +badd +1080 Nasal/FMGC/FMGC.nas +badd +811 A320-main.xml argglobal %argdel -edit A320-main.xml +edit Nasal/FMGC/FMGC.nas let s:save_splitbelow = &splitbelow let s:save_splitright = &splitright set splitbelow splitright @@ -36,10 +38,10 @@ set winminheight=0 set winheight=1 set winminwidth=0 set winwidth=1 -exe 'vert 1resize ' . ((&columns * 288 + 159) / 319) -exe 'vert 2resize ' . ((&columns * 30 + 159) / 319) +exe 'vert 1resize ' . ((&columns * 159 + 159) / 319) +exe 'vert 2resize ' . ((&columns * 159 + 159) / 319) argglobal -balt Nasal/FMGC/FMGC-b.nas +balt Models/FlightDeck/a320.flightdeck.xml setlocal fdm=marker setlocal fde=0 setlocal fmr={{{,}}} @@ -48,28 +50,33 @@ setlocal fdl=0 setlocal fml=1 setlocal fdn=20 setlocal fen -let s:l = 816 - ((28 * winheight(0) + 28) / 57) +let s:l = 1080 - ((31 * winheight(0) + 28) / 57) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt -keepjumps 816 -normal! 032| +keepjumps 1080 +normal! 019| wincmd w argglobal -enew -file NERD_tree_2 +if bufexists(fnamemodify("Nasal/FMGC/FCU.nas", ":p")) | buffer Nasal/FMGC/FCU.nas | else | edit Nasal/FMGC/FCU.nas | endif balt A320-main.xml -setlocal fdm=manual +setlocal fdm=marker setlocal fde=0 setlocal fmr={{{,}}} setlocal fdi=# setlocal fdl=0 setlocal fml=1 setlocal fdn=20 -setlocal nofen +setlocal fen +let s:l = 257 - ((37 * winheight(0) + 28) / 57) +if s:l < 1 | let s:l = 1 | endif +keepjumps exe s:l +normal! zt +keepjumps 257 +normal! 020| wincmd w -exe 'vert 1resize ' . ((&columns * 288 + 159) / 319) -exe 'vert 2resize ' . ((&columns * 30 + 159) / 319) +exe 'vert 1resize ' . ((&columns * 159 + 159) / 319) +exe 'vert 2resize ' . ((&columns * 159 + 159) / 319) tabnext 1 if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 silent exe 'bwipe ' . s:wipebuf From 6e1ceb0967aab991f362262491d98605a897a922 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Wed, 20 Dec 2023 17:34:12 +0100 Subject: [PATCH 32/54] something wrong here --- Nasal/FMGC/FCU.nas | 68 ++++++++++++++++++++++++---------------------- Session.vim | 51 ++++------------------------------ 2 files changed, 40 insertions(+), 79 deletions(-) diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index e7319e8b..7e7b4e2e 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -220,43 +220,45 @@ var FCUController = { if (me.FCUworking) { if (fmgc.FMGCInternal.crzSet and fmgc.FMGCInternal.costIndexSet) { fmgc.Custom.Input.spdManaged.setBoolValue(1); + me.spdPreselect = 0; + spdSelectTimer.stop(); fmgc.ManagedSPD.start(); } } }, - ias: nil, - mach: nil, - spdPreselect: nil, + ias: 0, + mach: 0, + spdPreselect: 0, SPDPull: func() { if (me.FCUworking) { - fmgc.Custom.Input.spdManaged.setBoolValue(0); - me.spdPreselect = 0; - spdSelectTimer.stop(); - me.ias = fmgc.Velocities.indicatedAirspeedKt.getValue(); - me.mach = fmgc.Velocities.indicatedMach.getValue(); - if (!fmgc.Input.ktsMach.getBoolValue()) { - if (me.ias >= 100 and me.ias <= 399) { - fmgc.Input.kts.setValue(math.round(me.ias)); - fcu.input.kts.setValue(math.round(me.ias)); - } else if (me.ias < 100) { - fmgc.Input.kts.setValue(100); - fcu.input.kts.setValue(100); - } else if (me.ias > 399) { - fmgc.Input.kts.setValue(399); - fcu.input.kts.setValue(399); - } - } else if (fmgc.Input.ktsMach.getBoolValue()) { - if (me.mach >= 0.10 and me.mach <= 0.99) { - fmgc.Input.mach.setValue(math.round(me.mach, 0.001)); - fcu.input.mach.setValue(math.round(me.mach, 0.001)); - } else if (me.mach < 0.10) { - fmgc.Input.mach.setValue(0.10); - fcu.input.mach.setValue(0.10); - } else if (me.mach > 0.99) { - fmgc.Input.mach.setValue(0.99); - fcu.input.mach.setValue(0.99); - } - } + if (fmgc.Custom.Input.spdManaged.getBoolValue()) { + fmgc.Custom.Input.spdManaged.setBoolValue(nil); + if (me.spdPreselect){ + me.spdPreselect = 0; + spdSelectTimer.stop(); + if (fmgc.Input.ktsMach.getBoolValue()){ + fmgc.Input.mach.setValue(fcu.input.mach.getValue()); + } else { + fmgc.Input.kts.setValue(fcu.input.kts.getValue()); + } + } else { + if (fmgc.Input.ktsMach.getBoolValue()){ + me.mach = math.clamp(math.round(fmgc.Velocities.indicatedMach.getValue(), 0.01), 0.01, 0.99); + fmgc.Input.mach.setValue(me.mach); + fcu.input.mach.setValue(me.mach); + } else { + me.ias = math.clamp(math.round(fmgc.Velocities.indicatedAirspeedKt.getValue()), 100, 399); + fmgc.Input.kts.setValue(me.ias); + fcu.input.kts.setValue(me.ias); + } + } + } else { + if (fmgc.Input.ktsMach.getBoolValue()){ + me.mach = fcu.input.mach.getValue(); + } else { + me.ias = fcu.input.kts.getValue(); + } + } } }, machTemp: nil, @@ -269,9 +271,9 @@ var FCUController = { # get from fmgc when window opens # get from window if window already open if(!me.spdPreselect) { - me.machTemp = fmgc.Input.mach.getValue(); # speed preselection on FCU as speed is managed me.spdPreselect = 1; + me.machTemp = math.clamp(math.round(fmgc.Velocities.indicatedMach.getValue(), 0.01), 0.01, 0.99); } else { me.machTemp = fcu.input.mach.getValue(); } @@ -320,7 +322,7 @@ var FCUController = { if(!me.spdPreselect) { # speed preselection on FCU as speed is managed me.spdPreselect = 1; - me.iasTemp = fmgc.Input.kts.getValue(); + me.iasTemp = math.clamp(math.round(fmgc.Velocities.indicatedAirspeedKt.getValue()), 100, 399); } else { me.iasTemp = fcu.input.kts.getValue(); } diff --git a/Session.vim b/Session.vim index 5a32c31f..f4935787 100644 --- a/Session.vim +++ b/Session.vim @@ -14,32 +14,14 @@ if &shortmess =~ 'A' else set shortmess=aoO endif -badd +13 Nasal/FMGC/FCU.nas +badd +316 Nasal/FMGC/FCU.nas badd +100 Nasal/FMGC/FMGC-b.nas -badd +1787 Models/FlightDeck/a320.flightdeck.xml +badd +3158 Models/FlightDeck/a320.flightdeck.xml badd +1080 Nasal/FMGC/FMGC.nas -badd +811 A320-main.xml +badd +823 A320-main.xml argglobal %argdel edit Nasal/FMGC/FMGC.nas -let s:save_splitbelow = &splitbelow -let s:save_splitright = &splitright -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -let &splitbelow = s:save_splitbelow -let &splitright = s:save_splitright -wincmd t -let s:save_winminheight = &winminheight -let s:save_winminwidth = &winminwidth -set winminheight=0 -set winheight=1 -set winminwidth=0 -set winwidth=1 -exe 'vert 1resize ' . ((&columns * 159 + 159) / 319) -exe 'vert 2resize ' . ((&columns * 159 + 159) / 319) argglobal balt Models/FlightDeck/a320.flightdeck.xml setlocal fdm=marker @@ -50,33 +32,12 @@ setlocal fdl=0 setlocal fml=1 setlocal fdn=20 setlocal fen -let s:l = 1080 - ((31 * winheight(0) + 28) / 57) +let s:l = 1080 - ((32 * winheight(0) + 28) / 57) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt keepjumps 1080 -normal! 019| -wincmd w -argglobal -if bufexists(fnamemodify("Nasal/FMGC/FCU.nas", ":p")) | buffer Nasal/FMGC/FCU.nas | else | edit Nasal/FMGC/FCU.nas | endif -balt A320-main.xml -setlocal fdm=marker -setlocal fde=0 -setlocal fmr={{{,}}} -setlocal fdi=# -setlocal fdl=0 -setlocal fml=1 -setlocal fdn=20 -setlocal fen -let s:l = 257 - ((37 * winheight(0) + 28) / 57) -if s:l < 1 | let s:l = 1 | endif -keepjumps exe s:l -normal! zt -keepjumps 257 -normal! 020| -wincmd w -exe 'vert 1resize ' . ((&columns * 159 + 159) / 319) -exe 'vert 2resize ' . ((&columns * 159 + 159) / 319) +normal! 024| tabnext 1 if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 silent exe 'bwipe ' . s:wipebuf @@ -84,8 +45,6 @@ endif unlet! s:wipebuf set winheight=1 winwidth=20 let &shortmess = s:shortmess_save -let &winminheight = s:save_winminheight -let &winminwidth = s:save_winminwidth let s:sx = expand(":p:r")."x.vim" if filereadable(s:sx) exe "source " . fnameescape(s:sx) From 016f366e8f92dbaee1c537c394f03201573d8b88 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Wed, 20 Dec 2023 19:34:13 +0100 Subject: [PATCH 33/54] spd window indication corrected todo: fcu default spd is 0. should be 100. --- Models/FlightDeck/a320.flightdeck.xml | 27 ++++++++++++++++++++------- Nasal/FMGC/FCU.nas | 18 +++++++++--------- Nasal/FMGC/FMGC.nas | 2 +- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 3c38e92e..79e14853 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -3143,13 +3143,19 @@ select spd-text - - - controls/switches/annun-test - it-autoflight/input/kts-mach - FMGC/FCU-working - + + controls/switches/annun-test + it-autoflight/input/kts-mach + FMGC/FCU-working + + + it-autoflight/input/spd-managed + fcu/input/spd-preselect + + it-autoflight/input/spd-managed + + @@ -3160,8 +3166,14 @@ controls/switches/annun-test it-autoflight/input/kts-mach - it-autoflight/input/spd-managed FMGC/FCU-working + + + it-autoflight/input/spd-managed + fcu/input/spd-preselect + + it-autoflight/input/spd-managed + @@ -3181,6 +3193,7 @@ controls/switches/annun-test it-autoflight/input/spd-managed + fcu/input/spd-preselect diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 7e7b4e2e..b7a948f4 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -11,6 +11,7 @@ var FCUworkingNode = props.globals.initNode("/FMGC/FCU-working", 0, "BOOL"); var input = { kts: props.globals.initNode("/fcu/input/kts", 0, "INT"), mach: props.globals.initNode("/fcu/input/mach", 0, "DOUBLE"), + spdPreselect: props.globals.initNode("/fcu/input/spd-preselect", 0, "BOOL"), }; var SidestickPriorityPressedLast = 0; var priorityTimer = 0; @@ -220,7 +221,7 @@ var FCUController = { if (me.FCUworking) { if (fmgc.FMGCInternal.crzSet and fmgc.FMGCInternal.costIndexSet) { fmgc.Custom.Input.spdManaged.setBoolValue(1); - me.spdPreselect = 0; + input.spdPreselect.setBoolValue(nil); spdSelectTimer.stop(); fmgc.ManagedSPD.start(); } @@ -228,13 +229,12 @@ var FCUController = { }, ias: 0, mach: 0, - spdPreselect: 0, SPDPull: func() { if (me.FCUworking) { if (fmgc.Custom.Input.spdManaged.getBoolValue()) { fmgc.Custom.Input.spdManaged.setBoolValue(nil); - if (me.spdPreselect){ - me.spdPreselect = 0; + if (input.spdPreselect.getBoolValue()){ + input.spdPreselect.setBoolValue(nil); spdSelectTimer.stop(); if (fmgc.Input.ktsMach.getBoolValue()){ fmgc.Input.mach.setValue(fcu.input.mach.getValue()); @@ -270,9 +270,9 @@ var FCUController = { # get actual managed speed # get from fmgc when window opens # get from window if window already open - if(!me.spdPreselect) { + if(!input.spdPreselect.getBoolValue()) { # speed preselection on FCU as speed is managed - me.spdPreselect = 1; + input.spdPreselect.setBoolValue(1); me.machTemp = math.clamp(math.round(fmgc.Velocities.indicatedMach.getValue(), 0.01), 0.01, 0.99); } else { me.machTemp = fcu.input.mach.getValue(); @@ -319,9 +319,9 @@ var FCUController = { # get actual managed speed # get from fmgc when window opens # get from window if window already open - if(!me.spdPreselect) { + if(!input.spdPreselect.getBoolValue()) { # speed preselection on FCU as speed is managed - me.spdPreselect = 1; + input.spdPreselect.setBoolValue(1); me.iasTemp = math.clamp(math.round(fmgc.Velocities.indicatedAirspeedKt.getValue()), 100, 399); } else { me.iasTemp = fcu.input.kts.getValue(); @@ -641,7 +641,7 @@ var hdgInput = func { # Selecting speed in managed goes into speed preselection var spdSelectTimer = maketimer(spdPreselectTime, func(){ - FCUController.spdPreselect = 0; + fcu.input.spdPreselect.setBoolValue(nil); print("Setting spdPreselect to 0"); }); spdSelectTimer.singleShot = 1; # timer will only be run once diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index c4a54286..e8db17f5 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -1075,7 +1075,7 @@ var ManagedSPD = maketimer(0.25, func { # Show target speed on FCU # only if in preselection - if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach and !fcu.FCUController.spdPreselect) { + if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach and !fcu.input.spdPreselect.getBoolValue()) { Input.kts.setValue(FMGCInternal.mngSpd); } elsif (Input.mach.getValue() != FMGCInternal.mngSpd and ktsmach) { Input.mach.setValue(FMGCInternal.mngSpd); From e0ced7859d59872e57ad4f28c1d193579ed2113b Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Wed, 20 Dec 2023 19:43:10 +0100 Subject: [PATCH 34/54] fcu speed window corrected todo: if FD1+2 off then revert to selected speed --- Nasal/FMGC/FCU.nas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index b7a948f4..618e7812 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -9,8 +9,8 @@ var athrWarningNode = props.globals.getNode("/it-autoflight/output/athr-warning" var apDiscBtn = props.globals.getNode("/sim/sound/apdiscbtn"); var FCUworkingNode = props.globals.initNode("/FMGC/FCU-working", 0, "BOOL"); var input = { - kts: props.globals.initNode("/fcu/input/kts", 0, "INT"), - mach: props.globals.initNode("/fcu/input/mach", 0, "DOUBLE"), + kts: props.globals.initNode("/fcu/input/kts", 100, "INT"), + mach: props.globals.initNode("/fcu/input/mach", 0.5, "DOUBLE"), spdPreselect: props.globals.initNode("/fcu/input/spd-preselect", 0, "BOOL"), }; var SidestickPriorityPressedLast = 0; From f97616acff7ab2a4bf29aba3e10cb0fa48570272 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Thu, 21 Dec 2023 13:27:18 +0100 Subject: [PATCH 35/54] working commit. adding spd window functionality todo: implement close/open spd window in FCU.nas file, simplifying the a320.flightdeck.xml file --- .gitignore | 1 + Models/FlightDeck/a320.flightdeck.xml | 6 ++++++ Nasal/FMGC/FCU.nas | 17 ++++++++++++----- Nasal/FMGC/FMGC.nas | 18 +++++++++++++++++- Session.vim | 18 +++++++++--------- 5 files changed, 45 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index d0dd3106..5b4eb715 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ MyDevWIP *.swp *.swo .DS_Store +*.vim diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 79e14853..98232dce 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -3194,6 +3194,12 @@ controls/switches/annun-test it-autoflight/input/spd-managed fcu/input/spd-preselect + + + it-autoflight/input/kts + 100 + + diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 618e7812..df0ebeee 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -10,7 +10,7 @@ var apDiscBtn = props.globals.getNode("/sim/sound/apdiscbtn"); var FCUworkingNode = props.globals.initNode("/FMGC/FCU-working", 0, "BOOL"); var input = { kts: props.globals.initNode("/fcu/input/kts", 100, "INT"), - mach: props.globals.initNode("/fcu/input/mach", 0.5, "DOUBLE"), + mach: props.globals.initNode("/fcu/input/mach", 0.01, "DOUBLE"), spdPreselect: props.globals.initNode("/fcu/input/spd-preselect", 0, "BOOL"), }; var SidestickPriorityPressedLast = 0; @@ -52,6 +52,13 @@ var FCUController = { FCU2: nil, activeFMGC: props.globals.getNode("/FMGC/active-fmgc-channel"), FCUworking: 0, + kts: props.globals.initNode("/fcu/input/kts", 100, "INT"), + mach: props.globals.initNode("/fcu/input/mach", 0.01, "DOUBLE"), + spdPreselect: props.globals.initNode("/fcu/input/spd-preselect", 0, "BOOL"), + spdWindowOpen: props.globals.initNode("/fcu/output/spd-window-open", 0, "BOOL"), + spdWindowDot: props.globals.initNode("/fcu/output/spd-window-dot", 0, "BOOL"), + hdgWindowOpen: props.globals.initNode("/fcu/output/hdg-window-open", 0, "BOOL"), + hdgWindowDot: props.globals.initNode("/fcu/output/hdg-window-dot", 0, "BOOL"), _init: 0, init: func() { me.FCU1 = FCU.new(systems.ELEC.Bus.dcEss); @@ -222,7 +229,6 @@ var FCUController = { if (fmgc.FMGCInternal.crzSet and fmgc.FMGCInternal.costIndexSet) { fmgc.Custom.Input.spdManaged.setBoolValue(1); input.spdPreselect.setBoolValue(nil); - spdSelectTimer.stop(); fmgc.ManagedSPD.start(); } } @@ -259,6 +265,8 @@ var FCUController = { me.ias = fcu.input.kts.getValue(); } } + # a selected speed must be available. SPD window can be opened + me.spdWindowOpen.setBoolValue(1); } }, machTemp: nil, @@ -281,9 +289,9 @@ var FCUController = { # timer is started by rotating speed selection knob # and reset by rotating again if (!spdSelectTimer.isRunning){ - spdSelectTimer.start(); + spdSelectTimer.start(); } else { - spdSelectTimer.restart(spdPreselectTime); + spdSelectTimer.restart(spdPreselectTime); } if (d == 1) { @@ -642,7 +650,6 @@ var hdgInput = func { # Selecting speed in managed goes into speed preselection var spdSelectTimer = maketimer(spdPreselectTime, func(){ fcu.input.spdPreselect.setBoolValue(nil); - print("Setting spdPreselect to 0"); }); spdSelectTimer.singleShot = 1; # timer will only be run once diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index e8db17f5..a4d54df2 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -988,9 +988,25 @@ var ktToMach = func(val) { return val * FMGCNodes.ktsToMachFactor.getValue(); } var machToKt = func(val) { return val * FMGCNodes.machToKtsFactor.getValue(); } var ManagedSPD = maketimer(0.25, func { - if (FMGCInternal.crzSet and FMGCInternal.costIndexSet) { + + # for managed speed: + # AP or FD or apporach phase, and one of: + # - on ground v2 + # - SRS TO or SRS GA + # - SPD/MACH knob pressed an managed target avail + # - EXP CLB or EXP DES + # - AP/FD TCAS engaged + # not yet all implemented + + if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and + FMGCInternal.crzSet and FMGCInternal.costIndexSet and FMGCInternal.v2 >= 100) { if (Custom.Input.spdManaged.getBoolValue()) { # Managed Speed + + # FCU speed window can be closed. + # a managed target speed must be available + fcu.FCUController.spdWindowOpen.setBoolValue(nil); + altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue(); ktsmach = Input.ktsMach.getValue(); diff --git a/Session.vim b/Session.vim index f4935787..c17c4632 100644 --- a/Session.vim +++ b/Session.vim @@ -14,16 +14,16 @@ if &shortmess =~ 'A' else set shortmess=aoO endif -badd +316 Nasal/FMGC/FCU.nas -badd +100 Nasal/FMGC/FMGC-b.nas -badd +3158 Models/FlightDeck/a320.flightdeck.xml -badd +1080 Nasal/FMGC/FMGC.nas +badd +644 Nasal/FMGC/FCU.nas +badd +249 Nasal/FMGC/FMGC-b.nas +badd +3196 Models/FlightDeck/a320.flightdeck.xml +badd +1007 Nasal/FMGC/FMGC.nas badd +823 A320-main.xml argglobal %argdel -edit Nasal/FMGC/FMGC.nas +edit Nasal/FMGC/FMGC-b.nas argglobal -balt Models/FlightDeck/a320.flightdeck.xml +balt Nasal/FMGC/FMGC.nas setlocal fdm=marker setlocal fde=0 setlocal fmr={{{,}}} @@ -32,12 +32,12 @@ setlocal fdl=0 setlocal fml=1 setlocal fdn=20 setlocal fen -let s:l = 1080 - ((32 * winheight(0) + 28) / 57) +let s:l = 250 - ((28 * winheight(0) + 28) / 57) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt -keepjumps 1080 -normal! 024| +keepjumps 250 +normal! 07| tabnext 1 if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 silent exe 'bwipe ' . s:wipebuf From f1544a88e66fdba47d03bd7b2bb05018482d9480 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Thu, 21 Dec 2023 21:31:52 +0100 Subject: [PATCH 36/54] startpoint for new managed speed selection todo: remove custom.input.spdManaged -> not needed managed speed stops by itself if not valid --- Nasal/FMGC/FMGC.nas | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index a4d54df2..0ac53885 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -998,15 +998,9 @@ var ManagedSPD = maketimer(0.25, func { # - AP/FD TCAS engaged # not yet all implemented - if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and - FMGCInternal.crzSet and FMGCInternal.costIndexSet and FMGCInternal.v2 >= 100) { + if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and FMGCInternal.crzSet and FMGCInternal.costIndexSet and FMGCInternal.v2 >= 100) { if (Custom.Input.spdManaged.getBoolValue()) { # Managed Speed - - # FCU speed window can be closed. - # a managed target speed must be available - fcu.FCUController.spdWindowOpen.setBoolValue(nil); - altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue(); ktsmach = Input.ktsMach.getValue(); @@ -1089,9 +1083,7 @@ var ManagedSPD = maketimer(0.25, func { Input.ktsMach.setValue(1); } - # Show target speed on FCU - # only if in preselection - if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach and !fcu.input.spdPreselect.getBoolValue()) { + if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach ) { Input.kts.setValue(FMGCInternal.mngSpd); } elsif (Input.mach.getValue() != FMGCInternal.mngSpd and ktsmach) { Input.mach.setValue(FMGCInternal.mngSpd); From fdf1f26ff12d550c0436b5f669f4a4da6cd1ddbf Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Fri, 22 Dec 2023 01:06:22 +0100 Subject: [PATCH 37/54] not working to get back to selected --- Models/FlightDeck/a320.flightdeck.xml | 16 +-- Nasal/FMGC/FCU.nas | 13 +- Nasal/FMGC/FMGC.nas | 197 +++++++++++++------------- Session.vim | 88 ++++++++++-- 4 files changed, 196 insertions(+), 118 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 98232dce..b391ed5a 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -3150,10 +3150,10 @@ FMGC/FCU-working - it-autoflight/input/spd-managed + FMGC/internal/managed-spd-active fcu/input/spd-preselect - it-autoflight/input/spd-managed + FMGC/internal/managed-spd-active @@ -3169,10 +3169,10 @@ FMGC/FCU-working - it-autoflight/input/spd-managed + FMGC/internal/managed-spd-active fcu/input/spd-preselect - it-autoflight/input/spd-managed + FMGC/internal/managed-spd-active @@ -3182,7 +3182,7 @@ select spd.fmgc - it-autoflight/input/spd-managed + FMGC/internal/managed-spd-active @@ -3192,7 +3192,7 @@ controls/switches/annun-test - it-autoflight/input/spd-managed + FMGC/internal/managed-spd-active fcu/input/spd-preselect @@ -6603,7 +6603,7 @@ spd-sel - true + false devices/status/keyboard/shift @@ -6648,7 +6648,7 @@ - true + false nasal diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index df0ebeee..a376837a 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -55,6 +55,7 @@ var FCUController = { kts: props.globals.initNode("/fcu/input/kts", 100, "INT"), mach: props.globals.initNode("/fcu/input/mach", 0.01, "DOUBLE"), spdPreselect: props.globals.initNode("/fcu/input/spd-preselect", 0, "BOOL"), + spdSelected: props.globals.initNode("/fcu/output/spd-selected", 0, "BOOL"), spdWindowOpen: props.globals.initNode("/fcu/output/spd-window-open", 0, "BOOL"), spdWindowDot: props.globals.initNode("/fcu/output/spd-window-dot", 0, "BOOL"), hdgWindowOpen: props.globals.initNode("/fcu/output/hdg-window-open", 0, "BOOL"), @@ -226,11 +227,10 @@ var FCUController = { }, SPDPush: func() { if (me.FCUworking) { - if (fmgc.FMGCInternal.crzSet and fmgc.FMGCInternal.costIndexSet) { - fmgc.Custom.Input.spdManaged.setBoolValue(1); - input.spdPreselect.setBoolValue(nil); - fmgc.ManagedSPD.start(); - } + fmgc.Custom.Input.spdManaged.setBoolValue(1); + input.spdPreselect.setBoolValue(nil); + me.spdSelected.setBoolValue(nil); + fmgc.ManagedSPD.start(); } }, ias: 0, @@ -265,8 +265,11 @@ var FCUController = { me.ias = fcu.input.kts.getValue(); } } + me.spdSelected.setBoolValue(1); # a selected speed must be available. SPD window can be opened me.spdWindowOpen.setBoolValue(1); + + fmgc.ManagedSPD.stop(); } }, machTemp: nil, diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 0ac53885..ab2bd511 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -46,6 +46,8 @@ if (getprop("/options/company-options/default-ga-thrRed-agl") != nil) { var minAccelAlt = getprop("/options/company-options/default-accel-agl"); var minThrRed = getprop("/options/company-options/default-thrRed-agl"); +var mngSpdActive = props.globals.initNode("/FMGC/internal/managed-spd-active", 0, "BOOL"); + setprop("/position/gear-agl-ft", 0); # 1500 ft is a default value not shown anywhere. It may not exist. @@ -67,6 +69,7 @@ var FMGCinit = func { FMGCNodes.vmax.setValue(338); FMGCInternal.phase = 0; # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done FMGCNodes.phase.setValue(0); + mngSpdActive.setBoolValue(nil); FMGCInternal.mngSpd = 157; FMGCInternal.mngSpdCmd = 157; FMGCInternal.mngKtsMach = 0; @@ -245,6 +248,7 @@ var FMGCInternal = { machSwitchover: 0, mngKtsMach: 0, mngSpd: 0, + mngSpdActive: 0, mngSpdCmd: 0, # This can't be init to -98, because we don't want it to run until WOW has gone to false and back to true @@ -998,103 +1002,106 @@ var ManagedSPD = maketimer(0.25, func { # - AP/FD TCAS engaged # not yet all implemented - if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and FMGCInternal.crzSet and FMGCInternal.costIndexSet and FMGCInternal.v2 >= 100) { - if (Custom.Input.spdManaged.getBoolValue()) { - # Managed Speed - altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue(); - ktsmach = Input.ktsMach.getValue(); - - mng_alt_spd = math.round(FMGCNodes.mngSpdAlt.getValue(), 1); - mng_alt_mach = math.round(FMGCNodes.mngMachAlt.getValue(), 0.001); - - # Phase: 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done - if (pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue() > mng_alt_mach and (FMGCInternal.phase == 2 or FMGCInternal.phase == 3)) { - FMGCInternal.machSwitchover = 1; - } elsif (pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue() > mng_alt_spd and (FMGCInternal.phase == 4 or FMGCInternal.phase == 5)) { - FMGCInternal.machSwitchover = 0; - } - - var waypoint = flightPlanController.flightplans[2].getWP(FPLN.currentWP.getValue()); - var constraintSpeed = nil; - - if (waypoint != nil) { - constraintSpeed = flightPlanController.flightplans[2].getWP(FPLN.currentWP.getValue()).speed_cstr; - } - - if ((Modes.PFD.FMA.pitchMode == " " or Modes.PFD.FMA.pitchMode == "SRS") and (FMGCInternal.phase == 0 or FMGCInternal.phase == 1)) { - FMGCInternal.mngKtsMach = 0; - FMGCInternal.mngSpdCmd = FMGCInternal.v2; - } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= FMGCInternal.clbSpdLimAlt) { - # Speed is maximum of greendot / climb speed limit - FMGCInternal.mngKtsMach = 0; - - if (constraintSpeed != nil and constraintSpeed != 0) { - FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(math.min(FMGCInternal.clbSpdLim, constraintSpeed), FMGCInternal.clean, 999); - } else { - FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.clbSpdLim, FMGCInternal.clean, 999); - } - } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > (FMGCInternal.clbSpdLimAlt + 20)) { - FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0; - - if (constraintSpeed != nil and constraintSpeed != 0) { - FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? math.min(mng_alt_mach, ktsToMach(constraintSpeed)) : math.min(mng_alt_spd, constraintSpeed); - } else { - FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd; - } - } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude > (FMGCInternal.desSpdLimAlt + 20)) { - if (FMGCInternal.decel) { - FMGCInternal.mngKtsMach = 0; - FMGCInternal.mngSpdCmd = FMGCInternal.minspeed; - } else { - FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0; - if (constraintSpeed != nil and constraintSpeed != 0) { - FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? math.min(mng_alt_mach, ktsToMach(constraintSpeed)) : math.min(mng_alt_spd, constraintSpeed); - } else { - FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd; - } - } - } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude <= FMGCInternal.desSpdLimAlt) { - # Speed is maximum of greendot / descent speed limit - FMGCInternal.mngKtsMach = 0; - - if (constraintSpeed != nil and constraintSpeed != 0) { - FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(math.min(FMGCInternal.desSpdLim, constraintSpeed), FMGCInternal.clean, 999); - } else { - FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.desSpdLim, FMGCInternal.clean, 999); - } - } - - # Clamp to maneouvering speed of current configuration and maxspeed - # Use minspeed node rather than variable, because we don't want to take GS MINI into account - if (FMGCInternal.phase >= 2) { - if (!FMGCInternal.mngKtsMach) { - FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, FMGCNodes.minspeed.getValue(), FMGCInternal.maxspeed); - } else { - FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, ktToMach(FMGCNodes.minspeed.getValue()), ktToMach(FMGCInternal.maxspeed)); - } - } else { - FMGCInternal.mngSpd = FMGCInternal.mngSpdCmd; - } - - # Update value of ktsMach - if (ktsmach and !FMGCInternal.mngKtsMach) { - Input.ktsMach.setValue(0); - } elsif (!ktsmach and FMGCInternal.mngKtsMach) { - Input.ktsMach.setValue(1); - } - - if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach ) { - Input.kts.setValue(FMGCInternal.mngSpd); - } elsif (Input.mach.getValue() != FMGCInternal.mngSpd and ktsmach) { - Input.mach.setValue(FMGCInternal.mngSpd); - } - } else { - # Selected Speed - ManagedSPD.stop(); - } + # v2 has to be inserted. + if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and FMGCInternal.crzSet and FMGCInternal.costIndexSet and FMGCInternal.v2 >= 100 ) { + # Managed Speed + mngSpdActive.setBoolValue(1); + altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue(); + ktsmach = Input.ktsMach.getValue(); + + mng_alt_spd = math.round(FMGCNodes.mngSpdAlt.getValue(), 1); + mng_alt_mach = math.round(FMGCNodes.mngMachAlt.getValue(), 0.001); + + # Phase: 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done + if (pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue() > mng_alt_mach and (FMGCInternal.phase == 2 or FMGCInternal.phase == 3)) { + FMGCInternal.machSwitchover = 1; + } elsif (pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue() > mng_alt_spd and (FMGCInternal.phase == 4 or FMGCInternal.phase == 5)) { + FMGCInternal.machSwitchover = 0; + } + + var waypoint = flightPlanController.flightplans[2].getWP(FPLN.currentWP.getValue()); + var constraintSpeed = nil; + + if (waypoint != nil) { + constraintSpeed = flightPlanController.flightplans[2].getWP(FPLN.currentWP.getValue()).speed_cstr; + } + + if ((Modes.PFD.FMA.pitchMode == " " or Modes.PFD.FMA.pitchMode == "SRS") and (FMGCInternal.phase == 0 or FMGCInternal.phase == 1)) { + FMGCInternal.mngKtsMach = 0; + FMGCInternal.mngSpdCmd = FMGCInternal.v2; + } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= FMGCInternal.clbSpdLimAlt) { + # Speed is maximum of greendot / climb speed limit + FMGCInternal.mngKtsMach = 0; + + if (constraintSpeed != nil and constraintSpeed != 0) { + FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(math.min(FMGCInternal.clbSpdLim, constraintSpeed), FMGCInternal.clean, 999); + } else { + FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.clbSpdLim, FMGCInternal.clean, 999); + } + } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > (FMGCInternal.clbSpdLimAlt + 20)) { + FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0; + + if (constraintSpeed != nil and constraintSpeed != 0) { + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? math.min(mng_alt_mach, ktsToMach(constraintSpeed)) : math.min(mng_alt_spd, constraintSpeed); + } else { + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd; + } + } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude > (FMGCInternal.desSpdLimAlt + 20)) { + if (FMGCInternal.decel) { + FMGCInternal.mngKtsMach = 0; + FMGCInternal.mngSpdCmd = FMGCInternal.minspeed; + } else { + FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0; + if (constraintSpeed != nil and constraintSpeed != 0) { + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? math.min(mng_alt_mach, ktsToMach(constraintSpeed)) : math.min(mng_alt_spd, constraintSpeed); + } else { + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd; + } + } + } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude <= FMGCInternal.desSpdLimAlt) { + # Speed is maximum of greendot / descent speed limit + FMGCInternal.mngKtsMach = 0; + + if (constraintSpeed != nil and constraintSpeed != 0) { + FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(math.min(FMGCInternal.desSpdLim, constraintSpeed), FMGCInternal.clean, 999); + } else { + FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.desSpdLim, FMGCInternal.clean, 999); + } + } + + # Clamp to maneouvering speed of current configuration and maxspeed + # Use minspeed node rather than variable, because we don't want to take GS MINI into account + if (FMGCInternal.phase >= 2) { + if (!FMGCInternal.mngKtsMach) { + FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, FMGCNodes.minspeed.getValue(), FMGCInternal.maxspeed); + } else { + FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, ktToMach(FMGCNodes.minspeed.getValue()), ktToMach(FMGCInternal.maxspeed)); + } + } else { + FMGCInternal.mngSpd = FMGCInternal.mngSpdCmd; + } + + # Update value of ktsMach + if (ktsmach and !FMGCInternal.mngKtsMach) { + Input.ktsMach.setValue(0); + } elsif (!ktsmach and FMGCInternal.mngKtsMach) { + Input.ktsMach.setValue(1); + } + + if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach ) { + Input.kts.setValue(FMGCInternal.mngSpd); + } elsif (Input.mach.getValue() != FMGCInternal.mngSpd and ktsmach) { + Input.mach.setValue(FMGCInternal.mngSpd); + } } else { + # selected speed out of managed ManagedSPD.stop(); - fcu.FCUController.SPDPull(); + mngSpdActive.setBoolValue(nil); + if (fmgc.Input.ktsMach.getBoolValue()){ + Input.mach.setValue(math.clamp(math.round(fmgc.Velocities.indicatedMach.getValue(), 0.01), 0.01, 0.99)); + } else { + Input.kts.setValue(math.clamp(math.round(fmgc.Velocities.indicatedAirspeedKt.getValue()), 100, 399)); + } } }); diff --git a/Session.vim b/Session.vim index c17c4632..e104b825 100644 --- a/Session.vim +++ b/Session.vim @@ -14,16 +14,34 @@ if &shortmess =~ 'A' else set shortmess=aoO endif -badd +644 Nasal/FMGC/FCU.nas -badd +249 Nasal/FMGC/FMGC-b.nas -badd +3196 Models/FlightDeck/a320.flightdeck.xml -badd +1007 Nasal/FMGC/FMGC.nas -badd +823 A320-main.xml +badd +228 Nasal/FMGC/FCU.nas +badd +84 Nasal/FMGC/FMGC-b.nas +badd +3201 Models/FlightDeck/a320.flightdeck.xml +badd +1059 Nasal/FMGC/FMGC.nas +badd +784 A320-main.xml argglobal %argdel -edit Nasal/FMGC/FMGC-b.nas +edit Nasal/FMGC/FCU.nas +let s:save_splitbelow = &splitbelow +let s:save_splitright = &splitright +set splitbelow splitright +wincmd _ | wincmd | +vsplit +1wincmd h +wincmd w +let &splitbelow = s:save_splitbelow +let &splitright = s:save_splitright +wincmd t +let s:save_winminheight = &winminheight +let s:save_winminwidth = &winminwidth +set winminheight=0 +set winheight=1 +set winminwidth=0 +set winwidth=1 +exe 'vert 1resize ' . ((&columns * 159 + 159) / 319) +exe 'vert 2resize ' . ((&columns * 159 + 159) / 319) argglobal -balt Nasal/FMGC/FMGC.nas +balt A320-main.xml setlocal fdm=marker setlocal fde=0 setlocal fmr={{{,}}} @@ -32,12 +50,60 @@ setlocal fdl=0 setlocal fml=1 setlocal fdn=20 setlocal fen -let s:l = 250 - ((28 * winheight(0) + 28) / 57) +let s:l = 228 - ((29 * winheight(0) + 28) / 57) +if s:l < 1 | let s:l = 1 | endif +keepjumps exe s:l +normal! zt +keepjumps 228 +normal! 026| +wincmd w +argglobal +if bufexists(fnamemodify("Nasal/FMGC/FCU.nas", ":p")) | buffer Nasal/FMGC/FCU.nas | else | edit Nasal/FMGC/FCU.nas | endif +balt Nasal/FMGC/FMGC.nas +setlocal fdm=indent +setlocal fde=0 +setlocal fmr={{{,}}} +setlocal fdi=# +setlocal fdl=0 +setlocal fml=1 +setlocal fdn=20 +setlocal fen +21 +normal! zo +25 +normal! zo +32 +normal! zo +34 +normal! zo +35 +normal! zo +38 +normal! zo +43 +normal! zo +46 +normal! zo +21 +normal! zc +51 +normal! zo +228 +normal! zo +229 +normal! zo +230 +normal! zo +let s:l = 231 - ((121 * winheight(0) + 28) / 57) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt -keepjumps 250 -normal! 07| +keepjumps 231 +normal! 013| +wincmd w +2wincmd w +exe 'vert 1resize ' . ((&columns * 159 + 159) / 319) +exe 'vert 2resize ' . ((&columns * 159 + 159) / 319) tabnext 1 if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 silent exe 'bwipe ' . s:wipebuf @@ -45,6 +111,8 @@ endif unlet! s:wipebuf set winheight=1 winwidth=20 let &shortmess = s:shortmess_save +let &winminheight = s:save_winminheight +let &winminwidth = s:save_winminwidth let s:sx = expand(":p:r")."x.vim" if filereadable(s:sx) exe "source " . fnameescape(s:sx) From 2f618cdc00a371584e2ab9d3a4ea6f83bed47aa3 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Fri, 22 Dec 2023 12:30:40 +0100 Subject: [PATCH 38/54] interim: fms gets into selected when spd pushed todo: check when fcu-spd is reset to selected --- Models/FlightDeck/a320.flightdeck.xml | 4 +- Nasal/FMGC/FCU.nas | 6 +++ Nasal/FMGC/FMGC.nas | 16 ++++++-- Session.vim | 55 --------------------------- 4 files changed, 21 insertions(+), 60 deletions(-) delete mode 100644 Session.vim diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 98232dce..b837f2ad 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -6603,7 +6603,7 @@ spd-sel - true + false devices/status/keyboard/shift @@ -6648,7 +6648,7 @@ - true + false nasal diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index df0ebeee..f0e21be1 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -54,6 +54,7 @@ var FCUController = { FCUworking: 0, kts: props.globals.initNode("/fcu/input/kts", 100, "INT"), mach: props.globals.initNode("/fcu/input/mach", 0.01, "DOUBLE"), + spdSelected: props.globals.initNode("/fcu/output/spd-selected", 0, "BOOL"), spdPreselect: props.globals.initNode("/fcu/input/spd-preselect", 0, "BOOL"), spdWindowOpen: props.globals.initNode("/fcu/output/spd-window-open", 0, "BOOL"), spdWindowDot: props.globals.initNode("/fcu/output/spd-window-dot", 0, "BOOL"), @@ -227,7 +228,9 @@ var FCUController = { SPDPush: func() { if (me.FCUworking) { if (fmgc.FMGCInternal.crzSet and fmgc.FMGCInternal.costIndexSet) { + me.spdSelected.setBoolValue(nil); fmgc.Custom.Input.spdManaged.setBoolValue(1); + fmgc.FMGCNodes.mngSpdActive.setBoolValue(1); input.spdPreselect.setBoolValue(nil); fmgc.ManagedSPD.start(); } @@ -265,6 +268,9 @@ var FCUController = { me.ias = fcu.input.kts.getValue(); } } + + me.spdSelected.setBoolValue(1); + # a selected speed must be available. SPD window can be opened me.spdWindowOpen.setBoolValue(1); } diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 0ac53885..aed79307 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -12,8 +12,6 @@ var arr = ""; var n1_left = 0; var n1_right = 0; var gs = 0; -var state1 = 0; -var state2 = 0; var accel_agl_ft = 0; var fd1 = 0; var fd2 = 0; @@ -303,6 +301,7 @@ var FMGCNodes = { machToKtsFactor: props.globals.getNode("/FMGC/internal/mach-to-kts-factor"), minspeed: props.globals.getNode("/FMGC/internal/minspeed"), mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"), + mngSpdActive: props.globals.initNode("/FMGC/internal/mng-spd-active", 0, "BOOL"), Power: { FMGC1Powered: props.globals.getNode("systems/fmgc/power/power-1-on"), FMGC2Powered: props.globals.getNode("systems/fmgc/power/power-2-on"), @@ -999,8 +998,11 @@ var ManagedSPD = maketimer(0.25, func { # not yet all implemented if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and FMGCInternal.crzSet and FMGCInternal.costIndexSet and FMGCInternal.v2 >= 100) { - if (Custom.Input.spdManaged.getBoolValue()) { + # speed controlled by FCU? + if (fcu.FCUController.spdSelected.getBoolValue()) { # Managed Speed + # speed controlled by FMGC + altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue(); ktsmach = Input.ktsMach.getValue(); @@ -1088,11 +1090,19 @@ var ManagedSPD = maketimer(0.25, func { } elsif (Input.mach.getValue() != FMGCInternal.mngSpd and ktsmach) { Input.mach.setValue(FMGCInternal.mngSpd); } + + # valid managed speed + FMGCNodes.mngSpdActive.setBoolValue(1); + } else { + print("got into selected speed"); # Selected Speed + FMGCNodes.mngSpdActive.setBoolValue(nil); ManagedSPD.stop(); } } else { + print("deactivated by condition not met"); + FMGCNodes.mngSpdActive.setBoolValue(nil); ManagedSPD.stop(); fcu.FCUController.SPDPull(); } diff --git a/Session.vim b/Session.vim deleted file mode 100644 index c17c4632..00000000 --- a/Session.vim +++ /dev/null @@ -1,55 +0,0 @@ -let SessionLoad = 1 -if &cp | set nocp | endif -let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1 -let v:this_session=expand(":p") -silent only -silent tabonly -cd ~/.fgfs/Aircraft/A320-family -if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' - let s:wipebuf = bufnr('%') -endif -let s:shortmess_save = &shortmess -if &shortmess =~ 'A' - set shortmess=aoOA -else - set shortmess=aoO -endif -badd +644 Nasal/FMGC/FCU.nas -badd +249 Nasal/FMGC/FMGC-b.nas -badd +3196 Models/FlightDeck/a320.flightdeck.xml -badd +1007 Nasal/FMGC/FMGC.nas -badd +823 A320-main.xml -argglobal -%argdel -edit Nasal/FMGC/FMGC-b.nas -argglobal -balt Nasal/FMGC/FMGC.nas -setlocal fdm=marker -setlocal fde=0 -setlocal fmr={{{,}}} -setlocal fdi=# -setlocal fdl=0 -setlocal fml=1 -setlocal fdn=20 -setlocal fen -let s:l = 250 - ((28 * winheight(0) + 28) / 57) -if s:l < 1 | let s:l = 1 | endif -keepjumps exe s:l -normal! zt -keepjumps 250 -normal! 07| -tabnext 1 -if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 - silent exe 'bwipe ' . s:wipebuf -endif -unlet! s:wipebuf -set winheight=1 winwidth=20 -let &shortmess = s:shortmess_save -let s:sx = expand(":p:r")."x.vim" -if filereadable(s:sx) - exe "source " . fnameescape(s:sx) -endif -let &g:so = s:so_save | let &g:siso = s:siso_save -doautoall SessionLoadPost -unlet SessionLoad -" vim: set ft=vim : From f42e725d3e2bb607e185c14aa72c482acb28fd53 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Fri, 22 Dec 2023 18:03:39 +0100 Subject: [PATCH 39/54] fmgc logic and fcu working todo: fcu cleanup and spd window --- Nasal/FMGC/FCU.nas | 8 +- Nasal/FMGC/FMGC-b.nas | 1 - Nasal/FMGC/FMGC.nas | 211 +++++++++++++++++++++--------------------- 3 files changed, 112 insertions(+), 108 deletions(-) diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index f0e21be1..e6c80501 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -54,7 +54,8 @@ var FCUController = { FCUworking: 0, kts: props.globals.initNode("/fcu/input/kts", 100, "INT"), mach: props.globals.initNode("/fcu/input/mach", 0.01, "DOUBLE"), - spdSelected: props.globals.initNode("/fcu/output/spd-selected", 0, "BOOL"), + # FCU Speed Modes are 0: undefined 1: selected 2: managed + fcuSpdMode: props.globals.initNode("/fcu/output/spd-mode", 0, "INT"), spdPreselect: props.globals.initNode("/fcu/input/spd-preselect", 0, "BOOL"), spdWindowOpen: props.globals.initNode("/fcu/output/spd-window-open", 0, "BOOL"), spdWindowDot: props.globals.initNode("/fcu/output/spd-window-dot", 0, "BOOL"), @@ -228,9 +229,8 @@ var FCUController = { SPDPush: func() { if (me.FCUworking) { if (fmgc.FMGCInternal.crzSet and fmgc.FMGCInternal.costIndexSet) { - me.spdSelected.setBoolValue(nil); + me.fcuSpdMode.setBoolValue(nil); fmgc.Custom.Input.spdManaged.setBoolValue(1); - fmgc.FMGCNodes.mngSpdActive.setBoolValue(1); input.spdPreselect.setBoolValue(nil); fmgc.ManagedSPD.start(); } @@ -269,7 +269,7 @@ var FCUController = { } } - me.spdSelected.setBoolValue(1); + me.fcuSpdMode.setBoolValue(1); # a selected speed must be available. SPD window can be opened me.spdWindowOpen.setBoolValue(1); diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index a5288efd..c198e9a7 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -1007,7 +1007,6 @@ setlistener("/it-autoflight/input/fd2", func() { ITAF.fd2Master(Input.fd2Temp); } }); - setlistener("/it-autoflight/input/kts-mach", func() { if (Output.vert.getValue() == 7) { # Mach is not allowed in Mode 7, and don't sync diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index aed79307..de9635c3 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -59,6 +59,7 @@ var FMGCAlignTime = [props.globals.initNode("/FMGC/internal/align1-time", 0, "DO var adirsSkip = props.globals.getNode("/systems/acconfig/options/adirs-skip"); var blockCalculating = props.globals.initNode("/FMGC/internal/block-calculating", 0, "BOOL"); var fuelCalculating = props.globals.initNode("/FMGC/internal/fuel-calculating", 0, "BOOL"); +var fmgcSpeedValid = props.globals.initNode("/FMGC/internal/fmgc-speed-valid", 0, "BOOL"); var FMGCinit = func { FMGCInternal.maxspeed = 338; @@ -997,115 +998,119 @@ var ManagedSPD = maketimer(0.25, func { # - AP/FD TCAS engaged # not yet all implemented - if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and FMGCInternal.crzSet and FMGCInternal.costIndexSet and FMGCInternal.v2 >= 100) { - # speed controlled by FCU? - if (fcu.FCUController.spdSelected.getBoolValue()) { - # Managed Speed - # speed controlled by FMGC + if (fcu.FCUController.FCUworking) { + if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and FMGCInternal.crzSet and FMGCInternal.costIndexSet and FMGCInternal.v2 >= 100) { + # speed controlled by FCU? + if (fcu.FCUController.FCUworking and !fcu.FCUController.spdSelected.getBoolValue()) { + # Managed Speed + # speed controlled by FMGC - altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue(); - ktsmach = Input.ktsMach.getValue(); - - mng_alt_spd = math.round(FMGCNodes.mngSpdAlt.getValue(), 1); - mng_alt_mach = math.round(FMGCNodes.mngMachAlt.getValue(), 0.001); - - # Phase: 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done - if (pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue() > mng_alt_mach and (FMGCInternal.phase == 2 or FMGCInternal.phase == 3)) { - FMGCInternal.machSwitchover = 1; - } elsif (pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue() > mng_alt_spd and (FMGCInternal.phase == 4 or FMGCInternal.phase == 5)) { - FMGCInternal.machSwitchover = 0; - } - - var waypoint = flightPlanController.flightplans[2].getWP(FPLN.currentWP.getValue()); - var constraintSpeed = nil; - - if (waypoint != nil) { - constraintSpeed = flightPlanController.flightplans[2].getWP(FPLN.currentWP.getValue()).speed_cstr; - } - - if ((Modes.PFD.FMA.pitchMode == " " or Modes.PFD.FMA.pitchMode == "SRS") and (FMGCInternal.phase == 0 or FMGCInternal.phase == 1)) { - FMGCInternal.mngKtsMach = 0; - FMGCInternal.mngSpdCmd = FMGCInternal.v2; - } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= FMGCInternal.clbSpdLimAlt) { - # Speed is maximum of greendot / climb speed limit - FMGCInternal.mngKtsMach = 0; - - if (constraintSpeed != nil and constraintSpeed != 0) { - FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(math.min(FMGCInternal.clbSpdLim, constraintSpeed), FMGCInternal.clean, 999); - } else { - FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.clbSpdLim, FMGCInternal.clean, 999); - } - } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > (FMGCInternal.clbSpdLimAlt + 20)) { - FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0; - - if (constraintSpeed != nil and constraintSpeed != 0) { - FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? math.min(mng_alt_mach, ktsToMach(constraintSpeed)) : math.min(mng_alt_spd, constraintSpeed); - } else { - FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd; - } - } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude > (FMGCInternal.desSpdLimAlt + 20)) { - if (FMGCInternal.decel) { - FMGCInternal.mngKtsMach = 0; - FMGCInternal.mngSpdCmd = FMGCInternal.minspeed; - } else { - FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0; - if (constraintSpeed != nil and constraintSpeed != 0) { - FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? math.min(mng_alt_mach, ktsToMach(constraintSpeed)) : math.min(mng_alt_spd, constraintSpeed); - } else { - FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd; - } - } - } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude <= FMGCInternal.desSpdLimAlt) { - # Speed is maximum of greendot / descent speed limit - FMGCInternal.mngKtsMach = 0; - - if (constraintSpeed != nil and constraintSpeed != 0) { - FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(math.min(FMGCInternal.desSpdLim, constraintSpeed), FMGCInternal.clean, 999); - } else { - FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.desSpdLim, FMGCInternal.clean, 999); - } - } - - # Clamp to maneouvering speed of current configuration and maxspeed - # Use minspeed node rather than variable, because we don't want to take GS MINI into account - if (FMGCInternal.phase >= 2) { - if (!FMGCInternal.mngKtsMach) { - FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, FMGCNodes.minspeed.getValue(), FMGCInternal.maxspeed); - } else { - FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, ktToMach(FMGCNodes.minspeed.getValue()), ktToMach(FMGCInternal.maxspeed)); - } - } else { - FMGCInternal.mngSpd = FMGCInternal.mngSpdCmd; - } - - # Update value of ktsMach - if (ktsmach and !FMGCInternal.mngKtsMach) { - Input.ktsMach.setValue(0); - } elsif (!ktsmach and FMGCInternal.mngKtsMach) { - Input.ktsMach.setValue(1); - } - - if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach ) { - Input.kts.setValue(FMGCInternal.mngSpd); - } elsif (Input.mach.getValue() != FMGCInternal.mngSpd and ktsmach) { - Input.mach.setValue(FMGCInternal.mngSpd); - } + altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue(); + ktsmach = Input.ktsMach.getValue(); + + mng_alt_spd = math.round(FMGCNodes.mngSpdAlt.getValue(), 1); + mng_alt_mach = math.round(FMGCNodes.mngMachAlt.getValue(), 0.001); + + # Phase: 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done + if (pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue() > mng_alt_mach and (FMGCInternal.phase == 2 or FMGCInternal.phase == 3)) { + FMGCInternal.machSwitchover = 1; + } elsif (pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue() > mng_alt_spd and (FMGCInternal.phase == 4 or FMGCInternal.phase == 5)) { + FMGCInternal.machSwitchover = 0; + } + + var waypoint = flightPlanController.flightplans[2].getWP(FPLN.currentWP.getValue()); + var constraintSpeed = nil; + + if (waypoint != nil) { + constraintSpeed = flightPlanController.flightplans[2].getWP(FPLN.currentWP.getValue()).speed_cstr; + } + + if ((Modes.PFD.FMA.pitchMode == " " or Modes.PFD.FMA.pitchMode == "SRS") and (FMGCInternal.phase == 0 or FMGCInternal.phase == 1)) { + FMGCInternal.mngKtsMach = 0; + FMGCInternal.mngSpdCmd = FMGCInternal.v2; + } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= FMGCInternal.clbSpdLimAlt) { + # Speed is maximum of greendot / climb speed limit + FMGCInternal.mngKtsMach = 0; + + if (constraintSpeed != nil and constraintSpeed != 0) { + FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(math.min(FMGCInternal.clbSpdLim, constraintSpeed), FMGCInternal.clean, 999); + } else { + FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.clbSpdLim, FMGCInternal.clean, 999); + } + } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > (FMGCInternal.clbSpdLimAlt + 20)) { + FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0; + + if (constraintSpeed != nil and constraintSpeed != 0) { + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? math.min(mng_alt_mach, ktsToMach(constraintSpeed)) : math.min(mng_alt_spd, constraintSpeed); + } else { + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd; + } + } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude > (FMGCInternal.desSpdLimAlt + 20)) { + if (FMGCInternal.decel) { + FMGCInternal.mngKtsMach = 0; + FMGCInternal.mngSpdCmd = FMGCInternal.minspeed; + } else { + FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0; + if (constraintSpeed != nil and constraintSpeed != 0) { + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? math.min(mng_alt_mach, ktsToMach(constraintSpeed)) : math.min(mng_alt_spd, constraintSpeed); + } else { + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd; + } + } + } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude <= FMGCInternal.desSpdLimAlt) { + # Speed is maximum of greendot / descent speed limit + FMGCInternal.mngKtsMach = 0; + + if (constraintSpeed != nil and constraintSpeed != 0) { + FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(math.min(FMGCInternal.desSpdLim, constraintSpeed), FMGCInternal.clean, 999); + } else { + FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.desSpdLim, FMGCInternal.clean, 999); + } + } + + # Clamp to maneouvering speed of current configuration and maxspeed + # Use minspeed node rather than variable, because we don't want to take GS MINI into account + if (FMGCInternal.phase >= 2) { + if (!FMGCInternal.mngKtsMach) { + FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, FMGCNodes.minspeed.getValue(), FMGCInternal.maxspeed); + } else { + FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, ktToMach(FMGCNodes.minspeed.getValue()), ktToMach(FMGCInternal.maxspeed)); + } + } else { + FMGCInternal.mngSpd = FMGCInternal.mngSpdCmd; + } + + # Update value of ktsMach + if (ktsmach and !FMGCInternal.mngKtsMach) { + Input.ktsMach.setValue(0); + } elsif (!ktsmach and FMGCInternal.mngKtsMach) { + Input.ktsMach.setValue(1); + } + + if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach ) { + Input.kts.setValue(FMGCInternal.mngSpd); + } elsif (Input.mach.getValue() != FMGCInternal.mngSpd and ktsmach) { + Input.mach.setValue(FMGCInternal.mngSpd); + } - # valid managed speed - FMGCNodes.mngSpdActive.setBoolValue(1); + # valid managed speed + FMGCNodes.mngSpdActive.setBoolValue(1); - } else { - print("got into selected speed"); - # Selected Speed + } else { + # Selected Speed + FMGCNodes.mngSpdActive.setBoolValue(nil); + ManagedSPD.stop(); + } + } else { FMGCNodes.mngSpdActive.setBoolValue(nil); - ManagedSPD.stop(); - } + ManagedSPD.stop(); + fcu.FCUController.SPDPull(); + } } else { - print("deactivated by condition not met"); + # no FCU: speed cannot be controlled FMGCNodes.mngSpdActive.setBoolValue(nil); - ManagedSPD.stop(); - fcu.FCUController.SPDPull(); - } + ManagedSPD.stop(); + } }); # Nav Database From 1ea47e0469795b66f9c655c5ec1af97196d61eb9 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Thu, 28 Dec 2023 22:09:28 +0100 Subject: [PATCH 40/54] separation of mngd spd active and valid todo: display correctly on fcu show dashes and no dot when in done phase --- Nasal/FMGC/FCU.nas | 28 +++++++++++++++++----------- Nasal/FMGC/FMGC.nas | 18 +++++++++++------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index e6c80501..12ae24ee 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -13,6 +13,8 @@ var input = { mach: props.globals.initNode("/fcu/input/mach", 0.01, "DOUBLE"), spdPreselect: props.globals.initNode("/fcu/input/spd-preselect", 0, "BOOL"), }; +var fcuCh1valid = props.globals.initNode("/fcu/fcu-ch1-valid", 0, "BOOL"); +var fcuCh2valid = props.globals.initNode("/fcu/fcu-ch2-valid", 0, "BOOL"); var SidestickPriorityPressedLast = 0; var priorityTimer = 0; var spdPreselectTime = 5; # Preselected Speed stays for 15 secs @@ -55,12 +57,9 @@ var FCUController = { kts: props.globals.initNode("/fcu/input/kts", 100, "INT"), mach: props.globals.initNode("/fcu/input/mach", 0.01, "DOUBLE"), # FCU Speed Modes are 0: undefined 1: selected 2: managed - fcuSpdMode: props.globals.initNode("/fcu/output/spd-mode", 0, "INT"), spdPreselect: props.globals.initNode("/fcu/input/spd-preselect", 0, "BOOL"), spdWindowOpen: props.globals.initNode("/fcu/output/spd-window-open", 0, "BOOL"), spdWindowDot: props.globals.initNode("/fcu/output/spd-window-dot", 0, "BOOL"), - hdgWindowOpen: props.globals.initNode("/fcu/output/hdg-window-open", 0, "BOOL"), - hdgWindowDot: props.globals.initNode("/fcu/output/hdg-window-dot", 0, "BOOL"), _init: 0, init: func() { me.FCU1 = FCU.new(systems.ELEC.Bus.dcEss); @@ -74,6 +73,18 @@ var FCUController = { me.FCU1.loop(notification); me.FCU2.loop(notification); + # set validity for every FCU channel for faults + if (me.FCU1.failed) { + fcuCh1valid.setBoolValue(nil); + } else { + fcuCh1valid.setBoolValue(1); + } + if (me.FCU2.failed) { + fcuCh2valid.setBoolValue(nil); + } else { + fcuCh2valid.setBoolValue(1); + } + if (!me.FCU1.failed or !me.FCU2.failed) { me.FCUworking = 1; FCUworkingNode.setValue(1); @@ -228,12 +239,7 @@ var FCUController = { }, SPDPush: func() { if (me.FCUworking) { - if (fmgc.FMGCInternal.crzSet and fmgc.FMGCInternal.costIndexSet) { - me.fcuSpdMode.setBoolValue(nil); - fmgc.Custom.Input.spdManaged.setBoolValue(1); - input.spdPreselect.setBoolValue(nil); - fmgc.ManagedSPD.start(); - } + fmgc.ManagedSPD.start(); } }, ias: 0, @@ -241,6 +247,8 @@ var FCUController = { SPDPull: func() { if (me.FCUworking) { if (fmgc.Custom.Input.spdManaged.getBoolValue()) { + fmgc.ManagedSPD.stop(); + fmgc.FMGCNodes.mngSpdActive.setBoolValue(nil); fmgc.Custom.Input.spdManaged.setBoolValue(nil); if (input.spdPreselect.getBoolValue()){ input.spdPreselect.setBoolValue(nil); @@ -269,8 +277,6 @@ var FCUController = { } } - me.fcuSpdMode.setBoolValue(1); - # a selected speed must be available. SPD window can be opened me.spdWindowOpen.setBoolValue(1); } diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index de9635c3..06adf4b4 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -999,9 +999,9 @@ var ManagedSPD = maketimer(0.25, func { # not yet all implemented if (fcu.FCUController.FCUworking) { - if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and FMGCInternal.crzSet and FMGCInternal.costIndexSet and FMGCInternal.v2 >= 100) { + if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and FMGCInternal.crzSet and FMGCInternal.costIndexSet) { # speed controlled by FCU? - if (fcu.FCUController.FCUworking and !fcu.FCUController.spdSelected.getBoolValue()) { + if (FMGCInternal.v2 >= 100) { # Managed Speed # speed controlled by FMGC @@ -1095,21 +1095,25 @@ var ManagedSPD = maketimer(0.25, func { # valid managed speed FMGCNodes.mngSpdActive.setBoolValue(1); + fmgc.Custom.Input.spdManaged.setBoolValue(1); } else { - # Selected Speed + # v2 not initialized + # manage speed can remain selected if previously activated + # but it is not active FMGCNodes.mngSpdActive.setBoolValue(nil); - ManagedSPD.stop(); } } else { - FMGCNodes.mngSpdActive.setBoolValue(nil); + # conditions for active managed speed not met ManagedSPD.stop(); - fcu.FCUController.SPDPull(); + FMGCNodes.mngSpdActive.setBoolValue(nil); + fmgc.Custom.Input.spdManaged.setBoolValue(nil); } } else { # no FCU: speed cannot be controlled - FMGCNodes.mngSpdActive.setBoolValue(nil); ManagedSPD.stop(); + FMGCNodes.mngSpdActive.setBoolValue(nil); + fmgc.Custom.Input.spdManaged.setBoolValue(nil); } }); From 0e6ca1c96e8d6e7803ac416664966a908ef647be Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Fri, 29 Dec 2023 19:27:59 +0100 Subject: [PATCH 41/54] working on fcu indication at startup todo: phase transition check (done phase) and redundant variables --- Models/FlightDeck/a320.flightdeck.xml | 11 ++--------- Models/Instruments/MCDU/MCDU.nas | 13 ++++++------- Nasal/FMGC/FCU.nas | 7 ++++++- Nasal/FMGC/FMGC-b.nas | 2 +- Nasal/FMGC/FMGC.nas | 26 +++++++++++++++++++------- 5 files changed, 34 insertions(+), 25 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index b837f2ad..153127d3 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -3182,7 +3182,7 @@ select spd.fmgc - it-autoflight/input/spd-managed + FMGC/internal/mng-spd-active @@ -3192,14 +3192,7 @@ controls/switches/annun-test - it-autoflight/input/spd-managed - fcu/input/spd-preselect - - - it-autoflight/input/kts - 100 - - + fcu/output/spd-window-open diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index dceb7cd0..ff5c2040 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -98,7 +98,6 @@ var flex = props.globals.getNode("/fdm/jsbsim/fadec/limit/flex-temp", 1); var flexSet = props.globals.getNode("/fdm/jsbsim/fadec/limit/flex-active-cmd", 1); var engOutAcc = props.globals.getNode("/FMGC/internal/eng-out-reduc", 1); var engOutAccSet = props.globals.getNode("/MCDUC/reducacc-set", 1); -var managedSpeed = props.globals.getNode("/it-autoflight/input/spd-managed", 1); # CLB PERF var activate_once = props.globals.getNode("/FMGC/internal/activate-once", 1); var activate_twice = props.globals.getNode("/FMGC/internal/activate-twice", 1); @@ -4548,7 +4547,7 @@ var canvas_MCDU_base = { showRightS(me,0, 0, 0, 0, 1, 0); showCenterS(me,0, 0, 0, 0, 1, 0); - if (managedSpeed.getValue() == 1) { + if (fmgc.FMGCNodes.mngSpdActive.getValue() == 1) { showLeft(me,0, 0, 0, -1, 0, 0); showLeftS(me,0, 0, 0, -1, 0, 0); } else { @@ -4599,7 +4598,7 @@ var canvas_MCDU_base = { } me["Simple_L1S"].setText("ACT MODE"); - if (managedSpeed.getValue() == 1) { + if (fmgc.FMGCNodes.mngSpdActive.getValue() == 1) { me["Simple_L1"].setText("MANAGED"); me["Simple_L4"].setText(" [ ]"); } else { @@ -4686,7 +4685,7 @@ var canvas_MCDU_base = { if (fmgc.FMGCInternal.phase == 3) { me["Simple_Title"].setColor(GREEN); - if (managedSpeed.getValue() == 1) { + if (fmgc.FMGCNodes.mngSpdActive.getValue() == 1) { showLeft(me,0, 0, 0, -1, 0, 0); showLeftS(me,0, 0, 0, -1, 0, 0); } else { @@ -4731,7 +4730,7 @@ var canvas_MCDU_base = { } me["Simple_L1S"].setText("ACT MODE"); - if (managedSpeed.getValue() == 1) { + if (fmgc.FMGCNodes.mngSpdActive.getValue() == 1) { me["Simple_L1"].setText("MANAGED"); me["Simple_L4"].setText(" [ ]"); } else { @@ -4821,7 +4820,7 @@ var canvas_MCDU_base = { showRightS(me,0, 0, 1, 0, 0, 0); showCenter(me,0, 1, 0, 1, 1, 0); showCenterS(me,0, 0, 1, 0, 0, 0); - if (managedSpeed.getValue() == 1) { + if (fmgc.FMGCNodes.mngSpdActive.getValue() == 1) { showLeft(me,0, 0, 0, -1, 0, 0); showLeftS(me,0, 0, 0, -1, 0, 0); } else { @@ -4871,7 +4870,7 @@ var canvas_MCDU_base = { } me["Simple_L1S"].setText("ACT MODE"); - if (managedSpeed.getValue() == 1) { + if (fmgc.FMGCNodes.mngSpdActive.getValue() == 1) { me["Simple_L1"].setText("MANAGED"); me["Simple_L4"].setText(" [ ]"); } else { diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 12ae24ee..c7b15f42 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -58,7 +58,7 @@ var FCUController = { mach: props.globals.initNode("/fcu/input/mach", 0.01, "DOUBLE"), # FCU Speed Modes are 0: undefined 1: selected 2: managed spdPreselect: props.globals.initNode("/fcu/input/spd-preselect", 0, "BOOL"), - spdWindowOpen: props.globals.initNode("/fcu/output/spd-window-open", 0, "BOOL"), + spdWindowOpen: props.globals.initNode("/fcu/output/spd-window-open", 1, "BOOL"), spdWindowDot: props.globals.initNode("/fcu/output/spd-window-dot", 0, "BOOL"), _init: 0, init: func() { @@ -285,6 +285,10 @@ var FCUController = { iasTemp: nil, SPDAdjust: func(d) { if (me.FCUworking) { + # window can be opened. it will close if preselect + # timer is over + me.spdWindowOpen.setBoolValue(1); + if (fmgc.Input.ktsMach.getBoolValue()) { if (fmgc.Custom.Input.spdManaged.getBoolValue()) { # get actual managed speed @@ -662,6 +666,7 @@ var hdgInput = func { # Selecting speed in managed goes into speed preselection var spdSelectTimer = maketimer(spdPreselectTime, func(){ fcu.input.spdPreselect.setBoolValue(nil); + fcu.FCUController.spdWindowOpen.setBoolValue(nil); }); spdSelectTimer.singleShot = 1; # timer will only be run once diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index c198e9a7..25a8ca28 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -180,7 +180,7 @@ var Custom = { showHdg: props.globals.initNode("/it-autoflight/custom/show-hdg", 1, "BOOL"), trkFpa: props.globals.initNode("/it-autoflight/custom/trk-fpa", 0, "BOOL"), Input: { - spdManaged: props.globals.getNode("/it-autoflight/input/spd-managed", 1), + spdManaged: props.globals.initNode("/it-autoflight/input/spd-managed", 1, "BOOL"), }, Output: { fmaPower: 0, diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 06adf4b4..a255c8fe 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -649,6 +649,7 @@ var masterFMGC = maketimer(0.2, func { gear0 = pts.Gear.wow[0].getBoolValue(); altSel = Input.alt.getValue(); + # Phase: 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done newphase = FMGCInternal.phase; if (FMGCInternal.phase == 0) { @@ -706,7 +707,13 @@ var masterFMGC = maketimer(0.2, func { if (flightPlanController.decelPoint != nil) { courseDistanceDecel = courseAndDistance(flightPlanController.decelPoint.lat, flightPlanController.decelPoint.lon); - if (flightPlanController.num[2].getValue() > 0 and fmgc.flightPlanController.active.getBoolValue() and flightPlanController.decelPoint != nil and (courseDistanceDecel[1] <= 5 and (math.abs(courseDistanceDecel[0] - pts.Orientation.heading.getValue()) >= 90 and xtrkError <= 5) or courseDistanceDecel[1] <= 0.1) and (Modes.PFD.FMA.rollMode == "NAV" or Modes.PFD.FMA.rollMode == "LOC" or Modes.PFD.FMA.rollMode == "LOC*") and pts.Position.gearAglFt.getValue() < 9500) { + if (flightPlanController.num[2].getValue() > 0 and fmgc.flightPlanController.active.getBoolValue() and + flightPlanController.decelPoint != nil and + (courseDistanceDecel[1] <= 5 and + (math.abs(courseDistanceDecel[0] - pts.Orientation.heading.getValue()) >= 90 and + xtrkError <= 5) or courseDistanceDecel[1] <= 0.1) and + (Modes.PFD.FMA.rollMode == "NAV" or Modes.PFD.FMA.rollMode == "LOC" or Modes.PFD.FMA.rollMode == "LOC*") and + pts.Position.gearAglFt.getValue() < 9500) { FMGCInternal.decel = 1; setprop("/instrumentation/nd/symbols/decel/show", 0); } elsif (FMGCInternal.decel and (FMGCInternal.phase == 0 or FMGCInternal.phase == 6)) { @@ -1001,7 +1008,7 @@ var ManagedSPD = maketimer(0.25, func { if (fcu.FCUController.FCUworking) { if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and FMGCInternal.crzSet and FMGCInternal.costIndexSet) { # speed controlled by FCU? - if (FMGCInternal.v2 >= 100) { + if (fmgc.FMGCInternal.v2set) { # Managed Speed # speed controlled by FMGC @@ -1066,6 +1073,10 @@ var ManagedSPD = maketimer(0.25, func { } else { FMGCInternal.mngSpdCmd = FMGCInternal.decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.desSpdLim, FMGCInternal.clean, 999); } + } elsif (FMGCInternal.phase == 7){ + # done phase. v2 is reset + fmgc.FMGCInternal.v2 = 0; + fmgc.FMGCInternal.v2set = 0; } # Clamp to maneouvering speed of current configuration and maxspeed @@ -1096,21 +1107,22 @@ var ManagedSPD = maketimer(0.25, func { # valid managed speed FMGCNodes.mngSpdActive.setBoolValue(1); fmgc.Custom.Input.spdManaged.setBoolValue(1); + fcu.FCUController.spdWindowOpen.setBoolValue(nil); } else { # v2 not initialized - # manage speed can remain selected if previously activated - # but it is not active + # managed speed can remain engaged if previously activated + # but it is not active controlled by fmgc FMGCNodes.mngSpdActive.setBoolValue(nil); } } else { # conditions for active managed speed not met - ManagedSPD.stop(); - FMGCNodes.mngSpdActive.setBoolValue(nil); - fmgc.Custom.Input.spdManaged.setBoolValue(nil); + # same as pulling speed knob + fcu.FCUController.SPDPull(); } } else { # no FCU: speed cannot be controlled + # no commands to FCU ManagedSPD.stop(); FMGCNodes.mngSpdActive.setBoolValue(nil); fmgc.Custom.Input.spdManaged.setBoolValue(nil); From 8bc0210f2369e725607c3d81724a66ceebd2f074 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Wed, 17 Jan 2024 13:01:00 +0100 Subject: [PATCH 42/54] start to refine FCU spd window --- Nasal/FMGC/FMGC.nas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index a255c8fe..0f6bdcf2 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -1117,8 +1117,8 @@ var ManagedSPD = maketimer(0.25, func { } } else { # conditions for active managed speed not met - # same as pulling speed knob - fcu.FCUController.SPDPull(); + # speed mode can still be managed + FMGCNodes.mngSpdActive.setBoolValue(nil); } } else { # no FCU: speed cannot be controlled From 0e69688fbcc3e8eed36d869f57c35d52cdc80571 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Wed, 17 Jan 2024 20:57:49 +0100 Subject: [PATCH 43/54] selected spd on gnd inhibited --- Models/FlightDeck/a320.flightdeck.xml | 8 +------- Nasal/FMGC/FCU.nas | 7 ++++++- Nasal/FMGC/FMGC.nas | 21 ++++++++++++++++++--- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 153127d3..ae222ab2 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -3148,13 +3148,7 @@ controls/switches/annun-test it-autoflight/input/kts-mach FMGC/FCU-working - - - it-autoflight/input/spd-managed - fcu/input/spd-preselect - - it-autoflight/input/spd-managed - + fcu/output/spd-window-open diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index c7b15f42..96fccaaf 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -247,7 +247,10 @@ var FCUController = { SPDPull: func() { if (me.FCUworking) { if (fmgc.Custom.Input.spdManaged.getBoolValue()) { - fmgc.ManagedSPD.stop(); + # selected spd not possible on gnd + if (!(getprop("/gear/gear[1]/wow") and getprop("/gear/gear[1]/wow"))) { + fmgc.ManagedSPD.stop(); + } fmgc.FMGCNodes.mngSpdActive.setBoolValue(nil); fmgc.Custom.Input.spdManaged.setBoolValue(nil); if (input.spdPreselect.getBoolValue()){ @@ -301,6 +304,7 @@ var FCUController = { } else { me.machTemp = fcu.input.mach.getValue(); } + me.spdWindowOpen.setBoolValue(1); # timer is started by rotating speed selection knob # and reset by rotating again @@ -350,6 +354,7 @@ var FCUController = { } else { me.iasTemp = fcu.input.kts.getValue(); } + me.spdWindowOpen.setBoolValue(1); # timer is started by rotating speed selection knob # and reset by rotating again diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 0f6bdcf2..3d0bccf2 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -344,8 +344,12 @@ var FMGCNodes = { # FBW Trim # ############ +# Reset PITCH TRIM after landing setlistener("/gear/gear[0]/wow", func { - trimReset(); + # TODO set a new listener for pitch less than 2.5 deg for 5sec + timer5trimReset.singleShot = 1; + timer5trimReset.simulatedTime = 1; + timer5trimReset.start(); }, 0, 0); var trimReset = func { @@ -1005,6 +1009,7 @@ var ManagedSPD = maketimer(0.25, func { # - AP/FD TCAS engaged # not yet all implemented + # TODO check if crzSet and costIndexSet is part of condition if (fcu.FCUController.FCUworking) { if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and FMGCInternal.crzSet and FMGCInternal.costIndexSet) { # speed controlled by FCU? @@ -1107,7 +1112,9 @@ var ManagedSPD = maketimer(0.25, func { # valid managed speed FMGCNodes.mngSpdActive.setBoolValue(1); fmgc.Custom.Input.spdManaged.setBoolValue(1); - fcu.FCUController.spdWindowOpen.setBoolValue(nil); + if (!fcu.input.spdPreselect.getBoolValue()) { + fcu.FCUController.spdWindowOpen.setBoolValue(nil); + } } else { # v2 not initialized @@ -1118,7 +1125,11 @@ var ManagedSPD = maketimer(0.25, func { } else { # conditions for active managed speed not met # speed mode can still be managed - FMGCNodes.mngSpdActive.setBoolValue(nil); + if (FMGCInternal.phase > 6) { + FMGCNodes.mngSpdActive.setBoolValue(nil); + } else { + fcu.FCUController.SPDPull(); + } } } else { # no FCU: speed cannot be controlled @@ -1282,3 +1293,7 @@ var timer5fuelPred = maketimer(1, func() { timer5fuelPred.stop(); } }); + +var timer5trimReset = maketimer(5, func() { + trimReset(); +}); From 24ccf98f6e6ef0df9426d731385e37c703c244c5 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 22 Jan 2024 12:15:02 +0100 Subject: [PATCH 44/54] mngSpd triggered by FDs on gnd --- Nasal/FMGC/FCU.nas | 5 +---- Nasal/FMGC/FMGC-b.nas | 10 ++++++++++ Nasal/MCDU/PERFTO.nas | 4 +--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 96fccaaf..130a4c58 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -247,10 +247,7 @@ var FCUController = { SPDPull: func() { if (me.FCUworking) { if (fmgc.Custom.Input.spdManaged.getBoolValue()) { - # selected spd not possible on gnd - if (!(getprop("/gear/gear[1]/wow") and getprop("/gear/gear[1]/wow"))) { - fmgc.ManagedSPD.stop(); - } + fmgc.ManagedSPD.stop(); fmgc.FMGCNodes.mngSpdActive.setBoolValue(nil); fmgc.Custom.Input.spdManaged.setBoolValue(nil); if (input.spdPreselect.getBoolValue()){ diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index 25a8ca28..b0de423b 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -499,6 +499,11 @@ var ITAF = { if (s == 1) { Output.fd1.setBoolValue(1); me.updateFma(); + + # if on ground check if managed speed can be activated + if (FMGCInternal.phase == 0 or (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[1]/wow"))) { + fmgc.ManagedSPD.start(); + } } else { Output.fd1.setBoolValue(0); if (!Output.fd2.getBoolValue()) { @@ -515,6 +520,11 @@ var ITAF = { if (s == 1) { Output.fd2.setBoolValue(1); me.updateFma(); + + # if on ground check if managed speed can be activated + if (FMGCInternal.phase == 0 or (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[1]/wow"))) { + fmgc.ManagedSPD.start(); + } } else { Output.fd2.setBoolValue(0); if (!Output.fd1.getBoolValue()) { diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index eaf181c8..41d3e5e3 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -111,9 +111,7 @@ var perfTOInput = func(key, i) { } } else if (key == "L3" and modifiable) { if (scratchpad == "CLR") { - fmgc.FMGCInternal.v2 = 0; - fmgc.FMGCInternal.v2set = 0; - mcdu_scratchpad.scratchpads[i].empty(); + mcdu_message(i, "NOT ALLOWED"); } else { var tfs = size(scratchpad); if (tfs == 3) { From fcedd11d61a754d5b759ee0f0e7542c2111a6108 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 22 Jan 2024 13:21:13 +0100 Subject: [PATCH 45/54] mng speed triggered by v2 on gnd TODO: mng spd triggered by to/mct --- Nasal/FMGC/FMGC-c.nas | 8 ++++---- Nasal/FMGC/FMGC.nas | 9 +++++++++ Nasal/MCDU/PERFTO.nas | 9 +++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Nasal/FMGC/FMGC-c.nas b/Nasal/FMGC/FMGC-c.nas index 134ef2bd..7859be1e 100644 --- a/Nasal/FMGC/FMGC-c.nas +++ b/Nasal/FMGC/FMGC-c.nas @@ -190,7 +190,7 @@ var loopFMA = maketimer(0.05, func() { engstate2 = pts.Engines.Engine.state[1].getValue(); if (((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and systems.FADEC.manThrAboveMct[0]) or (state2 == "MAN THR" and systems.FADEC.manThrAboveMct[1])))) and (engstate1 == 3 or engstate2 == 3)) { # RWY Engagement would go here, but automatic ILS selection is not simulated yet. - if (FMGCInternal.v2set and Output.vert.getValue() != 7) { + if (FMGCNodes.v2set and Output.vert.getValue() != 7) { ITAF.setVertMode(7); ITAF.updateVertText("T/O CLB"); } @@ -304,7 +304,7 @@ var updateFma = { } else if (vertText == "T/O CLB") { if (Modes.PFD.FMA.pitchMode != "SRS") { setFmaText("pitchMode", "SRS", genericCallback, "pitchModeTime"); - setFmaText("pitchMode2Armed", FMGCInternal.v2set ? "CLB" : " ", genericCallback, "pitchMode2ArmedTime"); + setFmaText("pitchMode2Armed", FMGCNodes.v2set ? "CLB" : " ", genericCallback, "pitchMode2ArmedTime"); } } else if (vertText == "G/A CLB") { setFmaText("pitchMode", "SRS", genericCallback, "pitchModeTime"); @@ -312,7 +312,7 @@ var updateFma = { } else if (vertText == "") { if (Modes.PFD.FMA.pitchMode != " ") { setFmaText("pitchMode", " ", genericCallback, "pitchModeTime"); - setFmaText("pitchMode2Armed", FMGCInternal.v2set ? "CLB" : " ", genericCallback, "pitchMode2ArmedTime"); + setFmaText("pitchMode2Armed", FMGCNodes.v2set ? "CLB" : " ", genericCallback, "pitchMode2ArmedTime"); } } altvert(); @@ -429,4 +429,4 @@ var showAllBoxes = func() { setlistener("/sim/signals/fdm-initialized", func() { fma_init(); -}); \ No newline at end of file +}); diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 3d0bccf2..8ac1b2eb 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -322,6 +322,8 @@ var FMGCNodes = { towVs1gConfFull: props.globals.getNode("/FMGC/internal/lw-vs1g-conf-full"), v1: props.globals.initNode("/FMGC/internal/v1", 0, "DOUBLE"), v1set: props.globals.initNode("/FMGC/internal/v1-set", 0, "BOOL"), + v2: props.globals.initNode("/FMGC/internal/v2", 0, "DOUBLE"), + v2set: props.globals.initNode("/FMGC/internal/v2-set", 0, "BOOL"), phase: props.globals.initNode("/FMGC/internal/phase", 0, "INT"), valphaMax: props.globals.getNode("/FMGC/internal/valpha-max"), valphaProt: props.globals.getNode("/FMGC/internal/valpha-prot"), @@ -1159,6 +1161,13 @@ var switchDatabase = func { navDataBase.standbyDate = tempStoreDate; } +# set managed speed on ground if v2 entered +setlistener("/FMGC/internal/v2-set", func(val) { + if (FMGCInternal.phase == 0 or (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[1]/wow"))) { + fmgc.ManagedSPD.start(); + } +}, 0, 0); + # Landing to phase 7 setlistener("/gear/gear[1]/wow", func(val) { if (val.getValue() == 0 and timer30secLanding.isRunning) { diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index 41d3e5e3..fac1f4c0 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -7,7 +7,7 @@ var doneMessageCheck = 0; var perfToCheckTakeoffData = func(i) { - if (fmgc.FMGCInternal.v1set and fmgc.FMGCInternal.vrset and fmgc.FMGCInternal.v2set) { + if (fmgc.FMGCInternal.v1set and fmgc.FMGCInternal.vrset and fmgc.FMGCNodes.v2set) { if (doneMessageCheck) { mcdu_scratchpad.messageQueues[i].deleteWithText("CHECK TAKE OFF DATA"); } @@ -19,7 +19,7 @@ var perfToCheckTakeoffData = func(i) { var doneMessageDisag = 0; var perfTOCheckVSpeedsConsistency = func(i) { if (fmgc.FMGCInternal.v1set and fmgc.FMGCInternal.vrset and fmgc.FMGCInternal.v2set) { - if (!(fmgc.FMGCInternal.v1 <= fmgc.FMGCInternal.vr and fmgc.FMGCInternal.vr <= fmgc.FMGCInternal.v2)) { + if (!(fmgc.FMGCInternal.v1 <= fmgc.FMGCInternal.vr and fmgc.FMGCInternal.vr <= fmgc.FMGCNodes.v2)) { if (doneMessageDisag) { mcdu_scratchpad.messageQueues[i].deleteWithText("V1/VR/V2 DISAGREE"); } @@ -118,6 +118,11 @@ var perfTOInput = func(key, i) { if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) { fmgc.FMGCInternal.v2 = scratchpad; fmgc.FMGCInternal.v2set = 1; + + # for managed speed enabled + fmgc.FMGCNodes.v2.setValue(scratchpad); + fmgc.FMGCNodes.v2set.setValue(1); + fmgc.setFmaText("pitchMode2Armed", fmgc.FMGCInternal.v2set ? "CLB" : " ", fmgc.genericCallback, "pitchMode2ArmedTime"); mcdu_scratchpad.scratchpads[i].empty(); From 9f633b7c0310c3565b4d8cc4cfd4a83d071c243b Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 22 Jan 2024 15:08:12 +0100 Subject: [PATCH 46/54] before SRS trigger --- Nasal/FMGC/FMGC-c.nas | 6 +++--- Nasal/FMGC/FMGC.nas | 3 +++ Nasal/MCDU/DEPARTURE.nas | 8 +++++++- Nasal/MCDU/MCDU.nas | 6 +++++- Nasal/MCDU/PERFTO.nas | 4 ++-- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Nasal/FMGC/FMGC-c.nas b/Nasal/FMGC/FMGC-c.nas index 7859be1e..161dcf9a 100644 --- a/Nasal/FMGC/FMGC-c.nas +++ b/Nasal/FMGC/FMGC-c.nas @@ -190,7 +190,7 @@ var loopFMA = maketimer(0.05, func() { engstate2 = pts.Engines.Engine.state[1].getValue(); if (((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and systems.FADEC.manThrAboveMct[0]) or (state2 == "MAN THR" and systems.FADEC.manThrAboveMct[1])))) and (engstate1 == 3 or engstate2 == 3)) { # RWY Engagement would go here, but automatic ILS selection is not simulated yet. - if (FMGCNodes.v2set and Output.vert.getValue() != 7) { + if (FMGCInternal.v2set and Output.vert.getValue() != 7) { ITAF.setVertMode(7); ITAF.updateVertText("T/O CLB"); } @@ -304,7 +304,7 @@ var updateFma = { } else if (vertText == "T/O CLB") { if (Modes.PFD.FMA.pitchMode != "SRS") { setFmaText("pitchMode", "SRS", genericCallback, "pitchModeTime"); - setFmaText("pitchMode2Armed", FMGCNodes.v2set ? "CLB" : " ", genericCallback, "pitchMode2ArmedTime"); + setFmaText("pitchMode2Armed", FMGCInternal.v2set ? "CLB" : " ", genericCallback, "pitchMode2ArmedTime"); } } else if (vertText == "G/A CLB") { setFmaText("pitchMode", "SRS", genericCallback, "pitchModeTime"); @@ -312,7 +312,7 @@ var updateFma = { } else if (vertText == "") { if (Modes.PFD.FMA.pitchMode != " ") { setFmaText("pitchMode", " ", genericCallback, "pitchModeTime"); - setFmaText("pitchMode2Armed", FMGCNodes.v2set ? "CLB" : " ", genericCallback, "pitchMode2ArmedTime"); + setFmaText("pitchMode2Armed", FMGCInternal.v2set ? "CLB" : " ", genericCallback, "pitchMode2ArmedTime"); } } altvert(); diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 8ac1b2eb..c6730791 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -303,6 +303,7 @@ var FMGCNodes = { minspeed: props.globals.getNode("/FMGC/internal/minspeed"), mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"), mngSpdActive: props.globals.initNode("/FMGC/internal/mng-spd-active", 0, "BOOL"), + pitchMode: props.globals.initNode("/FMGC/internal/pitch-mode", " " , "STRING"), Power: { FMGC1Powered: props.globals.getNode("systems/fmgc/power/power-1-on"), FMGC2Powered: props.globals.getNode("systems/fmgc/power/power-2-on"), @@ -1084,6 +1085,8 @@ var ManagedSPD = maketimer(0.25, func { # done phase. v2 is reset fmgc.FMGCInternal.v2 = 0; fmgc.FMGCInternal.v2set = 0; + fmgc.FMGCNodes.v2set.setBoolValue(nil); + fmgc.FMGCNodes.v2.setValue(0); } # Clamp to maneouvering speed of current configuration and maxspeed diff --git a/Nasal/MCDU/DEPARTURE.nas b/Nasal/MCDU/DEPARTURE.nas index 24d307a3..76d054e0 100644 --- a/Nasal/MCDU/DEPARTURE.nas +++ b/Nasal/MCDU/DEPARTURE.nas @@ -562,6 +562,10 @@ var departurePage = { if (fmgc.FMGCInternal.v1set) { fmgc.FMGCInternal.v1set = 0; fmgc.FMGCInternal.v1 = 0; + fmgc.FMGCNodes.v1set.setBoolValue(nil); + fmgc.FMGCNodes.v1.setValue(0); + fmgc.FMGCNodes.v2set.setBoolValue(nil); + fmgc.FMGCNodes.v2.setValue(0); } if (fmgc.FMGCInternal.vrset) { fmgc.FMGCInternal.vrset = 0; @@ -570,6 +574,8 @@ var departurePage = { if (fmgc.FMGCInternal.v2set) { fmgc.FMGCInternal.v2set = 0; fmgc.FMGCInternal.v2 = 0; + fmgc.FMGCNodes.v2set.setBoolValue(nil); + fmgc.FMGCNodes.v2.setValue(0); } me.updateRunways(); me.updatePage(); @@ -635,4 +641,4 @@ var departurePage = { mcdu_message(me.computer, "NOT ALLOWED"); } }, -}; \ No newline at end of file +}; diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 0638b9a7..572aa8b4 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -149,10 +149,14 @@ var MCDU_reset = func(i) { #PERF TO fmgc.FMGCInternal.v1 = 0; fmgc.FMGCInternal.v1set = 0; + fmgc.FMGCNodes.v1set.setBoolValue(nil); + fmgc.FMGCNodes.v1.setValue(0); fmgc.FMGCInternal.vr = 0; fmgc.FMGCInternal.vrset = 0; fmgc.FMGCInternal.v2 = 0; fmgc.FMGCInternal.v2set = 0; + fmgc.FMGCNodes.v2set.setBoolValue(nil); + fmgc.FMGCNodes.v2.setValue(0); setprop("/FMGC/internal/accel-agl-ft", 1500); #eventually set to 1500 above runway setprop("/fdm/jsbsim/fadec/clbreduc-ft", 1500); setprop("MCDUC/thracc-set", 0); @@ -1638,4 +1642,4 @@ var screenFlash = func(time, i) { settimer(func { pageNode[i].setValue(page); }, time); -} \ No newline at end of file +} diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index fac1f4c0..62c8838b 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -7,7 +7,7 @@ var doneMessageCheck = 0; var perfToCheckTakeoffData = func(i) { - if (fmgc.FMGCInternal.v1set and fmgc.FMGCInternal.vrset and fmgc.FMGCNodes.v2set) { + if (fmgc.FMGCInternal.v1set and fmgc.FMGCInternal.vrset and fmgc.FMGCInternal.v2set) { if (doneMessageCheck) { mcdu_scratchpad.messageQueues[i].deleteWithText("CHECK TAKE OFF DATA"); } @@ -19,7 +19,7 @@ var perfToCheckTakeoffData = func(i) { var doneMessageDisag = 0; var perfTOCheckVSpeedsConsistency = func(i) { if (fmgc.FMGCInternal.v1set and fmgc.FMGCInternal.vrset and fmgc.FMGCInternal.v2set) { - if (!(fmgc.FMGCInternal.v1 <= fmgc.FMGCInternal.vr and fmgc.FMGCInternal.vr <= fmgc.FMGCNodes.v2)) { + if (!(fmgc.FMGCInternal.v1 <= fmgc.FMGCInternal.vr and fmgc.FMGCInternal.vr <= fmgc.FMGCInternal.v2)) { if (doneMessageDisag) { mcdu_scratchpad.messageQueues[i].deleteWithText("V1/VR/V2 DISAGREE"); } From 9dd59d52020c580ac0965eed6b9feb2aa78fcc7d Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Mon, 22 Jan 2024 17:38:54 +0100 Subject: [PATCH 47/54] Managed speed on gnd as expected. TODO: selected spd only after 5s airborne --- Nasal/FMGC/FMGC-c.nas | 3 +++ Nasal/FMGC/FMGC.nas | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Nasal/FMGC/FMGC-c.nas b/Nasal/FMGC/FMGC-c.nas index 161dcf9a..40aef52e 100644 --- a/Nasal/FMGC/FMGC-c.nas +++ b/Nasal/FMGC/FMGC-c.nas @@ -58,6 +58,9 @@ var Modes = { var setFmaText = func(node, value, callback, timerNode) { if (Modes.PFD.FMA[node] == value) { return; } Modes.PFD.FMA[node] = value; + if (node == "pitchMode") { + fmgc.FMGCNodes.pitchMode.setValue(value); + } call(callback, [node, timerNode]); }; diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index c6730791..14d8a581 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -1163,15 +1163,23 @@ var switchDatabase = func { navDataBase.standbyCode = tempStoreCode; navDataBase.standbyDate = tempStoreDate; } - +################################## +# setlisteners for managed speed # +################################## # set managed speed on ground if v2 entered -setlistener("/FMGC/internal/v2-set", func(val) { +setlistener("/FMGC/internal/v2-set", func() { if (FMGCInternal.phase == 0 or (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[1]/wow"))) { fmgc.ManagedSPD.start(); } }, 0, 0); -# Landing to phase 7 +setlistener("/FMGC/internal/pitch-mode", func() { + if (FMGCNodes.pitchMode.getValue() == "SRS" or FMGCNodes.pitchMode.getValue() == "EXP CLB" + or FMGCNodes.pitchMode.getValue() == "EXP DES" or FMGCNodes.pitchMode.getValue() == "TCAS" ) { + fmgc.ManagedSPD.start(); + } +}, 0, 0); + setlistener("/gear/gear[1]/wow", func(val) { if (val.getValue() == 0 and timer30secLanding.isRunning) { timer30secLanding.stop(); From b047e5d23bda235bba8c88cd55cdda5ccfcdf81c Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Tue, 23 Jan 2024 15:29:54 +0100 Subject: [PATCH 48/54] sel spd inhibit until 5s after lift-off TODO: sel spd disarms on gnd at eng start sel spd not poss. on gnd with engs running and fd on. --- Nasal/FMGC/FCU.nas | 2 +- Nasal/FMGC/FMGC.nas | 47 ++++++++++++++++++++++++++++++++++----------- 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 130a4c58..178fc4d0 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -245,7 +245,7 @@ var FCUController = { ias: 0, mach: 0, SPDPull: func() { - if (me.FCUworking) { + if (me.FCUworking and fmgc.FMGCNodes.selSpdEnable.getBoolValue()) { if (fmgc.Custom.Input.spdManaged.getBoolValue()) { fmgc.ManagedSPD.stop(); fmgc.FMGCNodes.mngSpdActive.setBoolValue(nil); diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 14d8a581..20776ab6 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -308,6 +308,7 @@ var FMGCNodes = { FMGC1Powered: props.globals.getNode("systems/fmgc/power/power-1-on"), FMGC2Powered: props.globals.getNode("systems/fmgc/power/power-2-on"), }, + selSpdEnable: props.globals.initNode("/FMGC/internal/sel-spd-enable", 1, "BOOL"), slat: props.globals.getNode("/FMGC/internal/slat"), toFromSet: props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL"), toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"), @@ -1170,7 +1171,9 @@ var switchDatabase = func { setlistener("/FMGC/internal/v2-set", func() { if (FMGCInternal.phase == 0 or (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[1]/wow"))) { fmgc.ManagedSPD.start(); - } + } else { + me.removelistener(); + } }, 0, 0); setlistener("/FMGC/internal/pitch-mode", func() { @@ -1180,18 +1183,37 @@ setlistener("/FMGC/internal/pitch-mode", func() { } }, 0, 0); -setlistener("/gear/gear[1]/wow", func(val) { - if (val.getValue() == 0 and timer30secLanding.isRunning) { - timer30secLanding.stop(); - FMGCInternal.landingTime = -99; - } - - if (val.getValue() and FMGCInternal.landingTime == -99) { - timer30secLanding.start(); - FMGCInternal.landingTime = pts.Sim.Time.elapsedSec.getValue(); - } +setlistener("/gear/gear[1]/wow", func(val1) { + bothMainWowAfterLanding(); +}, 0, 0); + +setlistener("/gear/gear[2]/wow", func(val2) { + bothMainWowAfterLanding(); }, 0, 0); +var bothMainWowAfterLanding = func () { + if (!fmgc.Gear.wow1.getValue() and !fmgc.Gear.wow2.getValue()) { + # in air + + # enable selected speed + fmgc.FMGCNodes.selSpdEnable.setBoolValue(nil); + timer5selSpdEnable.start(); + + if(timer30secLanding.isRunning) { + timer30secLanding.stop(); + FMGCInternal.landingTime = -99; + + } + } + + if ((Gear.wow1.getValue() or Gear.wow1.getValue()) and FMGCInternal.landingTime == -99) { + timer30secLanding.start(); + FMGCInternal.landingTime = pts.Sim.Time.elapsedSec.getValue(); + + fmgc.FMGCNodes.selSpdEnable.setBoolValue(nil); + } +} + # Align IRS 1 setlistener("/systems/navigation/adr/operating-1", func() { if (timer48gpsAlign1.isRunning) { @@ -1317,3 +1339,6 @@ var timer5fuelPred = maketimer(1, func() { var timer5trimReset = maketimer(5, func() { trimReset(); }); +var timer5selSpdEnable = maketimer(5, func() { + fmgc.FMGCNodes.selSpdEnable.setBoolValue(1); +}); From 71a9b139213e79bd7ead035dfabf358f38034769 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Wed, 24 Jan 2024 12:31:24 +0100 Subject: [PATCH 49/54] sel spd inhibit with one eng running --- Models/FlightDeck/a320.flightdeck.xml | 8 +- Nasal/FMGC/FMGC.nas | 41 +- Session.vim | 1715 ++++++++++++++++++++++++- 3 files changed, 1699 insertions(+), 65 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index ebd24dfd..6050c4b2 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -3161,13 +3161,7 @@ controls/switches/annun-test it-autoflight/input/kts-mach FMGC/FCU-working - - - FMGC/internal/managed-spd-active - fcu/input/spd-preselect - - FMGC/internal/managed-spd-active - + fcu/output/spd-window-open diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 20e46461..0a153ec1 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -1168,6 +1168,7 @@ var switchDatabase = func { navDataBase.standbyCode = tempStoreCode; navDataBase.standbyDate = tempStoreDate; } + ################################## # setlisteners for managed speed # ################################## @@ -1187,20 +1188,23 @@ setlistener("/FMGC/internal/pitch-mode", func() { } }, 0, 0); -setlistener("/gear/gear[1]/wow", func(val1) { - bothMainWowAfterLanding(); -}, 0, 0); - -setlistener("/gear/gear[2]/wow", func(val2) { - bothMainWowAfterLanding(); -}, 0, 0); +################################### +# setlisteners for selected speed # +################################### +setlistener("/ECAM/logic/ground-calc-immediate", func(val) { + if (val.getBoolValue()) { + # on gnd + if (FMGCInternal.landingTime == -99) { + timer30secLanding.start(); + FMGCInternal.landingTime = pts.Sim.Time.elapsedSec.getValue(); -var bothMainWowAfterLanding = func () { - if (!fmgc.Gear.wow1.getValue() and !fmgc.Gear.wow2.getValue()) { + FMGCNodes.selSpdEnable.setBoolValue(1); + bothMainWowAfterLanding(); + } + } else { # in air - - # enable selected speed - fmgc.FMGCNodes.selSpdEnable.setBoolValue(nil); + # enable selected speed after 5 sec + FMGCNodes.selSpdEnable.setBoolValue(0); timer5selSpdEnable.start(); if(timer30secLanding.isRunning) { @@ -1209,14 +1213,15 @@ var bothMainWowAfterLanding = func () { } } - - if ((Gear.wow1.getValue() or Gear.wow1.getValue()) and FMGCInternal.landingTime == -99) { - timer30secLanding.start(); - FMGCInternal.landingTime = pts.Sim.Time.elapsedSec.getValue(); +}, 0, 0); - fmgc.FMGCNodes.selSpdEnable.setBoolValue(nil); +setlistener("/ECAM/phases/phase-calculation/one-engine-running", func(val) { + if (val.getBoolValue()){ + fmgc.FMGCNodes.selSpdEnable.setBoolValue(0); + } else { + fmgc.FMGCNodes.selSpdEnable.setBoolValue(1); } -} +}, 0, 0); # Align IRS 1 setlistener("/systems/navigation/adr/operating-1", func() { diff --git a/Session.vim b/Session.vim index e104b825..f1a07aea 100644 --- a/Session.vim +++ b/Session.vim @@ -1,5 +1,1348 @@ let SessionLoad = 1 if &cp | set nocp | endif +let s:cpo_save=&cpo +set cpo&vim +map! * +inoremap NERDCommenterInsert  :call NERDComment('i', 'insert') +imap S ISurround +imap s Isurround +imap Isurround +inoremap (table-mode-tableize) |:call tablemode#TableizeInsertMode() a +inoremap (fzf-maps-i) :call fzf#vim#maps('i', 0) +inoremap (fzf-complete-buffer-line) fzf#vim#complete#buffer_line() +inoremap (fzf-complete-line) fzf#vim#complete#line() +inoremap (fzf-complete-file-ag) fzf#vim#complete#path('ag -l -g ""') +inoremap (fzf-complete-file) fzf#vim#complete#path("find . -path '*/\.*' -prune -o -type f -print -o -type l -print | sed 's:^..::'") +inoremap (fzf-complete-path) fzf#vim#complete#path("find . -path '*/\.*' -prune -o -print | sed '1d;s:^..::'") +inoremap (fzf-complete-word) fzf#vim#complete#word() +inoremap delimitMateS-BS delimitMate#WithinEmptyPair() ? "\" : "\" +inoremap delimitMateBS =delimitMate#BS() +inoremap (complete_parameter#overload_up) :call cmp#overload_next(0) +inoremap (complete_parameter#overload_down) :call cmp#overload_next(1) +inoremap (complete_parameter#goto_previous_parameter) :call cmp#goto_next_param(0) +inoremap (complete_parameter#goto_next_parameter) :call cmp#goto_next_param(1) +imap % (matchup-c_g%) +inoremap (matchup-c_g%) :call matchup#motion#insert_mode() +imap neosnippet#expandable() ? "\(neosnippet_expand)" : "" +inoremap pumvisible() ? "\\\" : "\" +inoremap pumvisible() ? "\\\" : "\" +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "" +cnoremap repeat('', strchars(getcmdline()) - getcmdpos() + 1) +cnoremap +cnoremap +cnoremap +cnoremap w +inoremap o +inoremap :m .-2 ==gi +inoremap :m .+1 ==gi +map  (SmoothieBackwards) +map  (SmoothieDownwards) +map  (SmoothieForwards) +nnoremap  :call SpaceVim#plugins#ctrlg#display() +xnoremap  >gv +vnoremap  :w +nnoremap  :w +map  (SmoothieUpwards) +nmap  xd [SPC]xd[SPC] +nmap  xa [SPC]xa[SPC] +vmap  [SPC] +nmap  [SPC] +omap % (matchup-%) +xmap % (matchup-%) +nmap % (matchup-%) +xmap , [SPC]l +nmap , [SPC]l +nnoremap , :silent! keeppatterns %substitute/\s\+$//e +nnoremap < <<_ +xnoremap <  >>_ +xnoremap > >gv +imap ¯ neosnippet#expandable() ? "\(neosnippet_expand)" : "" +omap F (clever-f-F) +xmap F (clever-f-F) +nmap F (clever-f-F) +vmap J (jplus) +nmap J (jplus) +map Q gq +xmap S VSurround +omap T (clever-f-T) +xmap T (clever-f-T) +nmap T (clever-f-T) +xmap V (expand_region_shrink) +nnoremap [SPC]ao :call SpaceVim#plugins#todo#list() +omap [% (matchup-[%) +xmap [% (matchup-[%) +nmap [% (matchup-[%) +nnoremap [SPC]as :Startify | doautocmd WinEnter +nnoremap [SPC]ghp :OpenGithubPullReq +nnoremap [SPC]ghI :OpenGithubIssue +nnoremap [SPC]ghf :OpenGithubFile +xnoremap [SPC]ggp :Gista post +nnoremap [SPC]ggp :Gista post +nnoremap [SPC]ggl :Gista list +nmap [SPC]ghv (GitGutterPreviewHunk) +nmap [SPC]ghr (GitGutterUndoHunk) +nmap [SPC]ghs (GitGutterStageHunk) +nnoremap [SPC]gm :Git branch +nnoremap [SPC]gv :Git log +nnoremap [SPC]gV :Git log % +nnoremap [SPC]gb :Git blame +nnoremap [SPC]gA :Git add . +nnoremap [SPC]gd :Git diff +nnoremap [SPC]gp :Git push +nnoremap [SPC]gc :Git commit +nnoremap [SPC]gU :Git reset % +nnoremap [SPC]gS :Git add % +nnoremap [SPC]gs :Git status +nnoremap [SPC]mgf :Gtags -f % +nnoremap [SPC]mgg :exe "Gtags -g " . expand("") +nnoremap [SPC]mgs :exe "Gtags -s " . expand("") +nnoremap [SPC]mgr :exe "Gtags -r " . expand("") +nnoremap [SPC]mgd :exe "Gtags -d " . expand("") +nnoremap [SPC]mgp :Gtags -P +nnoremap [SPC]mgu :GtagsGenerate +nnoremap [SPC]mgc :GtagsGenerate! +nnoremap [SPC]tmT :if &laststatus == 2 | let &laststatus = 0 | else | let &laststatus = 2 | endif +nnoremap [SPC]tmp :call SpaceVim#layers#core#statusline#toggle_section("cursorpos") +nnoremap [SPC]tmt :call SpaceVim#layers#core#statusline#toggle_section("time") +nnoremap [SPC]tmi :call SpaceVim#layers#core#statusline#toggle_section("input method") +nnoremap [SPC]tmd :call SpaceVim#layers#core#statusline#toggle_section("date") +nnoremap [SPC]tmb :call SpaceVim#layers#core#statusline#toggle_section("battery status") +nnoremap [SPC]tmM :call SpaceVim#layers#core#statusline#toggle_section("major mode") +nnoremap [SPC]tmm :call SpaceVim#layers#core#statusline#toggle_section("minor mode lighters") +nmap [SPC]; CommentOperator +xmap [SPC]cP CommentParagraphs +nmap [SPC]cP CommentParagraphs +xmap [SPC]cp CommentParagraphsInvert +nmap [SPC]cp CommentParagraphsInvert +xmap [SPC]cT CommentToLine +nmap [SPC]cT CommentToLine +xmap [SPC]ct CommentToLineInvert +nmap [SPC]ct CommentToLineInvert +xmap [SPC]c$ NERDCommenterToEOL +nmap [SPC]c$ NERDCommenterToEOL +xmap [SPC]cY NERDCommenterYank +nmap [SPC]cY NERDCommenterYank +xmap [SPC]cy CommenterInvertYank +nmap [SPC]cy CommenterInvertYank +xmap [SPC]cs NERDCommenterSexy +nmap [SPC]cs NERDCommenterSexy +xmap [SPC]cv NERDCommenterInvertgv +nmap [SPC]cv NERDCommenterInvertgv +xmap [SPC]cu NERDCommenterUncomment +nmap [SPC]cu NERDCommenterUncomment +xmap [SPC]cL NERDCommenterComment +nmap [SPC]cL NERDCommenterComment +xmap [SPC]cl NERDCommenterInvert +nmap [SPC]cl NERDCommenterInvert +xmap [SPC]ca NERDCommenterAltDelims +nmap [SPC]ca NERDCommenterAltDelims +nnoremap [SPC]qr : +nnoremap [SPC]qR : +nnoremap [SPC]qQ :qa! +nnoremap [SPC]qq :qa +nnoremap [SPC]p/ :Grepper +nnoremap [SPC]pp :call SpaceVim#plugins#projectmanager#list() +nnoremap [SPC]pk :call SpaceVim#plugins#projectmanager#kill_project() +nnoremap [SPC]ptr :call SpaceVim#plugins#runner#run_task(SpaceVim#plugins#tasks#get()) +nnoremap [SPC]ptc :call SpaceVim#plugins#runner#clear_tasks() +nnoremap [SPC]ptl :call SpaceVim#plugins#tasks#list() +nnoremap [SPC]pte :call SpaceVim#plugins#tasks#edit() +nnoremap [SPC]fvd :SPConfig +nnoremap [SPC]fvv :let @+=g:spacevim_version | echo g:spacevim_version +xmap [SPC]fY YankGitRemoteURL +nmap [SPC]fY YankGitRemoteURL +nnoremap [SPC]fy :call SpaceVim#util#CopyToClipboard() +nnoremap [SPC]bt :NERDTree % +nnoremap [SPC]fo :NERDTreeFind +nnoremap [SPC]fT :NERDTree +nnoremap [SPC]ft :NERDTreeToggle +nnoremap [SPC]f/ :call SpaceVim#plugins#find#open() +nnoremap [SPC]fCu :update | e ++ff=dos | setlocal ff=unix | w +nnoremap [SPC]fCd :update | e ++ff=dos | w +nnoremap [SPC]fb :BookmarkShowAll +nnoremap [SPC]bNn :enew +nnoremap [SPC]bNl :rightbelow vertical new +nnoremap [SPC]bNk :new +nnoremap [SPC]bNj :rightbelow new +nnoremap [SPC]bNh :topleft vertical new +nnoremap [SPC]bw :setl readonly! +nnoremap [SPC]bY :normal! ggVG"+y`` +nnoremap [SPC]bP :normal! ggdG"+P +nnoremap [SPC]bh :Startify +nnoremap [SPC]bc :call SpaceVim#mapping#clear_saved_buffers() +nnoremap [SPC]b :call SpaceVim#mapping#kill_buffer_expr() +nnoremap [SPC]b :call SpaceVim#mapping#clear_buffers() +nnoremap [SPC]b :call SpaceVim#mapping#kill_buffer_expr() +nnoremap [SPC]bD :call SpaceVim#mapping#kill_visible_buffer_choosewin() +nnoremap [SPC]bd :call SpaceVim#mapping#close_current_buffer() +nnoremap [SPC]hG :call SpaceVim#plugins#helpgrep#help(expand("")) +nnoremap [SPC]hg :call SpaceVim#plugins#helpgrep#help() +nnoremap [SPC] :try | b# | catch | endtry +nnoremap [SPC]jn i  +nnoremap [SPC]jf  +nnoremap [SPC]jb  +nnoremap [SPC]j$ m`g_ +nnoremap [SPC]j0 m`^ +nnoremap [SPC]hk :LeaderGuide "[KEYs]" +nnoremap [SPC]hL :SPRuntimeLog +nnoremap [SPC]hl :SPLayer -l +nnoremap [SPC]hI :call SpaceVim#issue#report() +nnoremap [SPC]fS :wall +nnoremap [p P +nnoremap [t :tabprevious +nnoremap [l :lprevious +nnoremap [b :bN | stopinsert +nnoremap [e :execute 'move -1-'. v:count1 +nnoremap [ :put! =repeat(nr2char(10), v:count1) +nnoremap [SPC]tW :call SpaceVim#layers#core#statusline#toggle_mode("wrapline") +nnoremap [SPC]tl :setlocal list! +nnoremap [SPC]tP :DelimitMateSwitch +nnoremap [SPC]tp :call SpaceVim#layers#core#statusline#toggle_mode("paste-mode") +nnoremap [SPC]tS :call SpaceVim#layers#core#statusline#toggle_mode("spell-checking") +nnoremap [SPC]tw :call SpaceVim#layers#core#statusline#toggle_mode("whitespace") +nnoremap [SPC]thc :set cursorcolumn! +nnoremap [SPC]tf :call SpaceVim#layers#core#statusline#toggle_mode("fill-column-indicator") +nnoremap [SPC]tt :call SpaceVim#plugins#tabmanager#open() +nnoremap [SPC]ta :call SpaceVim#layers#autocomplete#toggle_deoplete() +nnoremap [SPC]t8 :call SpaceVim#layers#core#statusline#toggle_mode("hi-characters-for-long-lines") +nmap [SPC]jq (easymotion-overwin-line) +nmap [SPC]jw (easymotion-overwin-w) +nmap [SPC]jv (easymotion-overwin-line) +xmap [SPC]jl (better-easymotion-overwin-line) +nmap [SPC]jl (better-easymotion-overwin-line) +nmap [SPC]jJ (easymotion-overwin-f2) +xmap [SPC]jj (better-easymotion-overwin-f) +nmap [SPC]jj (better-easymotion-overwin-f) +nnoremap [SPC]jk j== +nnoremap [SPC]jm :SplitjoinSplit +nnoremap [SPC]jo :SplitjoinJoin +xmap [SPC]xgp (grammarous-move-to-previous-error) +nmap [SPC]xgp (grammarous-move-to-previous-error) +xmap [SPC]xgn (grammarous-move-to-next-error) +nmap [SPC]xgn (grammarous-move-to-next-error) +xmap [SPC]xlU UniquifyCaseSenstiveLines +nmap [SPC]xlU UniquifyCaseSenstiveLines +xmap [SPC]xlu UniquifyIgnoreCaseLines +nmap [SPC]xlu UniquifyIgnoreCaseLines +nnoremap [SPC]xlS :sort +nnoremap [SPC]xls :sort i +xmap [SPC]xlr ReverseLines +nmap [SPC]xlr ReverseLines +xmap [SPC]xld DuplicateLines +nmap [SPC]xld DuplicateLines +vnoremap [SPC]xwc :normal! :'<,'>s/\w\+//gn  +xmap [SPC]x~ ToggleCase +nmap [SPC]x~ ToggleCase +xmap [SPC]xU Uppercase +nmap [SPC]xU Uppercase +xmap [SPC]xu Lowercase +nmap [SPC]xu Lowercase +nnoremap [SPC]xdw :StripWhitespace +xmap [SPC]xa[SPC] :Tabularize /\s\ze\S/l0 +nmap [SPC]xa[SPC] :Tabularize /\s\ze\S/l0 +xnoremap [SPC]xa| :Tabularize /[||] +nnoremap [SPC]xa| :Tabularize /[||] +xnoremap [SPC]xa¦ :Tabularize /¦ +nnoremap [SPC]xa¦ :Tabularize /¦ +xnoremap [SPC]xao :Tabularize /&&\|||\|\.\.\|\*\*\|<<\|>>\|\/\/\|[-+*/.%^><&|?]/l1r1 +nnoremap [SPC]xao :Tabularize /&&\|||\|\.\.\|\*\*\|<<\|>>\|\/\/\|[-+*/.%^><&|?]/l1r1 +xnoremap [SPC]xa= :Tabularize /===\|<=>\|\(&&\|||\|<<\|>>\|\/\/\)=\|=\~[#?]\?\|=>\|[:+/*!%^=><&|.?-]\?=[#?]\?/l1r1 +nnoremap [SPC]xa= :Tabularize /===\|<=>\|\(&&\|||\|<<\|>>\|\/\/\)=\|=\~[#?]\?\|=>\|[:+/*!%^=><&|.?-]\?=[#?]\?/l1r1 +xnoremap [SPC]xa; :Tabularize /; +nnoremap [SPC]xa; :Tabularize /; +xnoremap [SPC]xa: :Tabularize /: +nnoremap [SPC]xa: :Tabularize /: +xnoremap [SPC]xa. :Tabularize /\. +nnoremap [SPC]xa. :Tabularize /\. +xnoremap [SPC]xa, :Tabularize /, +nnoremap [SPC]xa, :Tabularize /, +xnoremap [SPC]xa} :Tabularize /} +nnoremap [SPC]xa} :Tabularize /} +xnoremap [SPC]xa{ :Tabularize /{ +nnoremap [SPC]xa{ :Tabularize /{ +xnoremap [SPC]xa] :Tabularize /] +nnoremap [SPC]xa] :Tabularize /] +xnoremap [SPC]xa[ :Tabularize /[ +nnoremap [SPC]xa[ :Tabularize /[ +xnoremap [SPC]xa) :Tabularize /) +nnoremap [SPC]xa) :Tabularize /) +xnoremap [SPC]xa( :Tabularize /( +nnoremap [SPC]xa( :Tabularize /( +xnoremap [SPC]xa& :Tabularize /& +nnoremap [SPC]xa& :Tabularize /& +xnoremap [SPC]xa% :Tabularize /% +nnoremap [SPC]xa% :Tabularize /% +xnoremap [SPC]xa# :Tabularize /# +nnoremap [SPC]xa# :Tabularize /# +xmap [SPC]xc CountSelectionRegion +nmap [SPC]xc CountSelectionRegion +nnoremap [SPC]bf :Neoformat +nnoremap [SPC]ts :call SpaceVim#layers#core#statusline#toggle_mode("syntax-checking") +nnoremap [SPC]eh : +nnoremap [SPC]xss :NeoSnippetEdit +nnoremap [SPC]hdk :call SpaceVim#plugins#help#describe_key() +nnoremap [SPC]sh :call SpaceVim#plugins#highlight#start(0) +nnoremap [SPC]sH :call SpaceVim#plugins#highlight#start(1) +nnoremap [SPC]sE :call SpaceVim#plugins#iedit#start({"selectall" : 0}) +xmap [SPC]se SpaceVim-plugin-iedit +nmap [SPC]se SpaceVim-plugin-iedit +nnoremap [SPC]sc :call SpaceVim#plugins#searcher#clear() +nnoremap [SPC]s/ :call SpaceVim#plugins#flygrep#open({}) +nnoremap [SPC]stJ :call SpaceVim#plugins#searcher#find(expand(""), "pt") +nnoremap [SPC]stj :call SpaceVim#plugins#searcher#find("", "pt") +nnoremap [SPC]stF :call SpaceVim#mapping#search#grep("t", "F") +nnoremap [SPC]stf :call SpaceVim#mapping#search#grep("t", "f") +nnoremap [SPC]stP :call SpaceVim#mapping#search#grep("t", "P") +nnoremap [SPC]stp :call SpaceVim#mapping#search#grep("t", "p") +nnoremap [SPC]stD :call SpaceVim#mapping#search#grep("t", "D") +nnoremap [SPC]std :call SpaceVim#mapping#search#grep("t", "d") +nnoremap [SPC]stB :call SpaceVim#mapping#search#grep("t", "B") +nnoremap [SPC]stb :call SpaceVim#mapping#search#grep("t", "b") +nnoremap [SPC]siJ :call SpaceVim#plugins#searcher#find(expand(""), "findstr") +nnoremap [SPC]sij :call SpaceVim#plugins#searcher#find("", "findstr") +nnoremap [SPC]siF :call SpaceVim#mapping#search#grep("i", "F") +nnoremap [SPC]sif :call SpaceVim#mapping#search#grep("i", "f") +nnoremap [SPC]siP :call SpaceVim#mapping#search#grep("i", "P") +nnoremap [SPC]sip :call SpaceVim#mapping#search#grep("i", "p") +nnoremap [SPC]siD :call SpaceVim#mapping#search#grep("i", "D") +nnoremap [SPC]sid :call SpaceVim#mapping#search#grep("i", "d") +nnoremap [SPC]siB :call SpaceVim#mapping#search#grep("i", "B") +nnoremap [SPC]sib :call SpaceVim#mapping#search#grep("i", "b") +nnoremap [SPC]srJ :call SpaceVim#plugins#searcher#find(expand(""), "rg") +nnoremap [SPC]srj :call SpaceVim#plugins#searcher#find("", "rg") +nnoremap [SPC]srF :call SpaceVim#mapping#search#grep("r", "F") +nnoremap [SPC]srf :call SpaceVim#mapping#search#grep("r", "f") +nnoremap [SPC]srP :call SpaceVim#mapping#search#grep("r", "P") +nnoremap [SPC]srp :call SpaceVim#mapping#search#grep("r", "p") +nnoremap [SPC]srD :call SpaceVim#mapping#search#grep("r", "D") +nnoremap [SPC]srd :call SpaceVim#mapping#search#grep("r", "d") +nnoremap [SPC]srB :call SpaceVim#mapping#search#grep("r", "B") +nnoremap [SPC]srb :call SpaceVim#mapping#search#grep("r", "b") +nnoremap [SPC]skJ :call SpaceVim#plugins#searcher#find(expand(""), "ack") +nnoremap [SPC]skj :call SpaceVim#plugins#searcher#find("", "ack") +nnoremap [SPC]skF :call SpaceVim#mapping#search#grep("k", "F") +nnoremap [SPC]skf :call SpaceVim#mapping#search#grep("k", "f") +nnoremap [SPC]skP :call SpaceVim#mapping#search#grep("k", "P") +nnoremap [SPC]skp :call SpaceVim#mapping#search#grep("k", "p") +nnoremap [SPC]skD :call SpaceVim#mapping#search#grep("k", "D") +nnoremap [SPC]skd :call SpaceVim#mapping#search#grep("k", "d") +nnoremap [SPC]skB :call SpaceVim#mapping#search#grep("k", "B") +nnoremap [SPC]skb :call SpaceVim#mapping#search#grep("k", "b") +nnoremap [SPC]sGF :call SpaceVim#mapping#search#grep("G", "F") +nnoremap [SPC]sGf :call SpaceVim#mapping#search#grep("G", "f") +nnoremap [SPC]sGP :call SpaceVim#mapping#search#grep("G", "P") +nnoremap [SPC]sGp :call SpaceVim#mapping#search#grep("G", "p") +nnoremap [SPC]sGD :call SpaceVim#mapping#search#grep("G", "D") +nnoremap [SPC]sGd :call SpaceVim#mapping#search#grep("G", "d") +nnoremap [SPC]sGB :call SpaceVim#mapping#search#grep("G", "B") +nnoremap [SPC]sGb :call SpaceVim#mapping#search#grep("G", "b") +nnoremap [SPC]sgJ :call SpaceVim#plugins#searcher#find(expand(""), "grep") +nnoremap [SPC]sgj :call SpaceVim#plugins#searcher#find("", "grep") +nnoremap [SPC]sgF :call SpaceVim#mapping#search#grep("g", "F") +nnoremap [SPC]sgf :call SpaceVim#mapping#search#grep("g", "f") +nnoremap [SPC]sgP :call SpaceVim#mapping#search#grep("g", "P") +nnoremap [SPC]sgp :call SpaceVim#mapping#search#grep("g", "p") +nnoremap [SPC]sgD :call SpaceVim#mapping#search#grep("g", "D") +nnoremap [SPC]sgd :call SpaceVim#mapping#search#grep("g", "d") +nnoremap [SPC]sgB :call SpaceVim#mapping#search#grep("g", "B") +nnoremap [SPC]sgb :call SpaceVim#mapping#search#grep("g", "b") +nnoremap [SPC]saJ :call SpaceVim#plugins#searcher#find(expand(""), "ag") +nnoremap [SPC]saj :call SpaceVim#plugins#searcher#find("", "ag") +nnoremap [SPC]saF :call SpaceVim#mapping#search#grep("a", "F") +nnoremap [SPC]saf :call SpaceVim#mapping#search#grep("a", "f") +nnoremap [SPC]saP :call SpaceVim#mapping#search#grep("a", "P") +nnoremap [SPC]sap :call SpaceVim#mapping#search#grep("a", "p") +nnoremap [SPC]saD :call SpaceVim#mapping#search#grep("a", "D") +nnoremap [SPC]sad :call SpaceVim#mapping#search#grep("a", "d") +nnoremap [SPC]saB :call SpaceVim#mapping#search#grep("a", "B") +nnoremap [SPC]sab :call SpaceVim#mapping#search#grep("a", "b") +nnoremap [SPC]sl :call SpaceVim#plugins#searcher#list() +nnoremap [SPC]sJ :call SpaceVim#plugins#searcher#find(expand(""),SpaceVim#mapping#search#default_tool()[0]) +nnoremap [SPC]sj :call SpaceVim#plugins#searcher#find("", SpaceVim#mapping#search#default_tool()[0]) +nnoremap [SPC]sP :call SpaceVim#plugins#flygrep#open({'input' : expand(""), 'dir' : get(b:, "rootDir", getcwd())}) +nnoremap [SPC]sp :call SpaceVim#plugins#flygrep#open({'input' : input("grep pattern:"), 'dir' : get(b:, "rootDir", getcwd())}) +nnoremap [SPC]sF :call SpaceVim#plugins#flygrep#open({"input" : expand(""), "dir": input("arbitrary dir:", "", "dir")}) +nnoremap [SPC]sf :call SpaceVim#plugins#flygrep#open({"input" : input("grep pattern:"), "dir": input("arbitrary dir:", "", "dir")}) +nnoremap [SPC]sD :call SpaceVim#plugins#flygrep#open({"input" : expand(""), "dir": fnamemodify(expand("%"), ":p:h")}) +nnoremap [SPC]sd :call SpaceVim#plugins#flygrep#open({"input" : input("grep pattern:"), "dir": fnamemodify(expand("%"), ":p:h")}) +nnoremap [SPC]sB :call SpaceVim#plugins#flygrep#open({"input" : expand(""), "files": "@buffers"}) +nnoremap [SPC]sb :call SpaceVim#plugins#flygrep#open({"input" : input("grep pattern:"), "files": "@buffers"}) +nnoremap [SPC]sS :call SpaceVim#plugins#flygrep#open({"input" : expand(""), "files": bufname("%")}) +nnoremap [SPC]ss :call SpaceVim#plugins#flygrep#open({"input" : input("grep pattern:"), "files": bufname("%")}) +nnoremap [SPC]tn :setlocal nonumber! norelativenumber! +nnoremap [SPC]wU :call SpaceVim#plugins#windowsmanager#RedoQuitWin() +nnoremap [SPC]wu :call SpaceVim#plugins#windowsmanager#UndoQuitWin() +nnoremap [SPC]wW :ChooseWin +nnoremap [SPC]ww :wincmd w +nnoremap [SPC]w= :wincmd = +nnoremap [SPC]wV :bel vs +nnoremap [SPC]w3 :silent only | vs | vs | wincmd H +nnoremap [SPC]w2 :silent only | vs | wincmd w +nnoremap [SPC]wS :bel split +nnoremap [SPC]ws :bel split | wincmd w +nnoremap [SPC]w- :bel split | wincmd w +nnoremap [SPC]wv :belowright vsplit | wincmd w +nnoremap [SPC]w/ :belowright vsplit | wincmd w +nnoremap [SPC]wo :tabnext +nnoremap [SPC]wM :execute eval("winnr('$')<=2 ? 'wincmd x' : 'ChooseWinSwap'") +nnoremap [SPC]wL :wincmd L +nnoremap [SPC]wK :wincmd K +nnoremap [SPC]wJ :wincmd J +nnoremap [SPC]wH :wincmd H +nnoremap [SPC]wl :wincmd l +nnoremap [SPC]wk :wincmd k +nnoremap [SPC]wx :wincmd x +nnoremap [SPC]wj :wincmd j +nnoremap [SPC]wh :wincmd h +nnoremap [SPC]wF :tabnew +nnoremap [SPC]wD :ChooseWin | close | wincmd w +nnoremap [SPC]wf :setlocal scrollbind! +nnoremap [SPC]wd :close +nnoremap [SPC]w :wincmd w +nnoremap [SPC]9 :call SpaceVim#layers#core#statusline#jump(9) +nnoremap [SPC]8 :call SpaceVim#layers#core#statusline#jump(8) +nnoremap [SPC]7 :call SpaceVim#layers#core#statusline#jump(7) +nnoremap [SPC]6 :call SpaceVim#layers#core#statusline#jump(6) +nnoremap [SPC]5 :call SpaceVim#layers#core#statusline#jump(5) +nnoremap [SPC]4 :call SpaceVim#layers#core#statusline#jump(4) +nnoremap [SPC]3 :call SpaceVim#layers#core#statusline#jump(3) +nnoremap [SPC]2 :call SpaceVim#layers#core#statusline#jump(2) +nnoremap [SPC]1 :call SpaceVim#layers#core#statusline#jump(1) +vnoremap [SPC] :LeaderGuideVisual ' ' +nnoremap [SPC] :LeaderGuide ' ' +nnoremap [Z] :LeaderGuide "z" +nnoremap [G] :LeaderGuide "g" +nnoremap [Window]c :call SpaceVim#mapping#clear_buffers() +nnoremap [Window]q :call SpaceVim#mapping#close_current_buffer() +nnoremap [Window]Q :close +nnoremap [Window]\ :b# +nnoremap [Window]x :call SpaceVim#mapping#BufferEmpty() +nnoremap [Window]o :only | doautocmd WinEnter +nnoremap [Window]t :tabnew +nnoremap [Window]G :vsplit +bp +nnoremap [Window]g :vsplit +nnoremap [Window]V :split +bp +nnoremap [Window]v :split +nnoremap [Window] :LeaderGuide "s" +xmap \T (table-mode-tableize-delimiter) +xmap \tt (table-mode-tableize) +nmap \tt (table-mode-tableize) +nnoremap \tm :call tablemode#Toggle() +nmap \slr :DBListVar +xmap \sa :DBVarRangeAssign +nmap \sap :'<,'>DBVarRangeAssign +nmap \sal :.,.DBVarRangeAssign +nmap \sas :1,$DBVarRangeAssign +nmap \so DBOrientationToggle +nmap \sh DBHistory +xmap \stcl :exec "DBListColumn '".DB_getVisualBlock()."'" +nmap \stcl DBListColumn +nmap \slv DBListView +nmap \slp DBListProcedure +nmap \slt DBListTable +xmap \slc :exec "DBListColumn '".DB_getVisualBlock()."'" +nmap \slc DBListColumn +nmap \sbp DBPromptForBufferParameters +nmap \sdpa DBDescribeProcedureAskName +xmap \sdp :exec "DBDescribeProcedure '".DB_getVisualBlock()."'" +nmap \sdp DBDescribeProcedure +nmap \sdta DBDescribeTableAskName +xmap \sdt :exec "DBDescribeTable '".DB_getVisualBlock()."'" +nmap \sdt DBDescribeTable +xmap \sT :exec "DBSelectFromTableTopX '".DB_getVisualBlock()."'" +nmap \sT DBSelectFromTopXTable +nmap \sta DBSelectFromTableAskName +nmap \stw DBSelectFromTableWithWhere +xmap \st :exec "DBSelectFromTable '".DB_getVisualBlock()."'" +nmap \st DBSelectFromTable +nmap \sep :'<,'>DBExecRangeSQL +nmap \sel :.,.DBExecRangeSQL +nmap \sea :1,$DBExecRangeSQL +nmap \sq DBExecSQL +nmap \sE DBExecSQLUnderTopXCursor +nmap \se DBExecSQLUnderCursor +xmap \sE DBExecVisualTopXSQL +xmap \se DBExecVisualSQL +map \\ (easymotion-prefix) +nmap \) :call SpaceVim#layers#core#tabline#jump(20) +nmap \( :call SpaceVim#layers#core#tabline#jump(19) +nmap \* :call SpaceVim#layers#core#tabline#jump(18) +nmap \& :call SpaceVim#layers#core#tabline#jump(17) +nmap \^ :call SpaceVim#layers#core#tabline#jump(16) +nmap \% :call SpaceVim#layers#core#tabline#jump(15) +nmap \$ :call SpaceVim#layers#core#tabline#jump(14) +nmap \# :call SpaceVim#layers#core#tabline#jump(13) +nmap \@ :call SpaceVim#layers#core#tabline#jump(12) +nmap \! :call SpaceVim#layers#core#tabline#jump(11) +nmap \0 :call SpaceVim#layers#core#tabline#jump(10) +nmap \9 :call SpaceVim#layers#core#tabline#jump(9) +nmap \8 :call SpaceVim#layers#core#tabline#jump(8) +nmap \7 :call SpaceVim#layers#core#tabline#jump(7) +nmap \6 :call SpaceVim#layers#core#tabline#jump(6) +nmap \5 :call SpaceVim#layers#core#tabline#jump(5) +nmap \4 :call SpaceVim#layers#core#tabline#jump(4) +nmap \3 :call SpaceVim#layers#core#tabline#jump(3) +nmap \2 :call SpaceVim#layers#core#tabline#jump(2) +nmap \1 :call SpaceVim#layers#core#tabline#jump(1) +vnoremap \ :LeaderGuideVisual get(g:, 'mapleader', '\') +nnoremap \ :LeaderGuide get(g:, 'mapleader', '\') +nnoremap \qc :call setqflist([]) +nnoremap \qr q +nnoremap \ql :copen +nnoremap \qp :cprev +nnoremap \qn :cnext +xnoremap \Y :call SpaceVim#plugins#pastebin#paste() +xnoremap \P clipboard#paste('P') +xnoremap \p clipboard#paste('p') +nnoremap \P clipboard#paste('P') +nnoremap \p clipboard#paste('p') +xnoremap \y :call clipboard#yank() +omap ]% (matchup-]%) +xmap ]% (matchup-]%) +nmap ]% (matchup-]%) +nnoremap ]p p +nnoremap ]t :tabnext +nnoremap ]l :lnext +nnoremap ]b :bn | stopinsert +nnoremap ]e :execute 'move +'. v:count1 +nnoremap ] :put =repeat(nr2char(10), v:count1) +vnoremap ] dggP`` +vnoremap ] dGp`` +nnoremap ] ddggP`` +nnoremap ] ddGp`` +omap ae (textobj-entire-a) +xmap ae (textobj-entire-a) +omap a% (matchup-a%) +xmap a% (matchup-a%) +omap ai (textobj-indent-a) +xmap ai (textobj-indent-a) +omap aI (textobj-indent-same-a) +xmap aI (textobj-indent-same-a) +omap al (textobj-line-a) +xmap al (textobj-line-a) +nmap cS CSurround +nmap cs Csurround +nmap ds Dsurround +nmap d(easymotion-prefix)l (easyoperator-line-delete) +omap f (clever-f-f) +xmap f (clever-f-f) +nmap f (clever-f-f) +xmap gS VgSurround +omap g% (matchup-g%) +xmap g% (matchup-g%) +nmap g% (matchup-g%) +vmap gx (openbrowser-smart-search) +nmap gx (openbrowser-smart-search) +vmap gs (openbrowser-search) +vmap go (openbrowser-open) +nnoremap gp '`['.strpart(getregtype(), 0, 1).'`]' +nnoremap g= :call SpaceVim#mapping#format() +nnoremap gd :call SpaceVim#mapping#gd() +nnoremap gD :call SpaceVim#mapping#g_capital_d() +nnoremap g g +nnoremap g g +nnoremap gv gv +nmap gs (openbrowser-search) +nmap go (openbrowser-open) +nnoremap gm gm +nnoremap gg gg +nnoremap ga ga +nnoremap g~ g~ +nnoremap g_ g_ +nnoremap g^ g^ +nnoremap g] g] +nnoremap gt gt +nnoremap gT gT +nnoremap gR gR +nnoremap gq gq +nnoremap gQ gQ +nnoremap gn gn +nnoremap gN gN +nnoremap gJ gJ +nnoremap gi gi +nnoremap gI gI +nnoremap gh gh +nnoremap gH gH +nnoremap gU gU +nnoremap gE gE +nnoremap gu gu +nnoremap gk gk +nnoremap gj gj +nnoremap gF gF +nnoremap gf gf +nnoremap g< g< +nnoremap ge ge +nnoremap g g +nnoremap g0 :tabfirst +nnoremap g g +nnoremap g$ :tablast +nnoremap g@ g@ +nnoremap g; g; +nnoremap g, g, +nnoremap g- g- +nnoremap g+ g+ +nnoremap g` g` +nnoremap g' g' +nnoremap g& g& +nnoremap g g +nnoremap g g +nmap g [G] +nnoremap gr tabpagenr('#') > 0 ? ':exe "tabnext " . tabpagenr("#") ' : '' +omap ie (textobj-entire-i) +xmap ie (textobj-entire-i) +omap i% (matchup-i%) +xmap i% (matchup-i%) +omap ii (textobj-indent-i) +xmap ii (textobj-indent-i) +omap iI (textobj-indent-same-i) +xmap iI (textobj-indent-same-i) +omap il (textobj-line-i) +xmap il (textobj-line-i) +nnoremap q :call SpaceVim#mapping#SmartClose() +nmap s [Window] +omap t (clever-f-t) +xmap t (clever-f-t) +nmap t (clever-f-t) +xmap v (expand_region_expand) +nmap ySS YSsurround +nmap ySs YSsurround +nmap yss Yssurround +nmap yS YSurround +nmap ys Ysurround +nmap y(easymotion-prefix)l (easyoperator-line-yank) +omap z% (matchup-z%) +xmap z% (matchup-z%) +nmap z% (matchup-z%) +nnoremap zx zx +nnoremap zw zw +nnoremap zv zv +nnoremap zt zt +nnoremap zs zs +nnoremap zr zr +nnoremap zo zo +nnoremap zn zn +nnoremap zm zm +nnoremap z zl +nnoremap zl zl +nnoremap zK zkzx +nnoremap zk zk +nnoremap zJ zjzx +nnoremap zj zj +nnoremap zi zi +nnoremap z zh +nnoremap zh zh +nnoremap zg zg +nnoremap zf zf +nnoremap ze ze +nnoremap zd zd +nnoremap zc zc +nnoremap zb zb +nnoremap za za +nnoremap zX zX +nnoremap zW zW +nnoremap zR zR +nnoremap zO zO +nnoremap zN zN +nnoremap zM zM +nnoremap zL zL +nnoremap zH zH +nnoremap zG zG +nnoremap zF zF +nnoremap zE zE +nnoremap zD zD +nnoremap zC zC +nnoremap zA zA +nnoremap z= z= +nnoremap z. z. +nnoremap z^ z^ +nnoremap z- z- +nnoremap z+ z+ +nnoremap z z +nmap z [Z] +nnoremap zz zz +nnoremap (nohlsearch) :nohlsearch +xnoremap NERDCommenterUncomment :call NERDComment("x", "Uncomment") +nnoremap NERDCommenterUncomment :call NERDComment("n", "Uncomment") +xnoremap NERDCommenterAlignBoth :call NERDComment("x", "AlignBoth") +nnoremap NERDCommenterAlignBoth :call NERDComment("n", "AlignBoth") +xnoremap NERDCommenterAlignLeft :call NERDComment("x", "AlignLeft") +nnoremap NERDCommenterAlignLeft :call NERDComment("n", "AlignLeft") +nnoremap NERDCommenterAppend :call NERDComment("n", "Append") +xnoremap NERDCommenterYank :call NERDComment("x", "Yank") +nnoremap NERDCommenterYank :call NERDComment("n", "Yank") +xnoremap NERDCommenterSexy :call NERDComment("x", "Sexy") +nnoremap NERDCommenterSexy :call NERDComment("n", "Sexy") +xnoremap NERDCommenterInvert :call NERDComment("x", "Invert") +nnoremap NERDCommenterInvert :call NERDComment("n", "Invert") +nnoremap NERDCommenterToEOL :call NERDComment("n", "ToEOL") +xnoremap NERDCommenterNested :call NERDComment("x", "Nested") +nnoremap NERDCommenterNested :call NERDComment("n", "Nested") +xnoremap NERDCommenterMinimal :call NERDComment("x", "Minimal") +nnoremap NERDCommenterMinimal :call NERDComment("n", "Minimal") +xnoremap NERDCommenterToggle :call NERDComment("x", "Toggle") +nnoremap NERDCommenterToggle :call NERDComment("n", "Toggle") +xnoremap NERDCommenterComment :call NERDComment("x", "Comment") +nnoremap NERDCommenterComment :call NERDComment("n", "Comment") +noremap (clever-f-repeat-back) clever_f#repeat(1) +noremap (clever-f-repeat-forward) clever_f#repeat(0) +noremap (clever-f-reset) clever_f#reset() +noremap (clever-f-T) clever_f#find_with('T') +noremap (clever-f-t) clever_f#find_with('t') +noremap (clever-f-F) clever_f#find_with('F') +noremap (clever-f-f) clever_f#find_with('f') +nnoremap SurroundRepeat . +nnoremap (table-mode-sort) :call tablemode#spreadsheet#Sort('') +nnoremap (table-mode-eval-formula) :call tablemode#spreadsheet#formula#EvaluateFormulaLine() +nnoremap (table-mode-add-formula) :call tablemode#spreadsheet#formula#Add() +nnoremap (table-mode-insert-column-after) :call tablemode#spreadsheet#InsertColumn(1) +nnoremap (table-mode-insert-column-before) :call tablemode#spreadsheet#InsertColumn(0) +nnoremap (table-mode-delete-column) :call tablemode#spreadsheet#DeleteColumn() +nnoremap (table-mode-delete-row) :call tablemode#spreadsheet#DeleteRow() +xnoremap (table-mode-cell-text-object-i) :call tablemode#spreadsheet#cell#TextObject(1) +xnoremap (table-mode-cell-text-object-a) :call tablemode#spreadsheet#cell#TextObject(0) +onoremap (table-mode-cell-text-object-i) :call tablemode#spreadsheet#cell#TextObject(1) +onoremap (table-mode-cell-text-object-a) :call tablemode#spreadsheet#cell#TextObject(0) +nnoremap (table-mode-motion-right) :call tablemode#spreadsheet#cell#Motion('l') +nnoremap (table-mode-motion-left) :call tablemode#spreadsheet#cell#Motion('h') +nnoremap (table-mode-motion-down) :call tablemode#spreadsheet#cell#Motion('j') +nnoremap (table-mode-motion-up) :call tablemode#spreadsheet#cell#Motion('k') +nnoremap (table-mode-realign) :call tablemode#table#Realign('.') +xnoremap (table-mode-tableize-delimiter) :call tablemode#TableizeByDelimiter() +xnoremap (table-mode-tableize) :Tableize +nnoremap (table-mode-tableize) :Tableize +onoremap (fzf-maps-o) :call fzf#vim#maps('o', 0) +xnoremap (fzf-maps-x) :call fzf#vim#maps('x', 0) +nnoremap (fzf-maps-n) :call fzf#vim#maps('n', 0) +nnoremap (startify-open-buffers) :call startify#open_buffers() +map (easymotion-prefix)N (easymotion-N) +map (easymotion-prefix)n (easymotion-n) +map (easymotion-prefix)k (easymotion-k) +map (easymotion-prefix)j (easymotion-j) +map (easymotion-prefix)gE (easymotion-gE) +map (easymotion-prefix)ge (easymotion-ge) +map (easymotion-prefix)E (easymotion-E) +map (easymotion-prefix)e (easymotion-e) +map (easymotion-prefix)B (easymotion-B) +map (easymotion-prefix)b (easymotion-b) +map (easymotion-prefix)W (easymotion-W) +map (easymotion-prefix)w (easymotion-w) +map (easymotion-prefix)T (easymotion-T) +map (easymotion-prefix)t (easymotion-t) +map (easymotion-prefix)s (easymotion-s) +map (easymotion-prefix)F (easymotion-F) +map (easymotion-prefix)f (easymotion-f) +xnoremap (easymotion-activate) :call EasyMotion#activate(1) +nnoremap (easymotion-activate) :call EasyMotion#activate(0) +snoremap (easymotion-activate) :call EasyMotion#activate(0) +onoremap (easymotion-activate) :call EasyMotion#activate(0) +noremap (easymotion-dotrepeat) :call EasyMotion#DotRepeat() +xnoremap (easymotion-repeat) :call EasyMotion#Repeat(1) +nnoremap (easymotion-repeat) :call EasyMotion#Repeat(0) +snoremap (easymotion-repeat) :call EasyMotion#Repeat(0) +onoremap (easymotion-repeat) :call EasyMotion#Repeat(0) +xnoremap (easymotion-prev) :call EasyMotion#NextPrevious(1,1) +nnoremap (easymotion-prev) :call EasyMotion#NextPrevious(0,1) +snoremap (easymotion-prev) :call EasyMotion#NextPrevious(0,1) +onoremap (easymotion-prev) :call EasyMotion#NextPrevious(0,1) +xnoremap (easymotion-next) :call EasyMotion#NextPrevious(1,0) +nnoremap (easymotion-next) :call EasyMotion#NextPrevious(0,0) +snoremap (easymotion-next) :call EasyMotion#NextPrevious(0,0) +onoremap (easymotion-next) :call EasyMotion#NextPrevious(0,0) +xnoremap (easymotion-wl) :call EasyMotion#WBL(1,0) +nnoremap (easymotion-wl) :call EasyMotion#WBL(0,0) +snoremap (easymotion-wl) :call EasyMotion#WBL(0,0) +onoremap (easymotion-wl) :call EasyMotion#WBL(0,0) +xnoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(1,0) +nnoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(0,0) +snoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(0,0) +onoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(0,0) +xnoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(1,2) +nnoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(0,2) +snoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(0,2) +onoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(0,2) +xnoremap (easymotion-bd-wl) :call EasyMotion#WBL(1,2) +nnoremap (easymotion-bd-wl) :call EasyMotion#WBL(0,2) +snoremap (easymotion-bd-wl) :call EasyMotion#WBL(0,2) +onoremap (easymotion-bd-wl) :call EasyMotion#WBL(0,2) +xnoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(1,1) +nnoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(0,1) +snoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(0,1) +onoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(0,1) +xnoremap (easymotion-bl) :call EasyMotion#WBL(1,1) +nnoremap (easymotion-bl) :call EasyMotion#WBL(0,1) +snoremap (easymotion-bl) :call EasyMotion#WBL(0,1) +onoremap (easymotion-bl) :call EasyMotion#WBL(0,1) +xnoremap (easymotion-el) :call EasyMotion#EL(1,0) +nnoremap (easymotion-el) :call EasyMotion#EL(0,0) +snoremap (easymotion-el) :call EasyMotion#EL(0,0) +onoremap (easymotion-el) :call EasyMotion#EL(0,0) +xnoremap (easymotion-gel) :call EasyMotion#EL(1,1) +nnoremap (easymotion-gel) :call EasyMotion#EL(0,1) +snoremap (easymotion-gel) :call EasyMotion#EL(0,1) +onoremap (easymotion-gel) :call EasyMotion#EL(0,1) +xnoremap (easymotion-bd-el) :call EasyMotion#EL(1,2) +nnoremap (easymotion-bd-el) :call EasyMotion#EL(0,2) +snoremap (easymotion-bd-el) :call EasyMotion#EL(0,2) +onoremap (easymotion-bd-el) :call EasyMotion#EL(0,2) +xnoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(1,2) +nnoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(0,2) +snoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(0,2) +onoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(0,2) +xnoremap (easymotion-vim-n) :call EasyMotion#Search(1,0,1) +nnoremap (easymotion-vim-n) :call EasyMotion#Search(0,0,1) +snoremap (easymotion-vim-n) :call EasyMotion#Search(0,0,1) +onoremap (easymotion-vim-n) :call EasyMotion#Search(0,0,1) +xnoremap (easymotion-n) :call EasyMotion#Search(1,0,0) +nnoremap (easymotion-n) :call EasyMotion#Search(0,0,0) +snoremap (easymotion-n) :call EasyMotion#Search(0,0,0) +onoremap (easymotion-n) :call EasyMotion#Search(0,0,0) +xnoremap (easymotion-bd-n) :call EasyMotion#Search(1,2,0) +nnoremap (easymotion-bd-n) :call EasyMotion#Search(0,2,0) +snoremap (easymotion-bd-n) :call EasyMotion#Search(0,2,0) +onoremap (easymotion-bd-n) :call EasyMotion#Search(0,2,0) +xnoremap (easymotion-vim-N) :call EasyMotion#Search(1,1,1) +nnoremap (easymotion-vim-N) :call EasyMotion#Search(0,1,1) +snoremap (easymotion-vim-N) :call EasyMotion#Search(0,1,1) +onoremap (easymotion-vim-N) :call EasyMotion#Search(0,1,1) +xnoremap (easymotion-N) :call EasyMotion#Search(1,1,0) +nnoremap (easymotion-N) :call EasyMotion#Search(0,1,0) +snoremap (easymotion-N) :call EasyMotion#Search(0,1,0) +onoremap (easymotion-N) :call EasyMotion#Search(0,1,0) +xnoremap (easymotion-eol-j) :call EasyMotion#Eol(1,0) +nnoremap (easymotion-eol-j) :call EasyMotion#Eol(0,0) +snoremap (easymotion-eol-j) :call EasyMotion#Eol(0,0) +onoremap (easymotion-eol-j) :call EasyMotion#Eol(0,0) +xnoremap (easymotion-sol-k) :call EasyMotion#Sol(1,1) +nnoremap (easymotion-sol-k) :call EasyMotion#Sol(0,1) +snoremap (easymotion-sol-k) :call EasyMotion#Sol(0,1) +onoremap (easymotion-sol-k) :call EasyMotion#Sol(0,1) +xnoremap (easymotion-sol-j) :call EasyMotion#Sol(1,0) +nnoremap (easymotion-sol-j) :call EasyMotion#Sol(0,0) +snoremap (easymotion-sol-j) :call EasyMotion#Sol(0,0) +onoremap (easymotion-sol-j) :call EasyMotion#Sol(0,0) +xnoremap (easymotion-k) :call EasyMotion#JK(1,1) +nnoremap (easymotion-k) :call EasyMotion#JK(0,1) +snoremap (easymotion-k) :call EasyMotion#JK(0,1) +onoremap (easymotion-k) :call EasyMotion#JK(0,1) +xnoremap (easymotion-j) :call EasyMotion#JK(1,0) +nnoremap (easymotion-j) :call EasyMotion#JK(0,0) +snoremap (easymotion-j) :call EasyMotion#JK(0,0) +onoremap (easymotion-j) :call EasyMotion#JK(0,0) +xnoremap (easymotion-bd-jk) :call EasyMotion#JK(1,2) +nnoremap (easymotion-bd-jk) :call EasyMotion#JK(0,2) +snoremap (easymotion-bd-jk) :call EasyMotion#JK(0,2) +onoremap (easymotion-bd-jk) :call EasyMotion#JK(0,2) +xnoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(1,2) +nnoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(0,2) +snoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(0,2) +onoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(0,2) +xnoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(1,2) +nnoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(0,2) +snoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(0,2) +onoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(0,2) +xnoremap (easymotion-eol-k) :call EasyMotion#Eol(1,1) +nnoremap (easymotion-eol-k) :call EasyMotion#Eol(0,1) +snoremap (easymotion-eol-k) :call EasyMotion#Eol(0,1) +onoremap (easymotion-eol-k) :call EasyMotion#Eol(0,1) +xnoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(1,1) +nnoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(0,1) +snoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(0,1) +onoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(0,1) +xnoremap (easymotion-w) :call EasyMotion#WB(1,0) +nnoremap (easymotion-w) :call EasyMotion#WB(0,0) +snoremap (easymotion-w) :call EasyMotion#WB(0,0) +onoremap (easymotion-w) :call EasyMotion#WB(0,0) +xnoremap (easymotion-bd-W) :call EasyMotion#WBW(1,2) +nnoremap (easymotion-bd-W) :call EasyMotion#WBW(0,2) +snoremap (easymotion-bd-W) :call EasyMotion#WBW(0,2) +onoremap (easymotion-bd-W) :call EasyMotion#WBW(0,2) +xnoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(1,0) +nnoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(0,0) +snoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(0,0) +onoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(0,0) +xnoremap (easymotion-gE) :call EasyMotion#EW(1,1) +nnoremap (easymotion-gE) :call EasyMotion#EW(0,1) +snoremap (easymotion-gE) :call EasyMotion#EW(0,1) +onoremap (easymotion-gE) :call EasyMotion#EW(0,1) +xnoremap (easymotion-e) :call EasyMotion#E(1,0) +nnoremap (easymotion-e) :call EasyMotion#E(0,0) +snoremap (easymotion-e) :call EasyMotion#E(0,0) +onoremap (easymotion-e) :call EasyMotion#E(0,0) +xnoremap (easymotion-bd-E) :call EasyMotion#EW(1,2) +nnoremap (easymotion-bd-E) :call EasyMotion#EW(0,2) +snoremap (easymotion-bd-E) :call EasyMotion#EW(0,2) +onoremap (easymotion-bd-E) :call EasyMotion#EW(0,2) +xnoremap (easymotion-iskeyword-e) :call EasyMotion#EK(1,0) +nnoremap (easymotion-iskeyword-e) :call EasyMotion#EK(0,0) +snoremap (easymotion-iskeyword-e) :call EasyMotion#EK(0,0) +onoremap (easymotion-iskeyword-e) :call EasyMotion#EK(0,0) +xnoremap (easymotion-b) :call EasyMotion#WB(1,1) +nnoremap (easymotion-b) :call EasyMotion#WB(0,1) +snoremap (easymotion-b) :call EasyMotion#WB(0,1) +onoremap (easymotion-b) :call EasyMotion#WB(0,1) +xnoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(1,1) +nnoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(0,1) +snoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(0,1) +onoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(0,1) +xnoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(1,2) +nnoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(0,2) +snoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(0,2) +onoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(0,2) +xnoremap (easymotion-W) :call EasyMotion#WBW(1,0) +nnoremap (easymotion-W) :call EasyMotion#WBW(0,0) +snoremap (easymotion-W) :call EasyMotion#WBW(0,0) +onoremap (easymotion-W) :call EasyMotion#WBW(0,0) +xnoremap (easymotion-bd-w) :call EasyMotion#WB(1,2) +nnoremap (easymotion-bd-w) :call EasyMotion#WB(0,2) +snoremap (easymotion-bd-w) :call EasyMotion#WB(0,2) +onoremap (easymotion-bd-w) :call EasyMotion#WB(0,2) +xnoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(1,2) +nnoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(0,2) +snoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(0,2) +onoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(0,2) +xnoremap (easymotion-ge) :call EasyMotion#E(1,1) +nnoremap (easymotion-ge) :call EasyMotion#E(0,1) +snoremap (easymotion-ge) :call EasyMotion#E(0,1) +onoremap (easymotion-ge) :call EasyMotion#E(0,1) +xnoremap (easymotion-E) :call EasyMotion#EW(1,0) +nnoremap (easymotion-E) :call EasyMotion#EW(0,0) +snoremap (easymotion-E) :call EasyMotion#EW(0,0) +onoremap (easymotion-E) :call EasyMotion#EW(0,0) +xnoremap (easymotion-bd-e) :call EasyMotion#E(1,2) +nnoremap (easymotion-bd-e) :call EasyMotion#E(0,2) +snoremap (easymotion-bd-e) :call EasyMotion#E(0,2) +onoremap (easymotion-bd-e) :call EasyMotion#E(0,2) +xnoremap (easymotion-B) :call EasyMotion#WBW(1,1) +nnoremap (easymotion-B) :call EasyMotion#WBW(0,1) +snoremap (easymotion-B) :call EasyMotion#WBW(0,1) +onoremap (easymotion-B) :call EasyMotion#WBW(0,1) +nnoremap (easymotion-overwin-w) :call EasyMotion#overwin#w() +nnoremap (easymotion-overwin-line) :call EasyMotion#overwin#line() +nnoremap (easymotion-overwin-f2) :call EasyMotion#OverwinF(2) +nnoremap (easymotion-overwin-f) :call EasyMotion#OverwinF(1) +xnoremap (easymotion-Tln) :call EasyMotion#TL(-1,1,1) +nnoremap (easymotion-Tln) :call EasyMotion#TL(-1,0,1) +snoremap (easymotion-Tln) :call EasyMotion#TL(-1,0,1) +onoremap (easymotion-Tln) :call EasyMotion#TL(-1,0,1) +xnoremap (easymotion-t2) :call EasyMotion#T(2,1,0) +nnoremap (easymotion-t2) :call EasyMotion#T(2,0,0) +snoremap (easymotion-t2) :call EasyMotion#T(2,0,0) +onoremap (easymotion-t2) :call EasyMotion#T(2,0,0) +xnoremap (easymotion-t) :call EasyMotion#T(1,1,0) +nnoremap (easymotion-t) :call EasyMotion#T(1,0,0) +snoremap (easymotion-t) :call EasyMotion#T(1,0,0) +onoremap (easymotion-t) :call EasyMotion#T(1,0,0) +xnoremap (easymotion-s) :call EasyMotion#S(1,1,2) +nnoremap (easymotion-s) :call EasyMotion#S(1,0,2) +snoremap (easymotion-s) :call EasyMotion#S(1,0,2) +onoremap (easymotion-s) :call EasyMotion#S(1,0,2) +xnoremap (easymotion-tn) :call EasyMotion#T(-1,1,0) +nnoremap (easymotion-tn) :call EasyMotion#T(-1,0,0) +snoremap (easymotion-tn) :call EasyMotion#T(-1,0,0) +onoremap (easymotion-tn) :call EasyMotion#T(-1,0,0) +xnoremap (easymotion-bd-t2) :call EasyMotion#T(2,1,2) +nnoremap (easymotion-bd-t2) :call EasyMotion#T(2,0,2) +snoremap (easymotion-bd-t2) :call EasyMotion#T(2,0,2) +onoremap (easymotion-bd-t2) :call EasyMotion#T(2,0,2) +xnoremap (easymotion-tl) :call EasyMotion#TL(1,1,0) +nnoremap (easymotion-tl) :call EasyMotion#TL(1,0,0) +snoremap (easymotion-tl) :call EasyMotion#TL(1,0,0) +onoremap (easymotion-tl) :call EasyMotion#TL(1,0,0) +xnoremap (easymotion-bd-tn) :call EasyMotion#T(-1,1,2) +nnoremap (easymotion-bd-tn) :call EasyMotion#T(-1,0,2) +snoremap (easymotion-bd-tn) :call EasyMotion#T(-1,0,2) +onoremap (easymotion-bd-tn) :call EasyMotion#T(-1,0,2) +xnoremap (easymotion-fn) :call EasyMotion#S(-1,1,0) +nnoremap (easymotion-fn) :call EasyMotion#S(-1,0,0) +snoremap (easymotion-fn) :call EasyMotion#S(-1,0,0) +onoremap (easymotion-fn) :call EasyMotion#S(-1,0,0) +xnoremap (easymotion-bd-tl) :call EasyMotion#TL(1,1,2) +nnoremap (easymotion-bd-tl) :call EasyMotion#TL(1,0,2) +snoremap (easymotion-bd-tl) :call EasyMotion#TL(1,0,2) +onoremap (easymotion-bd-tl) :call EasyMotion#TL(1,0,2) +xnoremap (easymotion-fl) :call EasyMotion#SL(1,1,0) +nnoremap (easymotion-fl) :call EasyMotion#SL(1,0,0) +snoremap (easymotion-fl) :call EasyMotion#SL(1,0,0) +onoremap (easymotion-fl) :call EasyMotion#SL(1,0,0) +xnoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,1,2) +nnoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,0,2) +snoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,0,2) +onoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,0,2) +xnoremap (easymotion-bd-fn) :call EasyMotion#S(-1,1,2) +nnoremap (easymotion-bd-fn) :call EasyMotion#S(-1,0,2) +snoremap (easymotion-bd-fn) :call EasyMotion#S(-1,0,2) +onoremap (easymotion-bd-fn) :call EasyMotion#S(-1,0,2) +xnoremap (easymotion-f) :call EasyMotion#S(1,1,0) +nnoremap (easymotion-f) :call EasyMotion#S(1,0,0) +snoremap (easymotion-f) :call EasyMotion#S(1,0,0) +onoremap (easymotion-f) :call EasyMotion#S(1,0,0) +xnoremap (easymotion-bd-fl) :call EasyMotion#SL(1,1,2) +nnoremap (easymotion-bd-fl) :call EasyMotion#SL(1,0,2) +snoremap (easymotion-bd-fl) :call EasyMotion#SL(1,0,2) +onoremap (easymotion-bd-fl) :call EasyMotion#SL(1,0,2) +xnoremap (easymotion-Fl2) :call EasyMotion#SL(2,1,1) +nnoremap (easymotion-Fl2) :call EasyMotion#SL(2,0,1) +snoremap (easymotion-Fl2) :call EasyMotion#SL(2,0,1) +onoremap (easymotion-Fl2) :call EasyMotion#SL(2,0,1) +xnoremap (easymotion-tl2) :call EasyMotion#TL(2,1,0) +nnoremap (easymotion-tl2) :call EasyMotion#TL(2,0,0) +snoremap (easymotion-tl2) :call EasyMotion#TL(2,0,0) +onoremap (easymotion-tl2) :call EasyMotion#TL(2,0,0) +xnoremap (easymotion-f2) :call EasyMotion#S(2,1,0) +nnoremap (easymotion-f2) :call EasyMotion#S(2,0,0) +snoremap (easymotion-f2) :call EasyMotion#S(2,0,0) +onoremap (easymotion-f2) :call EasyMotion#S(2,0,0) +xnoremap (easymotion-Fln) :call EasyMotion#SL(-1,1,1) +nnoremap (easymotion-Fln) :call EasyMotion#SL(-1,0,1) +snoremap (easymotion-Fln) :call EasyMotion#SL(-1,0,1) +onoremap (easymotion-Fln) :call EasyMotion#SL(-1,0,1) +xnoremap (easymotion-sln) :call EasyMotion#SL(-1,1,2) +nnoremap (easymotion-sln) :call EasyMotion#SL(-1,0,2) +snoremap (easymotion-sln) :call EasyMotion#SL(-1,0,2) +onoremap (easymotion-sln) :call EasyMotion#SL(-1,0,2) +xnoremap (easymotion-tln) :call EasyMotion#TL(-1,1,0) +nnoremap (easymotion-tln) :call EasyMotion#TL(-1,0,0) +snoremap (easymotion-tln) :call EasyMotion#TL(-1,0,0) +onoremap (easymotion-tln) :call EasyMotion#TL(-1,0,0) +xnoremap (easymotion-fl2) :call EasyMotion#SL(2,1,0) +nnoremap (easymotion-fl2) :call EasyMotion#SL(2,0,0) +snoremap (easymotion-fl2) :call EasyMotion#SL(2,0,0) +onoremap (easymotion-fl2) :call EasyMotion#SL(2,0,0) +xnoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,1,2) +nnoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,0,2) +snoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,0,2) +onoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,0,2) +xnoremap (easymotion-T2) :call EasyMotion#T(2,1,1) +nnoremap (easymotion-T2) :call EasyMotion#T(2,0,1) +snoremap (easymotion-T2) :call EasyMotion#T(2,0,1) +onoremap (easymotion-T2) :call EasyMotion#T(2,0,1) +xnoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,1,2) +nnoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,0,2) +snoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,0,2) +onoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,0,2) +xnoremap (easymotion-T) :call EasyMotion#T(1,1,1) +nnoremap (easymotion-T) :call EasyMotion#T(1,0,1) +snoremap (easymotion-T) :call EasyMotion#T(1,0,1) +onoremap (easymotion-T) :call EasyMotion#T(1,0,1) +xnoremap (easymotion-bd-t) :call EasyMotion#T(1,1,2) +nnoremap (easymotion-bd-t) :call EasyMotion#T(1,0,2) +snoremap (easymotion-bd-t) :call EasyMotion#T(1,0,2) +onoremap (easymotion-bd-t) :call EasyMotion#T(1,0,2) +xnoremap (easymotion-Tn) :call EasyMotion#T(-1,1,1) +nnoremap (easymotion-Tn) :call EasyMotion#T(-1,0,1) +snoremap (easymotion-Tn) :call EasyMotion#T(-1,0,1) +onoremap (easymotion-Tn) :call EasyMotion#T(-1,0,1) +xnoremap (easymotion-s2) :call EasyMotion#S(2,1,2) +nnoremap (easymotion-s2) :call EasyMotion#S(2,0,2) +snoremap (easymotion-s2) :call EasyMotion#S(2,0,2) +onoremap (easymotion-s2) :call EasyMotion#S(2,0,2) +xnoremap (easymotion-Tl) :call EasyMotion#TL(1,1,1) +nnoremap (easymotion-Tl) :call EasyMotion#TL(1,0,1) +snoremap (easymotion-Tl) :call EasyMotion#TL(1,0,1) +onoremap (easymotion-Tl) :call EasyMotion#TL(1,0,1) +xnoremap (easymotion-sn) :call EasyMotion#S(-1,1,2) +nnoremap (easymotion-sn) :call EasyMotion#S(-1,0,2) +snoremap (easymotion-sn) :call EasyMotion#S(-1,0,2) +onoremap (easymotion-sn) :call EasyMotion#S(-1,0,2) +xnoremap (easymotion-Fn) :call EasyMotion#S(-1,1,1) +nnoremap (easymotion-Fn) :call EasyMotion#S(-1,0,1) +snoremap (easymotion-Fn) :call EasyMotion#S(-1,0,1) +onoremap (easymotion-Fn) :call EasyMotion#S(-1,0,1) +xnoremap (easymotion-sl) :call EasyMotion#SL(1,1,2) +nnoremap (easymotion-sl) :call EasyMotion#SL(1,0,2) +snoremap (easymotion-sl) :call EasyMotion#SL(1,0,2) +onoremap (easymotion-sl) :call EasyMotion#SL(1,0,2) +xnoremap (easymotion-Fl) :call EasyMotion#SL(1,1,1) +nnoremap (easymotion-Fl) :call EasyMotion#SL(1,0,1) +snoremap (easymotion-Fl) :call EasyMotion#SL(1,0,1) +onoremap (easymotion-Fl) :call EasyMotion#SL(1,0,1) +xnoremap (easymotion-sl2) :call EasyMotion#SL(2,1,2) +nnoremap (easymotion-sl2) :call EasyMotion#SL(2,0,2) +snoremap (easymotion-sl2) :call EasyMotion#SL(2,0,2) +onoremap (easymotion-sl2) :call EasyMotion#SL(2,0,2) +xnoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,1,2) +nnoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,0,2) +snoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,0,2) +onoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,0,2) +xnoremap (easymotion-F) :call EasyMotion#S(1,1,1) +nnoremap (easymotion-F) :call EasyMotion#S(1,0,1) +snoremap (easymotion-F) :call EasyMotion#S(1,0,1) +onoremap (easymotion-F) :call EasyMotion#S(1,0,1) +xnoremap (easymotion-bd-f) :call EasyMotion#S(1,1,2) +nnoremap (easymotion-bd-f) :call EasyMotion#S(1,0,2) +snoremap (easymotion-bd-f) :call EasyMotion#S(1,0,2) +onoremap (easymotion-bd-f) :call EasyMotion#S(1,0,2) +xnoremap (easymotion-F2) :call EasyMotion#S(2,1,1) +nnoremap (easymotion-F2) :call EasyMotion#S(2,0,1) +snoremap (easymotion-F2) :call EasyMotion#S(2,0,1) +onoremap (easymotion-F2) :call EasyMotion#S(2,0,1) +xnoremap (easymotion-bd-f2) :call EasyMotion#S(2,1,2) +nnoremap (easymotion-bd-f2) :call EasyMotion#S(2,0,2) +snoremap (easymotion-bd-f2) :call EasyMotion#S(2,0,2) +onoremap (easymotion-bd-f2) :call EasyMotion#S(2,0,2) +xnoremap (easymotion-Tl2) :call EasyMotion#TL(2,1,1) +nnoremap (easymotion-Tl2) :call EasyMotion#TL(2,0,1) +snoremap (easymotion-Tl2) :call EasyMotion#TL(2,0,1) +onoremap (easymotion-Tl2) :call EasyMotion#TL(2,0,1) +xnoremap (easymotion-fln) :call EasyMotion#SL(-1,1,0) +nnoremap (easymotion-fln) :call EasyMotion#SL(-1,0,0) +snoremap (easymotion-fln) :call EasyMotion#SL(-1,0,0) +onoremap (easymotion-fln) :call EasyMotion#SL(-1,0,0) +xnoremap (openbrowser-smart-search) :call openbrowser#_keymap_smart_search('v') +nnoremap (openbrowser-smart-search) :call openbrowser#_keymap_smart_search('n') +xnoremap (openbrowser-search) :call openbrowser#_keymap_search('v') +nnoremap (openbrowser-search) :call openbrowser#_keymap_search('n') +xnoremap (openbrowser-open-incognito) :call openbrowser#_keymap_open('v', 0, ['--incognito']) +nnoremap (openbrowser-open-incognito) :call openbrowser#_keymap_open('n', 0, ['--incognito']) +xnoremap (openbrowser-open) :call openbrowser#_keymap_open('v') +nnoremap (openbrowser-open) :call openbrowser#_keymap_open('n') +nnoremap (lsp-signature-help) :call lsp#ui#vim#signature_help#get_signature_help_under_cursor() +nnoremap (lsp-previous-reference) :call lsp#internal#document_highlight#jump(-1) +nnoremap (lsp-next-reference) :call lsp#internal#document_highlight#jump(+1) +nnoremap (lsp-status) :echo lsp#get_server_status() +nnoremap (lsp-peek-implementation) :call lsp#ui#vim#implementation(1) +nnoremap (lsp-implementation) :call lsp#ui#vim#implementation(0) +xnoremap (lsp-document-range-format) :silent call lsp#internal#document_range_formatting#format({ 'bufnr': bufnr('%') }) +nnoremap (lsp-document-range-format) :set opfunc=lsp#internal#document_range_formatting#opfunc g@ +vnoremap (lsp-document-format) :silent call lsp#internal#document_range_formatting#format({ 'bufnr': bufnr('%') }) +nnoremap (lsp-document-format) :call lsp#internal#document_formatting#format({ 'bufnr': bufnr('%') }) +nnoremap (lsp-workspace-symbol-search) :call lsp#internal#workspace_symbol#search#do({}) +nnoremap (lsp-workspace-symbol) :call lsp#ui#vim#workspace_symbol('') +nnoremap (lsp-peek-type-definition) :call lsp#ui#vim#type_definition(1) +nnoremap (lsp-type-hierarchy) :call lsp#internal#type_hierarchy#show() +nnoremap (lsp-type-definition) :call lsp#ui#vim#type_definition(0) +nnoremap (lsp-rename) :call lsp#ui#vim#rename() +nnoremap (lsp-references) :call lsp#ui#vim#references({}) +nnoremap (lsp-previous-diagnostic-nowrap) :call lsp#internal#diagnostics#movement#_previous_diagnostics("-wrap=0") +nnoremap (lsp-previous-diagnostic) :call lsp#internal#diagnostics#movement#_previous_diagnostics() +nnoremap (lsp-next-diagnostic-nowrap) :call lsp#internal#diagnostics#movement#_next_diagnostics("-wrap=0") +nnoremap (lsp-next-diagnostic) :call lsp#internal#diagnostics#movement#_next_diagnostics() +nnoremap (lsp-previous-warning-nowrap) :call lsp#internal#diagnostics#movement#_previous_warning("-wrap=0") +nnoremap (lsp-previous-warning) :call lsp#internal#diagnostics#movement#_previous_warning() +nnoremap (lsp-next-warning-nowrap) :call lsp#internal#diagnostics#movement#_next_warning("-wrap=0") +nnoremap (lsp-next-warning) :call lsp#internal#diagnostics#movement#_next_warning() +nnoremap (lsp-previous-error-nowrap) :call lsp#internal#diagnostics#movement#_previous_error("-wrap=0") +nnoremap (lsp-previous-error) :call lsp#internal#diagnostics#movement#_previous_error() +nnoremap (lsp-next-error-nowrap) :call lsp#internal#diagnostics#movement#_next_error("-wrap=0") +nnoremap (lsp-next-error) :call lsp#internal#diagnostics#movement#_next_error() +nnoremap (lsp-preview-focus) :call lsp#ui#vim#output#focuspreview() +nnoremap (lsp-preview-close) :call lsp#ui#vim#output#closepreview() +nnoremap (lsp-hover-preview) :call lsp#internal#document_hover#under_cursor#do({ 'ui': 'preview' }) +nnoremap (lsp-hover-float) :call lsp#internal#document_hover#under_cursor#do({ 'ui': 'float' }) +nnoremap (lsp-hover) :call lsp#internal#document_hover#under_cursor#do({}) +nnoremap (lsp-document-diagnostics) :call lsp#internal#diagnostics#document_diagnostics_command#do({}) +nnoremap (lsp-document-symbol-search) :call lsp#internal#document_symbol#search#do({}) +nnoremap (lsp-document-symbol) :call lsp#ui#vim#document_symbol() +nnoremap (lsp-peek-definition) :call lsp#ui#vim#definition(1) +nnoremap (lsp-definition) :call lsp#ui#vim#definition(0) +nnoremap (lsp-peek-declaration) :call lsp#ui#vim#declaration(1) +nnoremap (lsp-declaration) :call lsp#ui#vim#declaration(0) +nnoremap (lsp-code-lens) :call lsp#ui#vim#code_lens() +nnoremap (lsp-code-action-preview) :call lsp#ui#vim#code_action({ 'ui': 'preview' }) +nnoremap (lsp-code-action-float) :call lsp#ui#vim#code_action({ 'ui': 'float' }) +nnoremap (lsp-code-action) :call lsp#ui#vim#code_action({}) +nnoremap (lsp-call-hierarchy-outgoing) :call lsp#ui#vim#call_hierarchy_outgoing() +nnoremap (lsp-call-hierarchy-incoming) :call lsp#ui#vim#call_hierarchy_incoming({}) +xnoremap (expand_region_shrink) :call expand_region#next('v', '-') +xnoremap (expand_region_expand) :call expand_region#next('v', '+') +nnoremap (expand_region_expand) :call expand_region#next('n', '+') +snoremap (complete_parameter#overload_up) :call cmp#overload_next(0) +nnoremap (complete_parameter#overload_up) :call cmp#overload_next(0) +snoremap (complete_parameter#overload_down) :call cmp#overload_next(1) +nnoremap (complete_parameter#overload_down) :call cmp#overload_next(1) +snoremap (complete_parameter#goto_previous_parameter) :call cmp#goto_next_param(0) +nnoremap (complete_parameter#goto_previous_parameter) :call cmp#goto_next_param(0) +snoremap (complete_parameter#goto_next_parameter) :call cmp#goto_next_param(1) +nnoremap (complete_parameter#goto_next_parameter) :call cmp#goto_next_param(1) +nmap <2-LeftMouse> (matchup-double-click) +nnoremap (matchup-reload) :MatchupReload +nnoremap (matchup-double-click) :call matchup#text_obj#double_click() +onoremap (matchup-a%) :call matchup#text_obj#delimited(0, 0, 'delim_all') +onoremap (matchup-i%) :call matchup#text_obj#delimited(1, 0, 'delim_all') +xnoremap (matchup-a%) :call matchup#text_obj#delimited(0, 1, 'delim_all') +xnoremap (matchup-i%) :call matchup#text_obj#delimited(1, 1, 'delim_all') +onoremap (matchup-z%) :call matchup#motion#op('z%') +xnoremap 155_(matchup-z%) :call matchup#motion#jump_inside(1) +nnoremap (matchup-z%) :call matchup#motion#jump_inside(0) +onoremap (matchup-[%) :call matchup#motion#op('[%') +onoremap (matchup-]%) :call matchup#motion#op(']%') +xnoremap 155_(matchup-[%) :call matchup#motion#find_unmatched(1, 0) +xnoremap 155_(matchup-]%) :call matchup#motion#find_unmatched(1, 1) +nnoremap (matchup-[%) :call matchup#motion#find_unmatched(0, 0) +nnoremap (matchup-]%) :call matchup#motion#find_unmatched(0, 1) +onoremap (matchup-g%) :call matchup#motion#op('g%') +xnoremap 155_(matchup-g%) :call matchup#motion#find_matching_pair(1, 0) +onoremap (matchup-%) :call matchup#motion#op('%') +xnoremap 155_(matchup-%) :call matchup#motion#find_matching_pair(1, 1) +nnoremap (matchup-g%) :call matchup#motion#find_matching_pair(0, 0) +nnoremap (matchup-%) :call matchup#motion#find_matching_pair(0, 1) +nnoremap 155_(wise) empty(g:v_motion_force) ? 'v' : g:v_motion_force +nnoremap (matchup-hi-surround) :call matchup#matchparen#highlight_surrounding() +map (SmoothieBackwards) +map (SmoothieBackwards) +map (SmoothieBackwards) +map (SmoothieForwards) +map (SmoothieForwards) +map (SmoothieForwards) +map (SmoothieUpwards) +map (SmoothieDownwards) +noremap (Smoothie_G) call smoothie#cursor_movement('G')  +noremap (Smoothie_gg) call smoothie#cursor_movement('gg')  +noremap (SmoothieBackwards) call smoothie#backwards()  +noremap (SmoothieForwards) call smoothie#forwards()  +noremap (SmoothieUpwards) call smoothie#upwards()  +noremap (SmoothieDownwards) call smoothie#downwards()  +nnoremap GitGutterPreviewHunk :call gitgutter#utility#warn('Please change your map GitGutterPreviewHunk to (GitGutterPreviewHunk)') +nnoremap (GitGutterPreviewHunk) :GitGutterPreviewHunk +nnoremap GitGutterUndoHunk :call gitgutter#utility#warn('Please change your map GitGutterUndoHunk to (GitGutterUndoHunk)') +nnoremap (GitGutterUndoHunk) :GitGutterUndoHunk +nnoremap GitGutterStageHunk :call gitgutter#utility#warn('Please change your map GitGutterStageHunk to (GitGutterStageHunk)') +nnoremap (GitGutterStageHunk) :GitGutterStageHunk +xnoremap GitGutterStageHunk :call gitgutter#utility#warn('Please change your map GitGutterStageHunk to (GitGutterStageHunk)') +xnoremap (GitGutterStageHunk) :GitGutterStageHunk +nnoremap GitGutterPrevHunk &diff ? '[c' : ":\call gitgutter#utility#warn('Please change your map \GitGutterPrevHunk to \(GitGutterPrevHunk)')\ " +nnoremap (GitGutterPrevHunk) &diff ? '[c' : ":\execute v:count1 . 'GitGutterPrevHunk'\ " +nnoremap GitGutterNextHunk &diff ? ']c' : ":\call gitgutter#utility#warn('Please change your map \GitGutterNextHunk to \(GitGutterNextHunk)')\ " +nnoremap (GitGutterNextHunk) &diff ? ']c' : ":\execute v:count1 . 'GitGutterNextHunk'\ " +xnoremap (GitGutterTextObjectOuterVisual) :call gitgutter#hunk#text_object(0) +xnoremap (GitGutterTextObjectInnerVisual) :call gitgutter#hunk#text_object(1) +onoremap (GitGutterTextObjectOuterPending) :call gitgutter#hunk#text_object(0) +onoremap (GitGutterTextObjectInnerPending) :call gitgutter#hunk#text_object(1) +xmap (easymotion-prefix)l (easyoperator-line-select) +omap (easymotion-prefix)l (easyoperator-line-select) +nnoremap (easyoperator-line-yank) :call easyoperator#line#selectlinesyank() +nnoremap (easyoperator-line-delete) :call easyoperator#line#selectlinesdelete() +xnoremap (easyoperator-line-select) :call easyoperator#line#selectlines() +onoremap (easyoperator-line-select) :call easyoperator#line#selectlines() +nnoremap (easyoperator-line-select) :call easyoperator#line#selectlines() +tnoremap (fzf-normal)  +tnoremap (fzf-insert) i +nnoremap (fzf-normal) +nnoremap (fzf-insert) i +nnoremap (grammarous-move-to-previous-error) :call grammarous#move_to_previous_error(getpos('.')[1 : 2], b:grammarous_result) +nnoremap (grammarous-move-to-next-error) :call grammarous#move_to_next_error(getpos('.')[1 : 2], b:grammarous_result) +nnoremap (grammarous-disable-category) :call grammarous#disable_category_at(getpos('.')[1 : 2], b:grammarous_result) +nnoremap (grammarous-disable-rule) :call grammarous#disable_rule_at(getpos('.')[1 : 2], b:grammarous_result) +nnoremap (grammarous-remove-error) :call grammarous#remove_error_at(getpos('.')[1 : 2], b:grammarous_result) +nnoremap (grammarous-close-info-window) :call grammarous#info_win#close() +nnoremap (grammarous-fixall) :call grammarous#fixall(b:grammarous_result) +nnoremap (grammarous-fixit) :call grammarous#fixit(grammarous#get_error_at(getpos('.')[1 : 2], b:grammarous_result)) +nnoremap (grammarous-reset) :call grammarous#reset() +nnoremap (grammarous-open-info-window) :call grammarous#create_update_info_window_of(b:grammarous_result) +nnoremap (grammarous-move-to-info-window) :call grammarous#create_and_jump_to_info_window_of(b:grammarous_result) +tnoremap :q +tnoremap :bnext +tnoremap :bprev +tnoremap :wincmd j +tnoremap :wincmd k +tnoremap :wincmd h +tnoremap :wincmd l +vnoremap YankGitRemoteURL :call SpaceVim#util#CopyToClipboard(3) +nnoremap YankGitRemoteURL :call SpaceVim#util#CopyToClipboard(2) +nnoremap :wincmd p +noremap :NERDTreeToggle +noremap :TagbarToggle +vnoremap ReverseLines :ReverseLines +nnoremap ReverseLines :ReverseLines +nnoremap :MundoToggle +vnoremap (wildfire-water) +xnoremap (jplus :call dein#autoload#_on_map('(jplus', 'vim-jplus','x') +nnoremap (jplus :call dein#autoload#_on_map('(jplus', 'vim-jplus','n') +xnoremap (wildfire- :call dein#autoload#_on_map('(wildfire-', 'wildfire.vim','x') +nnoremap (wildfire- :call dein#autoload#_on_map('(wildfire-', 'wildfire.vim','n') +xnoremap SpaceVim-plugin-iedit :call SpaceVim#plugins#iedit#start(1) +nnoremap SpaceVim-plugin-iedit :call SpaceVim#plugins#iedit#start() +vnoremap :w +nnoremap :w +nnoremap gk +nnoremap gj +xnoremap  :call SpaceVim#plugins#runner#close() +nnoremap :call SpaceVim#plugins#ctrlg#display() +vnoremap :m '<-2 gv=gv +vnoremap :m '>+1 gv=gv +nnoremap :m .-2 == +nnoremap :m .+1 == +nnoremap :wincmd j +nnoremap :wincmd k +nnoremap :wincmd h +nnoremap :wincmd l +cnoremap  +cnoremap  +cnoremap  +imap S ISurround +imap s Isurround +imap % (matchup-c_g%) +inoremap  pumvisible() ? "\" : "\ " +cnoremap  repeat('', strchars(getcmdline()) - getcmdpos() + 1) +imap  pumvisible() ? "\" : "\ " +imap  Isurround +cnoremap  w +imap ( pumvisible() ? has('patch-7.4.744') ? complete_parameter#pre_complete("()") : '(' : (len(maparg('delimitMate(', 'i')) == 0) ? "\delimitMate(" : '(' +inoremap jk  +let &cpo=s:cpo_save +unlet s:cpo_save +set autoindent +set autoread +set background=dark +set backspace=indent,eol,start +set backup +set backupdir=~/.cache/SpaceVim/old/backup// +set cindent +set complete=.,w,b,u,t +set completeopt=menu,menuone,longest +set cpoptions=aABceFsd +set directory=~/.cache/SpaceVim/old/swap// +set display=lastline +set expandtab +set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 +set fillchars=vert:│,fold:· +set grepprg=grep\ -nH\ $* +set guifont=Hack +set guioptions=agit +set helplang=en +set hidden +set hlsearch +set incsearch +set laststatus=2 +set listchars=tab:→\ ,eol:↵,trail:·,extends:↷,precedes:↶ +set matchtime=0 +set nomodeline +set mouse=nv +set mousemodel=popup +set nrformats=bin,hex +set pumheight=15 +set runtimepath=~/.SpaceVim.d/,~/.SpaceVim/,~/.SpaceVim/bundle/indentLine,~/.SpaceVim/bundle/vim-repeat,~/.SpaceVim/bundle/vim-grammarous,~/.SpaceVim/bundle/vim-virtualenv,~/.SpaceVim/bundle/vim-textobj-line,~/.cache/vimfiles/repos/github.com/junegunn/fzf,~/.SpaceVim/bundle/vim-hug-neovim-rpc,~/.SpaceVim/bundle/coveragepy.vim,~/.SpaceVim/bundle/vim-emoji,~/.SpaceVim/bundle/gtags.vim,~/.SpaceVim/bundle/vim-easyoperator-line,~/.SpaceVim/bundle/vim-cursorword,~/.cache/vimfiles/repos/github.com/nanotech/jellybeans.vim,~/.SpaceVim/bundle/neomake,~/.cache/vimfiles/repos/github.com/airblade/vim-gitgutter,~/.SpaceVim/bundle/neosnippet-snippets,~/.SpaceVim/bundle/tagbar,~/.SpaceVim/bundle/nvim-if-lua-compat,~/.SpaceVim/bundle/vim-smoothie,~/.SpaceVim/bundle/vim-textobj-indent,~/.cache/vimfiles/repos/github.com/icymind/NeoSolarized,~/.SpaceVim/bundle/vim-matchup,~/.cache/vimfiles/repos/github.com/racer-rust/vim-racer,~/.SpaceVim/bundle/gruvbox,~/.cache/vimfiles/repos/github.com/lambdalisue/vim-gista,~/.SpaceVim/bundle/CompleteParameter.vim,~/.cache/vimfiles/repos/github.com/joshdick/onedark.vim,~/.SpaceVim/bundle/vim-clipboard,~/.SpaceVim/bundle/python-imports.vim,~/.SpaceVim/bundle/editorconfig-vim,~/.cache/vimfiles/repos/github.com/srcery-colors/srcery-vim,~/.SpaceVim/bundle/delimitMate,~/.SpaceVim/bundle/vim-expand-region,~/.SpaceVim/bundle/vim-textobj-user,~/.cache/vimfiles/repos/github.com/prabirshrestha/vim-lsp,~/.cache/vimfiles/repos/github.com/w0ng/vim-hybrid,~/.SpaceVim/bundle/nerdtree,~/.SpaceVim/bundle/open-browser.vim,~/.SpaceVim/bundle/dracula,~/.SpaceVim/bundle/rust.vim,~/.SpaceVim/bundle/tagbar-proto.vim,~/.SpaceVim/bundle/vim-one,~/.cache/vimfiles/repos/github.com/Gabirel/molokai,~/.SpaceVim/bundle/tabular,~/.cache/vimfiles/repos/github.com/Shougo/deoplete-clangx,~/.cache/vimfiles/repos/github.com/vim-scripts/dbext.vim,~/.SpaceVim/bundle/git.vim,~/.SpaceVim/bundle/vim-easymotion,~/.SpaceVim/bundle/nvim-yarp,~/.SpaceVim/bundle/vim-startify,~/.cache/vimfiles/repos/github.com/arcticicestudio/nord-vim,~/.SpaceVim/bundle/github.vim,~/.cache/vimfiles/repos/github.com/junegunn/fzf.vim,~/.SpaceVim/bundle/tagbar-makefile.vim,~/.cache/vimfiles/repos/github.com/prabirshrestha/async.vim,~/.SpaceVim/bundle/dein.vim,~/.SpaceVim/bundle/vim-table-mode,~/.SpaceVim/bundle/neoformat,~/.SpaceVim/bundle/vim-textobj-entire,~/.SpaceVim/bundle/vim-surround,~/.cache/vimfiles/repos/github.com/SpaceVim/vim-material,~/.SpaceVim/bundle/deoplete-dictionary,~/.cache/vimfiles/repos/github.com/JuliaEditorSupport/julia-vim,~/.SpaceVim/bundle/clever-f.vim,~/.SpaceVim/bundle/nerdcommenter,~/.cache/vimfiles/repos/github.com/drewtempelmeyer/palenight.vim,~/.cache/vimfiles/.cache/vimrc/.dein,/usr/share/vim/vim90,~/.SpaceVim/bundle/indentLine/after,~/.SpaceVim/bundle/vim-matchup/after,~/.SpaceVim/bundle/CompleteParameter.vim/after,~/.cache/vimfiles/repos/github.com/srcery-colors/srcery-vim/after,~/.SpaceVim/bundle/dracula/after,~/.SpaceVim/bundle/rust.vim/after,~/.SpaceVim/bundle/tabular/after,~/.cache/vimfiles/.cache/vimrc/.dein/after,~/.SpaceVim.d/after,~/.SpaceVim/bundle/dein.vim/,~/.SpaceVim/after +set scrolloff=1 +set noshelltemp +set shiftwidth=3 +set shortmess=filnxtToOScsF +set showmatch +set noshowmode +set showtabline=2 +set sidescrolloff=5 +set smartindent +set smarttab +set softtabstop=3 +set spelllang=de_de +set suffixes=.bak,~,.o,.h,.info,.swp,.obj,.info,.aux,.log,.dvi,.bbl,.out,.o,.lo +set tabline=%!SpaceVim#layers#core#tabline#get() +set tabstop=3 +set tags=./tags,./TAGS,tags,TAGS,~/.cache/SpaceVim/tags/_home_max__fgfs_Aircraft_A320-family_/tags +set termencoding=utf-8 +set ttimeout +set ttimeoutlen=50 +set undodir=~/.cache/SpaceVim/old/undofile// +set undofile +set viminfo='20,\"500 +set wildignore=*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,*.ttf,*.TTF,*.png,*/target/*,.git,.svn,.hg,.DS_Store,*.svg +set wildignorecase +set wildmenu +set window=59 +set nowritebackup let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1 let v:this_session=expand(":p") silent only @@ -8,7 +1351,6 @@ cd ~/.fgfs/Aircraft/A320-family if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' let s:wipebuf = bufnr('%') endif -let s:shortmess_save = &shortmess if &shortmess =~ 'A' set shortmess=aoOA else @@ -42,59 +1384,352 @@ exe 'vert 1resize ' . ((&columns * 159 + 159) / 319) exe 'vert 2resize ' . ((&columns * 159 + 159) / 319) argglobal balt A320-main.xml -setlocal fdm=marker -setlocal fde=0 -setlocal fmr={{{,}}} -setlocal fdi=# -setlocal fdl=0 -setlocal fml=1 -setlocal fdn=20 -setlocal fen +let s:cpo_save=&cpo +set cpo&vim +imap g delimitMateJumpMany +imap delimitMateS-BS +imap delimitMateBS +imap delimitMateBS +nmap [c (GitGutterPrevHunk) +xmap \hs (GitGutterStageHunk) +nmap ]c (GitGutterNextHunk) +xmap ac (GitGutterTextObjectOuterVisual) +omap ac (GitGutterTextObjectOuterPending) +xmap ic (GitGutterTextObjectInnerVisual) +omap ic (GitGutterTextObjectInnerPending) +imap g delimitMateJumpMany +imap  delimitMateBS +imap " delimitMate" +imap ' delimitMate' +imap ( delimitMate( +imap ) delimitMate) +imap [ delimitMate[ +imap ] delimitMate] +imap ` delimitMate` +imap { delimitMate{ +imap } delimitMate} +let &cpo=s:cpo_save +unlet s:cpo_save +setlocal keymap= +setlocal noarabic +setlocal autoindent +setlocal backupcopy= +setlocal balloonexpr= +setlocal nobinary +setlocal nobreakindent +setlocal breakindentopt= +setlocal bufhidden= +setlocal buflisted +setlocal buftype= +setlocal cindent +setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e +setlocal cinoptions= +setlocal cinscopedecls=public,protected,private +setlocal cinwords=if,else,while,do,for,switch +setlocal colorcolumn= +setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- +setlocal commentstring=/*%s*/ +setlocal complete=.,w,b,u,t +setlocal completefunc= +setlocal concealcursor= +setlocal conceallevel=0 +setlocal nocopyindent +setlocal cryptmethod= +setlocal nocursorbind +setlocal nocursorcolumn +setlocal nocursorline +setlocal cursorlineopt=both +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal expandtab +if &filetype != 'nasal' +setlocal filetype=nasal +endif +setlocal fillchars= +setlocal fixendofline +setlocal foldcolumn=0 +setlocal foldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=0 +setlocal foldmarker={{{,}}} +set foldmethod=marker +setlocal foldmethod=marker +setlocal foldminlines=1 +setlocal foldnestmax=20 +set foldtext=SpaceVim#default#Customfoldtext() +setlocal foldtext=SpaceVim#default#Customfoldtext() +setlocal formatexpr= +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal formatoptions=tcq +setlocal formatprg= +setlocal grepprg= +setlocal iminsert=0 +setlocal imsearch=-1 +setlocal include= +setlocal includeexpr= +setlocal indentexpr= +setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg= +set linebreak +setlocal linebreak +setlocal nolisp +setlocal lispoptions= +setlocal lispwords= +setlocal nolist +setlocal listchars= +setlocal makeencoding= +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal nomodeline +setlocal modifiable +setlocal nrformats=bin,hex +set number +setlocal number +set numberwidth=3 +setlocal numberwidth=3 +setlocal omnifunc=syntaxcomplete#Complete +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal noreadonly +setlocal norelativenumber +setlocal norightleft +setlocal rightleftcmd=search +setlocal noscrollbind +setlocal scrolloff=-1 +setlocal shiftwidth=3 +setlocal noshortname +setlocal showbreak= +setlocal sidescrolloff=-1 +setlocal signcolumn=auto +setlocal smartindent +setlocal nosmoothscroll +setlocal softtabstop=3 +set spell +setlocal spell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=de_de +setlocal spelloptions= +setlocal statusline=%#SpaceVim_statusline_ia#\ %{\ get(w:,\ \"winid\",\ winnr())\ }\ %#SpaceVim_statusline_ia_SpaceVim_statusline_b#%#SpaceVim_statusline_b#%{\ get(w:,\ \"winwidth\",\ 150)\ <\ 31\ ?\ \"\"\ :\ (\"\ 21.2k\ FCU.nas\ \ \")}%{\ get(w:,\ \"winwidth\",\ 150)\ <\ 41\ ?\ \"\"\ :\ (\"\ \ nasal\ \")}%{\ get(w:,\ \"winwidth\",\ 150)\ <\ 55\ ?\ \"\"\ :\ (\"\ \ ❖\ ⓢ\ \ \ \")}%=%{\"\ \"\ .\ &ff\ .\ \"|\"\ .\ (&fenc!=\"\"?&fenc:&enc)\ .\ \"\ \"}\ %P\ +setlocal suffixesadd= +setlocal swapfile +setlocal synmaxcol=3000 +if &syntax != 'nasal' +setlocal syntax=nasal +endif +setlocal tabstop=3 +setlocal tagcase= +setlocal tagfunc= +setlocal tags= +setlocal termwinkey= +setlocal termwinscroll=10000 +setlocal termwinsize= +setlocal textwidth=0 +setlocal thesaurus= +setlocal thesaurusfunc= +setlocal undofile +setlocal undolevels=-123456 +setlocal varsofttabstop= +setlocal vartabstop= +setlocal virtualedit= +setlocal wincolor= +setlocal nowinfixheight +setlocal nowinfixwidth +set nowrap +setlocal nowrap +setlocal wrapmargin=0 let s:l = 228 - ((29 * winheight(0) + 28) / 57) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt keepjumps 228 -normal! 026| +normal! 010| wincmd w argglobal if bufexists(fnamemodify("Nasal/FMGC/FCU.nas", ":p")) | buffer Nasal/FMGC/FCU.nas | else | edit Nasal/FMGC/FCU.nas | endif balt Nasal/FMGC/FMGC.nas -setlocal fdm=indent -setlocal fde=0 -setlocal fmr={{{,}}} -setlocal fdi=# -setlocal fdl=0 -setlocal fml=1 -setlocal fdn=20 -setlocal fen -21 -normal! zo -25 -normal! zo -32 +let s:cpo_save=&cpo +set cpo&vim +imap g delimitMateJumpMany +imap delimitMateS-BS +imap delimitMateBS +imap delimitMateBS +nmap [c (GitGutterPrevHunk) +xmap \hs (GitGutterStageHunk) +nmap ]c (GitGutterNextHunk) +xmap ac (GitGutterTextObjectOuterVisual) +omap ac (GitGutterTextObjectOuterPending) +xmap ic (GitGutterTextObjectInnerVisual) +omap ic (GitGutterTextObjectInnerPending) +imap g delimitMateJumpMany +imap  delimitMateBS +imap " delimitMate" +imap ' delimitMate' +imap ( delimitMate( +imap ) delimitMate) +imap [ delimitMate[ +imap ] delimitMate] +imap ` delimitMate` +imap { delimitMate{ +imap } delimitMate} +let &cpo=s:cpo_save +unlet s:cpo_save +setlocal keymap= +setlocal noarabic +setlocal autoindent +setlocal backupcopy= +setlocal balloonexpr= +setlocal nobinary +setlocal nobreakindent +setlocal breakindentopt= +setlocal bufhidden= +setlocal buflisted +setlocal buftype= +setlocal cindent +setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e +setlocal cinoptions= +setlocal cinscopedecls=public,protected,private +setlocal cinwords=if,else,while,do,for,switch +setlocal colorcolumn= +setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- +setlocal commentstring=/*%s*/ +setlocal complete=.,w,b,u,t +setlocal completefunc= +setlocal concealcursor= +setlocal conceallevel=0 +setlocal nocopyindent +setlocal cryptmethod= +setlocal nocursorbind +setlocal nocursorcolumn +setlocal cursorline +setlocal cursorlineopt=both +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal expandtab +if &filetype != 'nasal' +setlocal filetype=nasal +endif +setlocal fillchars= +setlocal fixendofline +setlocal foldcolumn=0 +setlocal foldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=0 +setlocal foldmarker={{{,}}} +set foldmethod=marker +setlocal foldmethod=indent +setlocal foldminlines=1 +setlocal foldnestmax=20 +set foldtext=SpaceVim#default#Customfoldtext() +setlocal foldtext=SpaceVim#default#Customfoldtext() +setlocal formatexpr= +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal formatoptions=tcq +setlocal formatprg= +setlocal grepprg= +setlocal iminsert=0 +setlocal imsearch=-1 +setlocal include= +setlocal includeexpr= +setlocal indentexpr= +setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg= +set linebreak +setlocal linebreak +setlocal nolisp +setlocal lispoptions= +setlocal lispwords= +setlocal nolist +setlocal listchars= +setlocal makeencoding= +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal nomodeline +setlocal modifiable +setlocal nrformats=bin,hex +set number +setlocal number +set numberwidth=3 +setlocal numberwidth=3 +setlocal omnifunc=syntaxcomplete#Complete +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal noreadonly +set relativenumber +setlocal relativenumber +setlocal norightleft +setlocal rightleftcmd=search +setlocal noscrollbind +setlocal scrolloff=-1 +setlocal shiftwidth=3 +setlocal noshortname +setlocal showbreak= +setlocal sidescrolloff=-1 +setlocal signcolumn=auto +setlocal smartindent +setlocal nosmoothscroll +setlocal softtabstop=3 +set spell +setlocal spell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=de_de +setlocal spelloptions= +setlocal statusline=%#SpaceVim_statusline_a#%{SpaceVim#layers#core#statusline#mode(mode())}\ %{\ get(w:,\ \"winid\",\ winnr())\ }\ %#SpaceVim_statusline_a_SpaceVim_statusline_b#%#SpaceVim_statusline_b#%{\ &modified\ ?\ '\ *\ '\ :\ '\ -\ '}21.2k\ FCU.nas\ %#SpaceVim_statusline_b_SpaceVim_statusline_c#%#SpaceVim_statusline_c#\ nasal\ %#SpaceVim_statusline_c_SpaceVim_statusline_b#%#SpaceVim_statusline_b#\ ❖\ ⓢ\ \ %#SpaceVim_statusline_b_SpaceVim_statusline_c#%#SpaceVim_statusline_b_SpaceVim_statusline_z#%#SpaceVim_statusline_z#%=%#SpaceVim_statusline_z#%{SpaceVim#layers#core#statusline#_current_tag()}%#SpaceVim_statusline_b_SpaceVim_statusline_z#%#SpaceVim_statusline_b#%{\"\ \"\ .\ g:_spacevim_statusline_fileformat\ .\ \"\ |\ \"\ .\ (&fenc!=\"\"?&fenc:&enc)\ .\ \"\ \"}%#SpaceVim_statusline_c_SpaceVim_statusline_b#%#SpaceVim_statusline_c#%{'\ '\ .\ join(map(getpos('.')[1:2],\ \"printf('%3d',\ v:val)\"),\ ':')\ .\ '\ '}%#SpaceVim_statusline_b_SpaceVim_statusline_c#%#SpaceVim_statusline_b#\ %P\ %#SpaceVim_statusline_c_SpaceVim_statusline +setlocal suffixesadd= +setlocal swapfile +setlocal synmaxcol=3000 +if &syntax != 'nasal' +setlocal syntax=nasal +endif +setlocal tabstop=3 +setlocal tagcase= +setlocal tagfunc= +setlocal tags= +setlocal termwinkey= +setlocal termwinscroll=10000 +setlocal termwinsize= +setlocal textwidth=0 +setlocal thesaurus= +setlocal thesaurusfunc= +setlocal undofile +setlocal undolevels=-123456 +setlocal varsofttabstop= +setlocal vartabstop= +setlocal virtualedit= +setlocal wincolor= +setlocal nowinfixheight +setlocal nowinfixwidth +set nowrap +setlocal nowrap +setlocal wrapmargin=0 +23 normal! zo 34 normal! zo -35 -normal! zo -38 -normal! zo -43 -normal! zo -46 -normal! zo -21 -normal! zc -51 -normal! zo -228 +36 normal! zo -229 +53 normal! zo -230 +214 normal! zo -let s:l = 231 - ((121 * winheight(0) + 28) / 57) +let s:l = 231 - ((123 * winheight(0) + 28) / 57) if s:l < 1 | let s:l = 1 | endif keepjumps exe s:l normal! zt @@ -110,7 +1745,7 @@ if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 endif unlet! s:wipebuf set winheight=1 winwidth=20 -let &shortmess = s:shortmess_save +set shortmess=filnxtToOScsF let &winminheight = s:save_winminheight let &winminwidth = s:save_winminwidth let s:sx = expand(":p:r")."x.vim" From 477f7b8872de6885e4d095645ec0716e3588a3ac Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Tue, 30 Jan 2024 22:12:15 +0100 Subject: [PATCH 50/54] align on gnd TODO: spd push on gnd, if pos lost no mangd spd --- Nasal/FMGC/FMGC-b.nas | 2 +- Nasal/FMGC/FMGC.nas | 63 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index b0de423b..dba546a1 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -180,7 +180,7 @@ var Custom = { showHdg: props.globals.initNode("/it-autoflight/custom/show-hdg", 1, "BOOL"), trkFpa: props.globals.initNode("/it-autoflight/custom/trk-fpa", 0, "BOOL"), Input: { - spdManaged: props.globals.initNode("/it-autoflight/input/spd-managed", 1, "BOOL"), + spdManaged: props.globals.initNode("/it-autoflight/input/spd-managed", 0, "BOOL"), }, Output: { fmaPower: 0, diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 0a153ec1..3df6c94d 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -1017,14 +1017,12 @@ var ManagedSPD = maketimer(0.25, func { # - AP/FD TCAS engaged # not yet all implemented - # TODO check if crzSet and costIndexSet is part of condition if (fcu.FCUController.FCUworking) { - if ((fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) and FMGCInternal.crzSet and FMGCInternal.costIndexSet) { + if (fd1 or fd2 or ap1 or ap2 or FMGCInternal.phase == 5) { # speed controlled by FCU? if (fmgc.FMGCInternal.v2set) { # Managed Speed # speed controlled by FMGC - altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue(); ktsmach = Input.ktsMach.getValue(); @@ -1125,21 +1123,18 @@ var ManagedSPD = maketimer(0.25, func { if (!fcu.input.spdPreselect.getBoolValue()) { fcu.FCUController.spdWindowOpen.setBoolValue(nil); } - } else { # v2 not initialized # managed speed can remain engaged if previously activated # but it is not active controlled by fmgc FMGCNodes.mngSpdActive.setBoolValue(nil); + if (fmgc.Custom.Input.spdManaged.getBoolValue() and !fcu.input.spdPreselect.getBoolValue()){ + fcu.FCUController.spdWindowOpen.setBoolValue(nil); + } } } else { # conditions for active managed speed not met - # speed mode can still be managed - if (FMGCInternal.phase > 6) { - FMGCNodes.mngSpdActive.setBoolValue(nil); - } else { - fcu.FCUController.SPDPull(); - } + fcu.FCUController.SPDPull(); } } else { # no FCU: speed cannot be controlled @@ -1174,13 +1169,14 @@ var switchDatabase = func { ################################## # set managed speed on ground if v2 entered setlistener("/FMGC/internal/v2-set", func() { - if (FMGCInternal.phase == 0 or (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[1]/wow"))) { + if (FMGCInternal.phase == 0 or (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow"))) { fmgc.ManagedSPD.start(); } else { me.removelistener(); } }, 0, 0); +# set managed speed if SRS, EXP CLB, EXP DES or TCAS setlistener("/FMGC/internal/pitch-mode", func() { if (FMGCNodes.pitchMode.getValue() == "SRS" or FMGCNodes.pitchMode.getValue() == "EXP CLB" or FMGCNodes.pitchMode.getValue() == "EXP DES" or FMGCNodes.pitchMode.getValue() == "TCAS" ) { @@ -1188,6 +1184,51 @@ setlistener("/FMGC/internal/pitch-mode", func() { } }, 0, 0); +# enable managed speed if FMS has a valid position when on ground +setlistener("/systems/navigation/aligned-1", func(val) { + if (val.getBoolValue() and (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow"))){ + if (!fmgc.Custom.Input.spdManaged.getBoolValue()) { + fmgc.Custom.Input.spdManaged.setBoolValue(1); + fcu.FCUController.spdWindowOpen.setBoolValue(nil); + fmgc.ManagedSPD.start(); + } + } +}, 0, 0); + +setlistener("/systems/navigation/aligned-2", func(val) { + if (val.getBoolValue() and (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow"))){ + if (!fmgc.Custom.Input.spdManaged.getBoolValue()) { + fmgc.Custom.Input.spdManaged.setBoolValue(1); + fcu.FCUController.spdWindowOpen.setBoolValue(nil); + fmgc.ManagedSPD.start(); + } + } +}, 0, 0); + +setlistener("/systems/navigation/aligned-3", func(val) { + if (val.getBoolValue() and (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow"))){ + if (!fmgc.Custom.Input.spdManaged.getBoolValue()) { + fmgc.Custom.Input.spdManaged.setBoolValue(1); + fcu.FCUController.spdWindowOpen.setBoolValue(nil); + fmgc.ManagedSPD.start(); + } + } +}, 0, 0); + +setlistener("/it-autoflight/output/fd1", func(val) { + if (val.getBoolValue() and getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow") and !fmgc.Output.fd2.getBoolValue()){ + fmgc.Custom.Input.spdManaged.setBoolValue(1); + fmgc.ManagedSPD.start(); + } +}, 0, 0); + +setlistener("/it-autoflight/output/fd2", func(val) { + if (val.getBoolValue() and getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow") and !fmgc.Output.fd1.getBoolValue()){ + fmgc.Custom.Input.spdManaged.setBoolValue(1); + fmgc.ManagedSPD.start(); + } +}, 0, 0); + ################################### # setlisteners for selected speed # ################################### From bc2262c50858d8f5ba8a66731b1b53ef9cd311a9 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Wed, 31 Jan 2024 16:42:17 +0100 Subject: [PATCH 51/54] FCU SPD window behaviour improved TODO: move Mach/Speed changeover to a property and activate via listener. --- .gitconfig | 4 + Nasal/FMGC/FCU.nas | 1 + Nasal/FMGC/FMGC.nas | 38 +- Session.vim | 1758 ------------------------------------------- 4 files changed, 39 insertions(+), 1762 deletions(-) create mode 100644 .gitconfig delete mode 100644 Session.vim diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 00000000..ce7df991 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,4 @@ +[alias] +lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all +lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' +lg = lg1 diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 5d3a8fd0..ea2881e7 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -239,6 +239,7 @@ var FCUController = { }, SPDPush: func() { if (me.FCUworking) { + fmgc.Custom.Input.spdManaged.setBoolValue(1); fmgc.ManagedSPD.start(); } }, diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 3df6c94d..c515769b 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -1128,13 +1128,39 @@ var ManagedSPD = maketimer(0.25, func { # managed speed can remain engaged if previously activated # but it is not active controlled by fmgc FMGCNodes.mngSpdActive.setBoolValue(nil); - if (fmgc.Custom.Input.spdManaged.getBoolValue() and !fcu.input.spdPreselect.getBoolValue()){ - fcu.FCUController.spdWindowOpen.setBoolValue(nil); + if (fmgc.Custom.Input.spdManaged.getBoolValue() and !fcu.input.spdPreselect.getBoolValue() and + (systems.ADIRS.Operating.aligned[0].getBoolValue() or + systems.ADIRS.Operating.aligned[1].getBoolValue() or + systems.ADIRS.Operating.aligned[2].getBoolValue())) + { + fcu.FCUController.spdWindowOpen.setBoolValue(nil); } } } else { # conditions for active managed speed not met - fcu.FCUController.SPDPull(); + fmgc.ManagedSPD.stop(); + fmgc.FMGCNodes.mngSpdActive.setBoolValue(nil); + fmgc.Custom.Input.spdManaged.setBoolValue(nil); + if (fcu.input.spdPreselect.getBoolValue()){ + fcu.input.spdPreselect.setBoolValue(nil); + fcu.spdSelectTimer.stop(); + if (fmgc.Input.ktsMach.getBoolValue()){ + fmgc.Input.mach.setValue(fcu.input.mach.getValue()); + } else { + fmgc.Input.kts.setValue(fcu.input.kts.getValue()); + } + } else { + if (fmgc.Input.ktsMach.getBoolValue()){ + fcu.FCUController.mach = math.clamp(math.round(fmgc.Velocities.indicatedMach.getValue(), 0.01), 0.01, 0.99); + fmgc.Input.mach.setValue(fcu.FCUController.mach); + fcu.input.mach.setValue(fcu.FCUController.mach); + } else { + fcu.FCUController.ias = math.clamp(math.round(fmgc.Velocities.indicatedAirspeedKt.getValue()), 100, 399); + fmgc.Input.kts.setValue(fcu.FCUController.ias); + fcu.input.kts.setValue(fcu.FCUController.ias); + } + } + fcu.FCUController.spdWindowOpen.setBoolValue(1); } } else { # no FCU: speed cannot be controlled @@ -1257,8 +1283,10 @@ setlistener("/ECAM/logic/ground-calc-immediate", func(val) { }, 0, 0); setlistener("/ECAM/phases/phase-calculation/one-engine-running", func(val) { - if (val.getBoolValue()){ + if (val.getBoolValue() and ecam.FWC.Logic.gnd.getBoolValue()){ fmgc.FMGCNodes.selSpdEnable.setBoolValue(0); + fmgc.Custom.Input.spdManaged.setBoolValue(1); + fmgc.ManagedSPD.start(); } else { fmgc.FMGCNodes.selSpdEnable.setBoolValue(1); } @@ -1300,6 +1328,8 @@ setlistener("/systems/navigation/adr/operating-3", func() { } }, 0, 0); +################################### + # Calculate Block Fuel setlistener("/FMGC/internal/block-calculating", func() { if (timer3blockFuel.isRunning) { diff --git a/Session.vim b/Session.vim deleted file mode 100644 index f1a07aea..00000000 --- a/Session.vim +++ /dev/null @@ -1,1758 +0,0 @@ -let SessionLoad = 1 -if &cp | set nocp | endif -let s:cpo_save=&cpo -set cpo&vim -map! * -inoremap NERDCommenterInsert  :call NERDComment('i', 'insert') -imap S ISurround -imap s Isurround -imap Isurround -inoremap (table-mode-tableize) |:call tablemode#TableizeInsertMode() a -inoremap (fzf-maps-i) :call fzf#vim#maps('i', 0) -inoremap (fzf-complete-buffer-line) fzf#vim#complete#buffer_line() -inoremap (fzf-complete-line) fzf#vim#complete#line() -inoremap (fzf-complete-file-ag) fzf#vim#complete#path('ag -l -g ""') -inoremap (fzf-complete-file) fzf#vim#complete#path("find . -path '*/\.*' -prune -o -type f -print -o -type l -print | sed 's:^..::'") -inoremap (fzf-complete-path) fzf#vim#complete#path("find . -path '*/\.*' -prune -o -print | sed '1d;s:^..::'") -inoremap (fzf-complete-word) fzf#vim#complete#word() -inoremap delimitMateS-BS delimitMate#WithinEmptyPair() ? "\" : "\" -inoremap delimitMateBS =delimitMate#BS() -inoremap (complete_parameter#overload_up) :call cmp#overload_next(0) -inoremap (complete_parameter#overload_down) :call cmp#overload_next(1) -inoremap (complete_parameter#goto_previous_parameter) :call cmp#goto_next_param(0) -inoremap (complete_parameter#goto_next_parameter) :call cmp#goto_next_param(1) -imap % (matchup-c_g%) -inoremap (matchup-c_g%) :call matchup#motion#insert_mode() -imap neosnippet#expandable() ? "\(neosnippet_expand)" : "" -inoremap pumvisible() ? "\\\" : "\" -inoremap pumvisible() ? "\\\" : "\" -inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "\" -inoremap pumvisible() ? "\" : "" -cnoremap repeat('', strchars(getcmdline()) - getcmdpos() + 1) -cnoremap -cnoremap -cnoremap -cnoremap w -inoremap o -inoremap :m .-2 ==gi -inoremap :m .+1 ==gi -map  (SmoothieBackwards) -map  (SmoothieDownwards) -map  (SmoothieForwards) -nnoremap  :call SpaceVim#plugins#ctrlg#display() -xnoremap  >gv -vnoremap  :w -nnoremap  :w -map  (SmoothieUpwards) -nmap  xd [SPC]xd[SPC] -nmap  xa [SPC]xa[SPC] -vmap  [SPC] -nmap  [SPC] -omap % (matchup-%) -xmap % (matchup-%) -nmap % (matchup-%) -xmap , [SPC]l -nmap , [SPC]l -nnoremap , :silent! keeppatterns %substitute/\s\+$//e -nnoremap < <<_ -xnoremap <  >>_ -xnoremap > >gv -imap ¯ neosnippet#expandable() ? "\(neosnippet_expand)" : "" -omap F (clever-f-F) -xmap F (clever-f-F) -nmap F (clever-f-F) -vmap J (jplus) -nmap J (jplus) -map Q gq -xmap S VSurround -omap T (clever-f-T) -xmap T (clever-f-T) -nmap T (clever-f-T) -xmap V (expand_region_shrink) -nnoremap [SPC]ao :call SpaceVim#plugins#todo#list() -omap [% (matchup-[%) -xmap [% (matchup-[%) -nmap [% (matchup-[%) -nnoremap [SPC]as :Startify | doautocmd WinEnter -nnoremap [SPC]ghp :OpenGithubPullReq -nnoremap [SPC]ghI :OpenGithubIssue -nnoremap [SPC]ghf :OpenGithubFile -xnoremap [SPC]ggp :Gista post -nnoremap [SPC]ggp :Gista post -nnoremap [SPC]ggl :Gista list -nmap [SPC]ghv (GitGutterPreviewHunk) -nmap [SPC]ghr (GitGutterUndoHunk) -nmap [SPC]ghs (GitGutterStageHunk) -nnoremap [SPC]gm :Git branch -nnoremap [SPC]gv :Git log -nnoremap [SPC]gV :Git log % -nnoremap [SPC]gb :Git blame -nnoremap [SPC]gA :Git add . -nnoremap [SPC]gd :Git diff -nnoremap [SPC]gp :Git push -nnoremap [SPC]gc :Git commit -nnoremap [SPC]gU :Git reset % -nnoremap [SPC]gS :Git add % -nnoremap [SPC]gs :Git status -nnoremap [SPC]mgf :Gtags -f % -nnoremap [SPC]mgg :exe "Gtags -g " . expand("") -nnoremap [SPC]mgs :exe "Gtags -s " . expand("") -nnoremap [SPC]mgr :exe "Gtags -r " . expand("") -nnoremap [SPC]mgd :exe "Gtags -d " . expand("") -nnoremap [SPC]mgp :Gtags -P -nnoremap [SPC]mgu :GtagsGenerate -nnoremap [SPC]mgc :GtagsGenerate! -nnoremap [SPC]tmT :if &laststatus == 2 | let &laststatus = 0 | else | let &laststatus = 2 | endif -nnoremap [SPC]tmp :call SpaceVim#layers#core#statusline#toggle_section("cursorpos") -nnoremap [SPC]tmt :call SpaceVim#layers#core#statusline#toggle_section("time") -nnoremap [SPC]tmi :call SpaceVim#layers#core#statusline#toggle_section("input method") -nnoremap [SPC]tmd :call SpaceVim#layers#core#statusline#toggle_section("date") -nnoremap [SPC]tmb :call SpaceVim#layers#core#statusline#toggle_section("battery status") -nnoremap [SPC]tmM :call SpaceVim#layers#core#statusline#toggle_section("major mode") -nnoremap [SPC]tmm :call SpaceVim#layers#core#statusline#toggle_section("minor mode lighters") -nmap [SPC]; CommentOperator -xmap [SPC]cP CommentParagraphs -nmap [SPC]cP CommentParagraphs -xmap [SPC]cp CommentParagraphsInvert -nmap [SPC]cp CommentParagraphsInvert -xmap [SPC]cT CommentToLine -nmap [SPC]cT CommentToLine -xmap [SPC]ct CommentToLineInvert -nmap [SPC]ct CommentToLineInvert -xmap [SPC]c$ NERDCommenterToEOL -nmap [SPC]c$ NERDCommenterToEOL -xmap [SPC]cY NERDCommenterYank -nmap [SPC]cY NERDCommenterYank -xmap [SPC]cy CommenterInvertYank -nmap [SPC]cy CommenterInvertYank -xmap [SPC]cs NERDCommenterSexy -nmap [SPC]cs NERDCommenterSexy -xmap [SPC]cv NERDCommenterInvertgv -nmap [SPC]cv NERDCommenterInvertgv -xmap [SPC]cu NERDCommenterUncomment -nmap [SPC]cu NERDCommenterUncomment -xmap [SPC]cL NERDCommenterComment -nmap [SPC]cL NERDCommenterComment -xmap [SPC]cl NERDCommenterInvert -nmap [SPC]cl NERDCommenterInvert -xmap [SPC]ca NERDCommenterAltDelims -nmap [SPC]ca NERDCommenterAltDelims -nnoremap [SPC]qr : -nnoremap [SPC]qR : -nnoremap [SPC]qQ :qa! -nnoremap [SPC]qq :qa -nnoremap [SPC]p/ :Grepper -nnoremap [SPC]pp :call SpaceVim#plugins#projectmanager#list() -nnoremap [SPC]pk :call SpaceVim#plugins#projectmanager#kill_project() -nnoremap [SPC]ptr :call SpaceVim#plugins#runner#run_task(SpaceVim#plugins#tasks#get()) -nnoremap [SPC]ptc :call SpaceVim#plugins#runner#clear_tasks() -nnoremap [SPC]ptl :call SpaceVim#plugins#tasks#list() -nnoremap [SPC]pte :call SpaceVim#plugins#tasks#edit() -nnoremap [SPC]fvd :SPConfig -nnoremap [SPC]fvv :let @+=g:spacevim_version | echo g:spacevim_version -xmap [SPC]fY YankGitRemoteURL -nmap [SPC]fY YankGitRemoteURL -nnoremap [SPC]fy :call SpaceVim#util#CopyToClipboard() -nnoremap [SPC]bt :NERDTree % -nnoremap [SPC]fo :NERDTreeFind -nnoremap [SPC]fT :NERDTree -nnoremap [SPC]ft :NERDTreeToggle -nnoremap [SPC]f/ :call SpaceVim#plugins#find#open() -nnoremap [SPC]fCu :update | e ++ff=dos | setlocal ff=unix | w -nnoremap [SPC]fCd :update | e ++ff=dos | w -nnoremap [SPC]fb :BookmarkShowAll -nnoremap [SPC]bNn :enew -nnoremap [SPC]bNl :rightbelow vertical new -nnoremap [SPC]bNk :new -nnoremap [SPC]bNj :rightbelow new -nnoremap [SPC]bNh :topleft vertical new -nnoremap [SPC]bw :setl readonly! -nnoremap [SPC]bY :normal! ggVG"+y`` -nnoremap [SPC]bP :normal! ggdG"+P -nnoremap [SPC]bh :Startify -nnoremap [SPC]bc :call SpaceVim#mapping#clear_saved_buffers() -nnoremap [SPC]b :call SpaceVim#mapping#kill_buffer_expr() -nnoremap [SPC]b :call SpaceVim#mapping#clear_buffers() -nnoremap [SPC]b :call SpaceVim#mapping#kill_buffer_expr() -nnoremap [SPC]bD :call SpaceVim#mapping#kill_visible_buffer_choosewin() -nnoremap [SPC]bd :call SpaceVim#mapping#close_current_buffer() -nnoremap [SPC]hG :call SpaceVim#plugins#helpgrep#help(expand("")) -nnoremap [SPC]hg :call SpaceVim#plugins#helpgrep#help() -nnoremap [SPC] :try | b# | catch | endtry -nnoremap [SPC]jn i  -nnoremap [SPC]jf  -nnoremap [SPC]jb  -nnoremap [SPC]j$ m`g_ -nnoremap [SPC]j0 m`^ -nnoremap [SPC]hk :LeaderGuide "[KEYs]" -nnoremap [SPC]hL :SPRuntimeLog -nnoremap [SPC]hl :SPLayer -l -nnoremap [SPC]hI :call SpaceVim#issue#report() -nnoremap [SPC]fS :wall -nnoremap [p P -nnoremap [t :tabprevious -nnoremap [l :lprevious -nnoremap [b :bN | stopinsert -nnoremap [e :execute 'move -1-'. v:count1 -nnoremap [ :put! =repeat(nr2char(10), v:count1) -nnoremap [SPC]tW :call SpaceVim#layers#core#statusline#toggle_mode("wrapline") -nnoremap [SPC]tl :setlocal list! -nnoremap [SPC]tP :DelimitMateSwitch -nnoremap [SPC]tp :call SpaceVim#layers#core#statusline#toggle_mode("paste-mode") -nnoremap [SPC]tS :call SpaceVim#layers#core#statusline#toggle_mode("spell-checking") -nnoremap [SPC]tw :call SpaceVim#layers#core#statusline#toggle_mode("whitespace") -nnoremap [SPC]thc :set cursorcolumn! -nnoremap [SPC]tf :call SpaceVim#layers#core#statusline#toggle_mode("fill-column-indicator") -nnoremap [SPC]tt :call SpaceVim#plugins#tabmanager#open() -nnoremap [SPC]ta :call SpaceVim#layers#autocomplete#toggle_deoplete() -nnoremap [SPC]t8 :call SpaceVim#layers#core#statusline#toggle_mode("hi-characters-for-long-lines") -nmap [SPC]jq (easymotion-overwin-line) -nmap [SPC]jw (easymotion-overwin-w) -nmap [SPC]jv (easymotion-overwin-line) -xmap [SPC]jl (better-easymotion-overwin-line) -nmap [SPC]jl (better-easymotion-overwin-line) -nmap [SPC]jJ (easymotion-overwin-f2) -xmap [SPC]jj (better-easymotion-overwin-f) -nmap [SPC]jj (better-easymotion-overwin-f) -nnoremap [SPC]jk j== -nnoremap [SPC]jm :SplitjoinSplit -nnoremap [SPC]jo :SplitjoinJoin -xmap [SPC]xgp (grammarous-move-to-previous-error) -nmap [SPC]xgp (grammarous-move-to-previous-error) -xmap [SPC]xgn (grammarous-move-to-next-error) -nmap [SPC]xgn (grammarous-move-to-next-error) -xmap [SPC]xlU UniquifyCaseSenstiveLines -nmap [SPC]xlU UniquifyCaseSenstiveLines -xmap [SPC]xlu UniquifyIgnoreCaseLines -nmap [SPC]xlu UniquifyIgnoreCaseLines -nnoremap [SPC]xlS :sort -nnoremap [SPC]xls :sort i -xmap [SPC]xlr ReverseLines -nmap [SPC]xlr ReverseLines -xmap [SPC]xld DuplicateLines -nmap [SPC]xld DuplicateLines -vnoremap [SPC]xwc :normal! :'<,'>s/\w\+//gn  -xmap [SPC]x~ ToggleCase -nmap [SPC]x~ ToggleCase -xmap [SPC]xU Uppercase -nmap [SPC]xU Uppercase -xmap [SPC]xu Lowercase -nmap [SPC]xu Lowercase -nnoremap [SPC]xdw :StripWhitespace -xmap [SPC]xa[SPC] :Tabularize /\s\ze\S/l0 -nmap [SPC]xa[SPC] :Tabularize /\s\ze\S/l0 -xnoremap [SPC]xa| :Tabularize /[||] -nnoremap [SPC]xa| :Tabularize /[||] -xnoremap [SPC]xa¦ :Tabularize /¦ -nnoremap [SPC]xa¦ :Tabularize /¦ -xnoremap [SPC]xao :Tabularize /&&\|||\|\.\.\|\*\*\|<<\|>>\|\/\/\|[-+*/.%^><&|?]/l1r1 -nnoremap [SPC]xao :Tabularize /&&\|||\|\.\.\|\*\*\|<<\|>>\|\/\/\|[-+*/.%^><&|?]/l1r1 -xnoremap [SPC]xa= :Tabularize /===\|<=>\|\(&&\|||\|<<\|>>\|\/\/\)=\|=\~[#?]\?\|=>\|[:+/*!%^=><&|.?-]\?=[#?]\?/l1r1 -nnoremap [SPC]xa= :Tabularize /===\|<=>\|\(&&\|||\|<<\|>>\|\/\/\)=\|=\~[#?]\?\|=>\|[:+/*!%^=><&|.?-]\?=[#?]\?/l1r1 -xnoremap [SPC]xa; :Tabularize /; -nnoremap [SPC]xa; :Tabularize /; -xnoremap [SPC]xa: :Tabularize /: -nnoremap [SPC]xa: :Tabularize /: -xnoremap [SPC]xa. :Tabularize /\. -nnoremap [SPC]xa. :Tabularize /\. -xnoremap [SPC]xa, :Tabularize /, -nnoremap [SPC]xa, :Tabularize /, -xnoremap [SPC]xa} :Tabularize /} -nnoremap [SPC]xa} :Tabularize /} -xnoremap [SPC]xa{ :Tabularize /{ -nnoremap [SPC]xa{ :Tabularize /{ -xnoremap [SPC]xa] :Tabularize /] -nnoremap [SPC]xa] :Tabularize /] -xnoremap [SPC]xa[ :Tabularize /[ -nnoremap [SPC]xa[ :Tabularize /[ -xnoremap [SPC]xa) :Tabularize /) -nnoremap [SPC]xa) :Tabularize /) -xnoremap [SPC]xa( :Tabularize /( -nnoremap [SPC]xa( :Tabularize /( -xnoremap [SPC]xa& :Tabularize /& -nnoremap [SPC]xa& :Tabularize /& -xnoremap [SPC]xa% :Tabularize /% -nnoremap [SPC]xa% :Tabularize /% -xnoremap [SPC]xa# :Tabularize /# -nnoremap [SPC]xa# :Tabularize /# -xmap [SPC]xc CountSelectionRegion -nmap [SPC]xc CountSelectionRegion -nnoremap [SPC]bf :Neoformat -nnoremap [SPC]ts :call SpaceVim#layers#core#statusline#toggle_mode("syntax-checking") -nnoremap [SPC]eh : -nnoremap [SPC]xss :NeoSnippetEdit -nnoremap [SPC]hdk :call SpaceVim#plugins#help#describe_key() -nnoremap [SPC]sh :call SpaceVim#plugins#highlight#start(0) -nnoremap [SPC]sH :call SpaceVim#plugins#highlight#start(1) -nnoremap [SPC]sE :call SpaceVim#plugins#iedit#start({"selectall" : 0}) -xmap [SPC]se SpaceVim-plugin-iedit -nmap [SPC]se SpaceVim-plugin-iedit -nnoremap [SPC]sc :call SpaceVim#plugins#searcher#clear() -nnoremap [SPC]s/ :call SpaceVim#plugins#flygrep#open({}) -nnoremap [SPC]stJ :call SpaceVim#plugins#searcher#find(expand(""), "pt") -nnoremap [SPC]stj :call SpaceVim#plugins#searcher#find("", "pt") -nnoremap [SPC]stF :call SpaceVim#mapping#search#grep("t", "F") -nnoremap [SPC]stf :call SpaceVim#mapping#search#grep("t", "f") -nnoremap [SPC]stP :call SpaceVim#mapping#search#grep("t", "P") -nnoremap [SPC]stp :call SpaceVim#mapping#search#grep("t", "p") -nnoremap [SPC]stD :call SpaceVim#mapping#search#grep("t", "D") -nnoremap [SPC]std :call SpaceVim#mapping#search#grep("t", "d") -nnoremap [SPC]stB :call SpaceVim#mapping#search#grep("t", "B") -nnoremap [SPC]stb :call SpaceVim#mapping#search#grep("t", "b") -nnoremap [SPC]siJ :call SpaceVim#plugins#searcher#find(expand(""), "findstr") -nnoremap [SPC]sij :call SpaceVim#plugins#searcher#find("", "findstr") -nnoremap [SPC]siF :call SpaceVim#mapping#search#grep("i", "F") -nnoremap [SPC]sif :call SpaceVim#mapping#search#grep("i", "f") -nnoremap [SPC]siP :call SpaceVim#mapping#search#grep("i", "P") -nnoremap [SPC]sip :call SpaceVim#mapping#search#grep("i", "p") -nnoremap [SPC]siD :call SpaceVim#mapping#search#grep("i", "D") -nnoremap [SPC]sid :call SpaceVim#mapping#search#grep("i", "d") -nnoremap [SPC]siB :call SpaceVim#mapping#search#grep("i", "B") -nnoremap [SPC]sib :call SpaceVim#mapping#search#grep("i", "b") -nnoremap [SPC]srJ :call SpaceVim#plugins#searcher#find(expand(""), "rg") -nnoremap [SPC]srj :call SpaceVim#plugins#searcher#find("", "rg") -nnoremap [SPC]srF :call SpaceVim#mapping#search#grep("r", "F") -nnoremap [SPC]srf :call SpaceVim#mapping#search#grep("r", "f") -nnoremap [SPC]srP :call SpaceVim#mapping#search#grep("r", "P") -nnoremap [SPC]srp :call SpaceVim#mapping#search#grep("r", "p") -nnoremap [SPC]srD :call SpaceVim#mapping#search#grep("r", "D") -nnoremap [SPC]srd :call SpaceVim#mapping#search#grep("r", "d") -nnoremap [SPC]srB :call SpaceVim#mapping#search#grep("r", "B") -nnoremap [SPC]srb :call SpaceVim#mapping#search#grep("r", "b") -nnoremap [SPC]skJ :call SpaceVim#plugins#searcher#find(expand(""), "ack") -nnoremap [SPC]skj :call SpaceVim#plugins#searcher#find("", "ack") -nnoremap [SPC]skF :call SpaceVim#mapping#search#grep("k", "F") -nnoremap [SPC]skf :call SpaceVim#mapping#search#grep("k", "f") -nnoremap [SPC]skP :call SpaceVim#mapping#search#grep("k", "P") -nnoremap [SPC]skp :call SpaceVim#mapping#search#grep("k", "p") -nnoremap [SPC]skD :call SpaceVim#mapping#search#grep("k", "D") -nnoremap [SPC]skd :call SpaceVim#mapping#search#grep("k", "d") -nnoremap [SPC]skB :call SpaceVim#mapping#search#grep("k", "B") -nnoremap [SPC]skb :call SpaceVim#mapping#search#grep("k", "b") -nnoremap [SPC]sGF :call SpaceVim#mapping#search#grep("G", "F") -nnoremap [SPC]sGf :call SpaceVim#mapping#search#grep("G", "f") -nnoremap [SPC]sGP :call SpaceVim#mapping#search#grep("G", "P") -nnoremap [SPC]sGp :call SpaceVim#mapping#search#grep("G", "p") -nnoremap [SPC]sGD :call SpaceVim#mapping#search#grep("G", "D") -nnoremap [SPC]sGd :call SpaceVim#mapping#search#grep("G", "d") -nnoremap [SPC]sGB :call SpaceVim#mapping#search#grep("G", "B") -nnoremap [SPC]sGb :call SpaceVim#mapping#search#grep("G", "b") -nnoremap [SPC]sgJ :call SpaceVim#plugins#searcher#find(expand(""), "grep") -nnoremap [SPC]sgj :call SpaceVim#plugins#searcher#find("", "grep") -nnoremap [SPC]sgF :call SpaceVim#mapping#search#grep("g", "F") -nnoremap [SPC]sgf :call SpaceVim#mapping#search#grep("g", "f") -nnoremap [SPC]sgP :call SpaceVim#mapping#search#grep("g", "P") -nnoremap [SPC]sgp :call SpaceVim#mapping#search#grep("g", "p") -nnoremap [SPC]sgD :call SpaceVim#mapping#search#grep("g", "D") -nnoremap [SPC]sgd :call SpaceVim#mapping#search#grep("g", "d") -nnoremap [SPC]sgB :call SpaceVim#mapping#search#grep("g", "B") -nnoremap [SPC]sgb :call SpaceVim#mapping#search#grep("g", "b") -nnoremap [SPC]saJ :call SpaceVim#plugins#searcher#find(expand(""), "ag") -nnoremap [SPC]saj :call SpaceVim#plugins#searcher#find("", "ag") -nnoremap [SPC]saF :call SpaceVim#mapping#search#grep("a", "F") -nnoremap [SPC]saf :call SpaceVim#mapping#search#grep("a", "f") -nnoremap [SPC]saP :call SpaceVim#mapping#search#grep("a", "P") -nnoremap [SPC]sap :call SpaceVim#mapping#search#grep("a", "p") -nnoremap [SPC]saD :call SpaceVim#mapping#search#grep("a", "D") -nnoremap [SPC]sad :call SpaceVim#mapping#search#grep("a", "d") -nnoremap [SPC]saB :call SpaceVim#mapping#search#grep("a", "B") -nnoremap [SPC]sab :call SpaceVim#mapping#search#grep("a", "b") -nnoremap [SPC]sl :call SpaceVim#plugins#searcher#list() -nnoremap [SPC]sJ :call SpaceVim#plugins#searcher#find(expand(""),SpaceVim#mapping#search#default_tool()[0]) -nnoremap [SPC]sj :call SpaceVim#plugins#searcher#find("", SpaceVim#mapping#search#default_tool()[0]) -nnoremap [SPC]sP :call SpaceVim#plugins#flygrep#open({'input' : expand(""), 'dir' : get(b:, "rootDir", getcwd())}) -nnoremap [SPC]sp :call SpaceVim#plugins#flygrep#open({'input' : input("grep pattern:"), 'dir' : get(b:, "rootDir", getcwd())}) -nnoremap [SPC]sF :call SpaceVim#plugins#flygrep#open({"input" : expand(""), "dir": input("arbitrary dir:", "", "dir")}) -nnoremap [SPC]sf :call SpaceVim#plugins#flygrep#open({"input" : input("grep pattern:"), "dir": input("arbitrary dir:", "", "dir")}) -nnoremap [SPC]sD :call SpaceVim#plugins#flygrep#open({"input" : expand(""), "dir": fnamemodify(expand("%"), ":p:h")}) -nnoremap [SPC]sd :call SpaceVim#plugins#flygrep#open({"input" : input("grep pattern:"), "dir": fnamemodify(expand("%"), ":p:h")}) -nnoremap [SPC]sB :call SpaceVim#plugins#flygrep#open({"input" : expand(""), "files": "@buffers"}) -nnoremap [SPC]sb :call SpaceVim#plugins#flygrep#open({"input" : input("grep pattern:"), "files": "@buffers"}) -nnoremap [SPC]sS :call SpaceVim#plugins#flygrep#open({"input" : expand(""), "files": bufname("%")}) -nnoremap [SPC]ss :call SpaceVim#plugins#flygrep#open({"input" : input("grep pattern:"), "files": bufname("%")}) -nnoremap [SPC]tn :setlocal nonumber! norelativenumber! -nnoremap [SPC]wU :call SpaceVim#plugins#windowsmanager#RedoQuitWin() -nnoremap [SPC]wu :call SpaceVim#plugins#windowsmanager#UndoQuitWin() -nnoremap [SPC]wW :ChooseWin -nnoremap [SPC]ww :wincmd w -nnoremap [SPC]w= :wincmd = -nnoremap [SPC]wV :bel vs -nnoremap [SPC]w3 :silent only | vs | vs | wincmd H -nnoremap [SPC]w2 :silent only | vs | wincmd w -nnoremap [SPC]wS :bel split -nnoremap [SPC]ws :bel split | wincmd w -nnoremap [SPC]w- :bel split | wincmd w -nnoremap [SPC]wv :belowright vsplit | wincmd w -nnoremap [SPC]w/ :belowright vsplit | wincmd w -nnoremap [SPC]wo :tabnext -nnoremap [SPC]wM :execute eval("winnr('$')<=2 ? 'wincmd x' : 'ChooseWinSwap'") -nnoremap [SPC]wL :wincmd L -nnoremap [SPC]wK :wincmd K -nnoremap [SPC]wJ :wincmd J -nnoremap [SPC]wH :wincmd H -nnoremap [SPC]wl :wincmd l -nnoremap [SPC]wk :wincmd k -nnoremap [SPC]wx :wincmd x -nnoremap [SPC]wj :wincmd j -nnoremap [SPC]wh :wincmd h -nnoremap [SPC]wF :tabnew -nnoremap [SPC]wD :ChooseWin | close | wincmd w -nnoremap [SPC]wf :setlocal scrollbind! -nnoremap [SPC]wd :close -nnoremap [SPC]w :wincmd w -nnoremap [SPC]9 :call SpaceVim#layers#core#statusline#jump(9) -nnoremap [SPC]8 :call SpaceVim#layers#core#statusline#jump(8) -nnoremap [SPC]7 :call SpaceVim#layers#core#statusline#jump(7) -nnoremap [SPC]6 :call SpaceVim#layers#core#statusline#jump(6) -nnoremap [SPC]5 :call SpaceVim#layers#core#statusline#jump(5) -nnoremap [SPC]4 :call SpaceVim#layers#core#statusline#jump(4) -nnoremap [SPC]3 :call SpaceVim#layers#core#statusline#jump(3) -nnoremap [SPC]2 :call SpaceVim#layers#core#statusline#jump(2) -nnoremap [SPC]1 :call SpaceVim#layers#core#statusline#jump(1) -vnoremap [SPC] :LeaderGuideVisual ' ' -nnoremap [SPC] :LeaderGuide ' ' -nnoremap [Z] :LeaderGuide "z" -nnoremap [G] :LeaderGuide "g" -nnoremap [Window]c :call SpaceVim#mapping#clear_buffers() -nnoremap [Window]q :call SpaceVim#mapping#close_current_buffer() -nnoremap [Window]Q :close -nnoremap [Window]\ :b# -nnoremap [Window]x :call SpaceVim#mapping#BufferEmpty() -nnoremap [Window]o :only | doautocmd WinEnter -nnoremap [Window]t :tabnew -nnoremap [Window]G :vsplit +bp -nnoremap [Window]g :vsplit -nnoremap [Window]V :split +bp -nnoremap [Window]v :split -nnoremap [Window] :LeaderGuide "s" -xmap \T (table-mode-tableize-delimiter) -xmap \tt (table-mode-tableize) -nmap \tt (table-mode-tableize) -nnoremap \tm :call tablemode#Toggle() -nmap \slr :DBListVar -xmap \sa :DBVarRangeAssign -nmap \sap :'<,'>DBVarRangeAssign -nmap \sal :.,.DBVarRangeAssign -nmap \sas :1,$DBVarRangeAssign -nmap \so DBOrientationToggle -nmap \sh DBHistory -xmap \stcl :exec "DBListColumn '".DB_getVisualBlock()."'" -nmap \stcl DBListColumn -nmap \slv DBListView -nmap \slp DBListProcedure -nmap \slt DBListTable -xmap \slc :exec "DBListColumn '".DB_getVisualBlock()."'" -nmap \slc DBListColumn -nmap \sbp DBPromptForBufferParameters -nmap \sdpa DBDescribeProcedureAskName -xmap \sdp :exec "DBDescribeProcedure '".DB_getVisualBlock()."'" -nmap \sdp DBDescribeProcedure -nmap \sdta DBDescribeTableAskName -xmap \sdt :exec "DBDescribeTable '".DB_getVisualBlock()."'" -nmap \sdt DBDescribeTable -xmap \sT :exec "DBSelectFromTableTopX '".DB_getVisualBlock()."'" -nmap \sT DBSelectFromTopXTable -nmap \sta DBSelectFromTableAskName -nmap \stw DBSelectFromTableWithWhere -xmap \st :exec "DBSelectFromTable '".DB_getVisualBlock()."'" -nmap \st DBSelectFromTable -nmap \sep :'<,'>DBExecRangeSQL -nmap \sel :.,.DBExecRangeSQL -nmap \sea :1,$DBExecRangeSQL -nmap \sq DBExecSQL -nmap \sE DBExecSQLUnderTopXCursor -nmap \se DBExecSQLUnderCursor -xmap \sE DBExecVisualTopXSQL -xmap \se DBExecVisualSQL -map \\ (easymotion-prefix) -nmap \) :call SpaceVim#layers#core#tabline#jump(20) -nmap \( :call SpaceVim#layers#core#tabline#jump(19) -nmap \* :call SpaceVim#layers#core#tabline#jump(18) -nmap \& :call SpaceVim#layers#core#tabline#jump(17) -nmap \^ :call SpaceVim#layers#core#tabline#jump(16) -nmap \% :call SpaceVim#layers#core#tabline#jump(15) -nmap \$ :call SpaceVim#layers#core#tabline#jump(14) -nmap \# :call SpaceVim#layers#core#tabline#jump(13) -nmap \@ :call SpaceVim#layers#core#tabline#jump(12) -nmap \! :call SpaceVim#layers#core#tabline#jump(11) -nmap \0 :call SpaceVim#layers#core#tabline#jump(10) -nmap \9 :call SpaceVim#layers#core#tabline#jump(9) -nmap \8 :call SpaceVim#layers#core#tabline#jump(8) -nmap \7 :call SpaceVim#layers#core#tabline#jump(7) -nmap \6 :call SpaceVim#layers#core#tabline#jump(6) -nmap \5 :call SpaceVim#layers#core#tabline#jump(5) -nmap \4 :call SpaceVim#layers#core#tabline#jump(4) -nmap \3 :call SpaceVim#layers#core#tabline#jump(3) -nmap \2 :call SpaceVim#layers#core#tabline#jump(2) -nmap \1 :call SpaceVim#layers#core#tabline#jump(1) -vnoremap \ :LeaderGuideVisual get(g:, 'mapleader', '\') -nnoremap \ :LeaderGuide get(g:, 'mapleader', '\') -nnoremap \qc :call setqflist([]) -nnoremap \qr q -nnoremap \ql :copen -nnoremap \qp :cprev -nnoremap \qn :cnext -xnoremap \Y :call SpaceVim#plugins#pastebin#paste() -xnoremap \P clipboard#paste('P') -xnoremap \p clipboard#paste('p') -nnoremap \P clipboard#paste('P') -nnoremap \p clipboard#paste('p') -xnoremap \y :call clipboard#yank() -omap ]% (matchup-]%) -xmap ]% (matchup-]%) -nmap ]% (matchup-]%) -nnoremap ]p p -nnoremap ]t :tabnext -nnoremap ]l :lnext -nnoremap ]b :bn | stopinsert -nnoremap ]e :execute 'move +'. v:count1 -nnoremap ] :put =repeat(nr2char(10), v:count1) -vnoremap ] dggP`` -vnoremap ] dGp`` -nnoremap ] ddggP`` -nnoremap ] ddGp`` -omap ae (textobj-entire-a) -xmap ae (textobj-entire-a) -omap a% (matchup-a%) -xmap a% (matchup-a%) -omap ai (textobj-indent-a) -xmap ai (textobj-indent-a) -omap aI (textobj-indent-same-a) -xmap aI (textobj-indent-same-a) -omap al (textobj-line-a) -xmap al (textobj-line-a) -nmap cS CSurround -nmap cs Csurround -nmap ds Dsurround -nmap d(easymotion-prefix)l (easyoperator-line-delete) -omap f (clever-f-f) -xmap f (clever-f-f) -nmap f (clever-f-f) -xmap gS VgSurround -omap g% (matchup-g%) -xmap g% (matchup-g%) -nmap g% (matchup-g%) -vmap gx (openbrowser-smart-search) -nmap gx (openbrowser-smart-search) -vmap gs (openbrowser-search) -vmap go (openbrowser-open) -nnoremap gp '`['.strpart(getregtype(), 0, 1).'`]' -nnoremap g= :call SpaceVim#mapping#format() -nnoremap gd :call SpaceVim#mapping#gd() -nnoremap gD :call SpaceVim#mapping#g_capital_d() -nnoremap g g -nnoremap g g -nnoremap gv gv -nmap gs (openbrowser-search) -nmap go (openbrowser-open) -nnoremap gm gm -nnoremap gg gg -nnoremap ga ga -nnoremap g~ g~ -nnoremap g_ g_ -nnoremap g^ g^ -nnoremap g] g] -nnoremap gt gt -nnoremap gT gT -nnoremap gR gR -nnoremap gq gq -nnoremap gQ gQ -nnoremap gn gn -nnoremap gN gN -nnoremap gJ gJ -nnoremap gi gi -nnoremap gI gI -nnoremap gh gh -nnoremap gH gH -nnoremap gU gU -nnoremap gE gE -nnoremap gu gu -nnoremap gk gk -nnoremap gj gj -nnoremap gF gF -nnoremap gf gf -nnoremap g< g< -nnoremap ge ge -nnoremap g g -nnoremap g0 :tabfirst -nnoremap g g -nnoremap g$ :tablast -nnoremap g@ g@ -nnoremap g; g; -nnoremap g, g, -nnoremap g- g- -nnoremap g+ g+ -nnoremap g` g` -nnoremap g' g' -nnoremap g& g& -nnoremap g g -nnoremap g g -nmap g [G] -nnoremap gr tabpagenr('#') > 0 ? ':exe "tabnext " . tabpagenr("#") ' : '' -omap ie (textobj-entire-i) -xmap ie (textobj-entire-i) -omap i% (matchup-i%) -xmap i% (matchup-i%) -omap ii (textobj-indent-i) -xmap ii (textobj-indent-i) -omap iI (textobj-indent-same-i) -xmap iI (textobj-indent-same-i) -omap il (textobj-line-i) -xmap il (textobj-line-i) -nnoremap q :call SpaceVim#mapping#SmartClose() -nmap s [Window] -omap t (clever-f-t) -xmap t (clever-f-t) -nmap t (clever-f-t) -xmap v (expand_region_expand) -nmap ySS YSsurround -nmap ySs YSsurround -nmap yss Yssurround -nmap yS YSurround -nmap ys Ysurround -nmap y(easymotion-prefix)l (easyoperator-line-yank) -omap z% (matchup-z%) -xmap z% (matchup-z%) -nmap z% (matchup-z%) -nnoremap zx zx -nnoremap zw zw -nnoremap zv zv -nnoremap zt zt -nnoremap zs zs -nnoremap zr zr -nnoremap zo zo -nnoremap zn zn -nnoremap zm zm -nnoremap z zl -nnoremap zl zl -nnoremap zK zkzx -nnoremap zk zk -nnoremap zJ zjzx -nnoremap zj zj -nnoremap zi zi -nnoremap z zh -nnoremap zh zh -nnoremap zg zg -nnoremap zf zf -nnoremap ze ze -nnoremap zd zd -nnoremap zc zc -nnoremap zb zb -nnoremap za za -nnoremap zX zX -nnoremap zW zW -nnoremap zR zR -nnoremap zO zO -nnoremap zN zN -nnoremap zM zM -nnoremap zL zL -nnoremap zH zH -nnoremap zG zG -nnoremap zF zF -nnoremap zE zE -nnoremap zD zD -nnoremap zC zC -nnoremap zA zA -nnoremap z= z= -nnoremap z. z. -nnoremap z^ z^ -nnoremap z- z- -nnoremap z+ z+ -nnoremap z z -nmap z [Z] -nnoremap zz zz -nnoremap (nohlsearch) :nohlsearch -xnoremap NERDCommenterUncomment :call NERDComment("x", "Uncomment") -nnoremap NERDCommenterUncomment :call NERDComment("n", "Uncomment") -xnoremap NERDCommenterAlignBoth :call NERDComment("x", "AlignBoth") -nnoremap NERDCommenterAlignBoth :call NERDComment("n", "AlignBoth") -xnoremap NERDCommenterAlignLeft :call NERDComment("x", "AlignLeft") -nnoremap NERDCommenterAlignLeft :call NERDComment("n", "AlignLeft") -nnoremap NERDCommenterAppend :call NERDComment("n", "Append") -xnoremap NERDCommenterYank :call NERDComment("x", "Yank") -nnoremap NERDCommenterYank :call NERDComment("n", "Yank") -xnoremap NERDCommenterSexy :call NERDComment("x", "Sexy") -nnoremap NERDCommenterSexy :call NERDComment("n", "Sexy") -xnoremap NERDCommenterInvert :call NERDComment("x", "Invert") -nnoremap NERDCommenterInvert :call NERDComment("n", "Invert") -nnoremap NERDCommenterToEOL :call NERDComment("n", "ToEOL") -xnoremap NERDCommenterNested :call NERDComment("x", "Nested") -nnoremap NERDCommenterNested :call NERDComment("n", "Nested") -xnoremap NERDCommenterMinimal :call NERDComment("x", "Minimal") -nnoremap NERDCommenterMinimal :call NERDComment("n", "Minimal") -xnoremap NERDCommenterToggle :call NERDComment("x", "Toggle") -nnoremap NERDCommenterToggle :call NERDComment("n", "Toggle") -xnoremap NERDCommenterComment :call NERDComment("x", "Comment") -nnoremap NERDCommenterComment :call NERDComment("n", "Comment") -noremap (clever-f-repeat-back) clever_f#repeat(1) -noremap (clever-f-repeat-forward) clever_f#repeat(0) -noremap (clever-f-reset) clever_f#reset() -noremap (clever-f-T) clever_f#find_with('T') -noremap (clever-f-t) clever_f#find_with('t') -noremap (clever-f-F) clever_f#find_with('F') -noremap (clever-f-f) clever_f#find_with('f') -nnoremap SurroundRepeat . -nnoremap (table-mode-sort) :call tablemode#spreadsheet#Sort('') -nnoremap (table-mode-eval-formula) :call tablemode#spreadsheet#formula#EvaluateFormulaLine() -nnoremap (table-mode-add-formula) :call tablemode#spreadsheet#formula#Add() -nnoremap (table-mode-insert-column-after) :call tablemode#spreadsheet#InsertColumn(1) -nnoremap (table-mode-insert-column-before) :call tablemode#spreadsheet#InsertColumn(0) -nnoremap (table-mode-delete-column) :call tablemode#spreadsheet#DeleteColumn() -nnoremap (table-mode-delete-row) :call tablemode#spreadsheet#DeleteRow() -xnoremap (table-mode-cell-text-object-i) :call tablemode#spreadsheet#cell#TextObject(1) -xnoremap (table-mode-cell-text-object-a) :call tablemode#spreadsheet#cell#TextObject(0) -onoremap (table-mode-cell-text-object-i) :call tablemode#spreadsheet#cell#TextObject(1) -onoremap (table-mode-cell-text-object-a) :call tablemode#spreadsheet#cell#TextObject(0) -nnoremap (table-mode-motion-right) :call tablemode#spreadsheet#cell#Motion('l') -nnoremap (table-mode-motion-left) :call tablemode#spreadsheet#cell#Motion('h') -nnoremap (table-mode-motion-down) :call tablemode#spreadsheet#cell#Motion('j') -nnoremap (table-mode-motion-up) :call tablemode#spreadsheet#cell#Motion('k') -nnoremap (table-mode-realign) :call tablemode#table#Realign('.') -xnoremap (table-mode-tableize-delimiter) :call tablemode#TableizeByDelimiter() -xnoremap (table-mode-tableize) :Tableize -nnoremap (table-mode-tableize) :Tableize -onoremap (fzf-maps-o) :call fzf#vim#maps('o', 0) -xnoremap (fzf-maps-x) :call fzf#vim#maps('x', 0) -nnoremap (fzf-maps-n) :call fzf#vim#maps('n', 0) -nnoremap (startify-open-buffers) :call startify#open_buffers() -map (easymotion-prefix)N (easymotion-N) -map (easymotion-prefix)n (easymotion-n) -map (easymotion-prefix)k (easymotion-k) -map (easymotion-prefix)j (easymotion-j) -map (easymotion-prefix)gE (easymotion-gE) -map (easymotion-prefix)ge (easymotion-ge) -map (easymotion-prefix)E (easymotion-E) -map (easymotion-prefix)e (easymotion-e) -map (easymotion-prefix)B (easymotion-B) -map (easymotion-prefix)b (easymotion-b) -map (easymotion-prefix)W (easymotion-W) -map (easymotion-prefix)w (easymotion-w) -map (easymotion-prefix)T (easymotion-T) -map (easymotion-prefix)t (easymotion-t) -map (easymotion-prefix)s (easymotion-s) -map (easymotion-prefix)F (easymotion-F) -map (easymotion-prefix)f (easymotion-f) -xnoremap (easymotion-activate) :call EasyMotion#activate(1) -nnoremap (easymotion-activate) :call EasyMotion#activate(0) -snoremap (easymotion-activate) :call EasyMotion#activate(0) -onoremap (easymotion-activate) :call EasyMotion#activate(0) -noremap (easymotion-dotrepeat) :call EasyMotion#DotRepeat() -xnoremap (easymotion-repeat) :call EasyMotion#Repeat(1) -nnoremap (easymotion-repeat) :call EasyMotion#Repeat(0) -snoremap (easymotion-repeat) :call EasyMotion#Repeat(0) -onoremap (easymotion-repeat) :call EasyMotion#Repeat(0) -xnoremap (easymotion-prev) :call EasyMotion#NextPrevious(1,1) -nnoremap (easymotion-prev) :call EasyMotion#NextPrevious(0,1) -snoremap (easymotion-prev) :call EasyMotion#NextPrevious(0,1) -onoremap (easymotion-prev) :call EasyMotion#NextPrevious(0,1) -xnoremap (easymotion-next) :call EasyMotion#NextPrevious(1,0) -nnoremap (easymotion-next) :call EasyMotion#NextPrevious(0,0) -snoremap (easymotion-next) :call EasyMotion#NextPrevious(0,0) -onoremap (easymotion-next) :call EasyMotion#NextPrevious(0,0) -xnoremap (easymotion-wl) :call EasyMotion#WBL(1,0) -nnoremap (easymotion-wl) :call EasyMotion#WBL(0,0) -snoremap (easymotion-wl) :call EasyMotion#WBL(0,0) -onoremap (easymotion-wl) :call EasyMotion#WBL(0,0) -xnoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(1,0) -nnoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(0,0) -snoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(0,0) -onoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(0,0) -xnoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(1,2) -nnoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(0,2) -snoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(0,2) -onoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(0,2) -xnoremap (easymotion-bd-wl) :call EasyMotion#WBL(1,2) -nnoremap (easymotion-bd-wl) :call EasyMotion#WBL(0,2) -snoremap (easymotion-bd-wl) :call EasyMotion#WBL(0,2) -onoremap (easymotion-bd-wl) :call EasyMotion#WBL(0,2) -xnoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(1,1) -nnoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(0,1) -snoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(0,1) -onoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(0,1) -xnoremap (easymotion-bl) :call EasyMotion#WBL(1,1) -nnoremap (easymotion-bl) :call EasyMotion#WBL(0,1) -snoremap (easymotion-bl) :call EasyMotion#WBL(0,1) -onoremap (easymotion-bl) :call EasyMotion#WBL(0,1) -xnoremap (easymotion-el) :call EasyMotion#EL(1,0) -nnoremap (easymotion-el) :call EasyMotion#EL(0,0) -snoremap (easymotion-el) :call EasyMotion#EL(0,0) -onoremap (easymotion-el) :call EasyMotion#EL(0,0) -xnoremap (easymotion-gel) :call EasyMotion#EL(1,1) -nnoremap (easymotion-gel) :call EasyMotion#EL(0,1) -snoremap (easymotion-gel) :call EasyMotion#EL(0,1) -onoremap (easymotion-gel) :call EasyMotion#EL(0,1) -xnoremap (easymotion-bd-el) :call EasyMotion#EL(1,2) -nnoremap (easymotion-bd-el) :call EasyMotion#EL(0,2) -snoremap (easymotion-bd-el) :call EasyMotion#EL(0,2) -onoremap (easymotion-bd-el) :call EasyMotion#EL(0,2) -xnoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(1,2) -nnoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(0,2) -snoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(0,2) -onoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(0,2) -xnoremap (easymotion-vim-n) :call EasyMotion#Search(1,0,1) -nnoremap (easymotion-vim-n) :call EasyMotion#Search(0,0,1) -snoremap (easymotion-vim-n) :call EasyMotion#Search(0,0,1) -onoremap (easymotion-vim-n) :call EasyMotion#Search(0,0,1) -xnoremap (easymotion-n) :call EasyMotion#Search(1,0,0) -nnoremap (easymotion-n) :call EasyMotion#Search(0,0,0) -snoremap (easymotion-n) :call EasyMotion#Search(0,0,0) -onoremap (easymotion-n) :call EasyMotion#Search(0,0,0) -xnoremap (easymotion-bd-n) :call EasyMotion#Search(1,2,0) -nnoremap (easymotion-bd-n) :call EasyMotion#Search(0,2,0) -snoremap (easymotion-bd-n) :call EasyMotion#Search(0,2,0) -onoremap (easymotion-bd-n) :call EasyMotion#Search(0,2,0) -xnoremap (easymotion-vim-N) :call EasyMotion#Search(1,1,1) -nnoremap (easymotion-vim-N) :call EasyMotion#Search(0,1,1) -snoremap (easymotion-vim-N) :call EasyMotion#Search(0,1,1) -onoremap (easymotion-vim-N) :call EasyMotion#Search(0,1,1) -xnoremap (easymotion-N) :call EasyMotion#Search(1,1,0) -nnoremap (easymotion-N) :call EasyMotion#Search(0,1,0) -snoremap (easymotion-N) :call EasyMotion#Search(0,1,0) -onoremap (easymotion-N) :call EasyMotion#Search(0,1,0) -xnoremap (easymotion-eol-j) :call EasyMotion#Eol(1,0) -nnoremap (easymotion-eol-j) :call EasyMotion#Eol(0,0) -snoremap (easymotion-eol-j) :call EasyMotion#Eol(0,0) -onoremap (easymotion-eol-j) :call EasyMotion#Eol(0,0) -xnoremap (easymotion-sol-k) :call EasyMotion#Sol(1,1) -nnoremap (easymotion-sol-k) :call EasyMotion#Sol(0,1) -snoremap (easymotion-sol-k) :call EasyMotion#Sol(0,1) -onoremap (easymotion-sol-k) :call EasyMotion#Sol(0,1) -xnoremap (easymotion-sol-j) :call EasyMotion#Sol(1,0) -nnoremap (easymotion-sol-j) :call EasyMotion#Sol(0,0) -snoremap (easymotion-sol-j) :call EasyMotion#Sol(0,0) -onoremap (easymotion-sol-j) :call EasyMotion#Sol(0,0) -xnoremap (easymotion-k) :call EasyMotion#JK(1,1) -nnoremap (easymotion-k) :call EasyMotion#JK(0,1) -snoremap (easymotion-k) :call EasyMotion#JK(0,1) -onoremap (easymotion-k) :call EasyMotion#JK(0,1) -xnoremap (easymotion-j) :call EasyMotion#JK(1,0) -nnoremap (easymotion-j) :call EasyMotion#JK(0,0) -snoremap (easymotion-j) :call EasyMotion#JK(0,0) -onoremap (easymotion-j) :call EasyMotion#JK(0,0) -xnoremap (easymotion-bd-jk) :call EasyMotion#JK(1,2) -nnoremap (easymotion-bd-jk) :call EasyMotion#JK(0,2) -snoremap (easymotion-bd-jk) :call EasyMotion#JK(0,2) -onoremap (easymotion-bd-jk) :call EasyMotion#JK(0,2) -xnoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(1,2) -nnoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(0,2) -snoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(0,2) -onoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(0,2) -xnoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(1,2) -nnoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(0,2) -snoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(0,2) -onoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(0,2) -xnoremap (easymotion-eol-k) :call EasyMotion#Eol(1,1) -nnoremap (easymotion-eol-k) :call EasyMotion#Eol(0,1) -snoremap (easymotion-eol-k) :call EasyMotion#Eol(0,1) -onoremap (easymotion-eol-k) :call EasyMotion#Eol(0,1) -xnoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(1,1) -nnoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(0,1) -snoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(0,1) -onoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(0,1) -xnoremap (easymotion-w) :call EasyMotion#WB(1,0) -nnoremap (easymotion-w) :call EasyMotion#WB(0,0) -snoremap (easymotion-w) :call EasyMotion#WB(0,0) -onoremap (easymotion-w) :call EasyMotion#WB(0,0) -xnoremap (easymotion-bd-W) :call EasyMotion#WBW(1,2) -nnoremap (easymotion-bd-W) :call EasyMotion#WBW(0,2) -snoremap (easymotion-bd-W) :call EasyMotion#WBW(0,2) -onoremap (easymotion-bd-W) :call EasyMotion#WBW(0,2) -xnoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(1,0) -nnoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(0,0) -snoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(0,0) -onoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(0,0) -xnoremap (easymotion-gE) :call EasyMotion#EW(1,1) -nnoremap (easymotion-gE) :call EasyMotion#EW(0,1) -snoremap (easymotion-gE) :call EasyMotion#EW(0,1) -onoremap (easymotion-gE) :call EasyMotion#EW(0,1) -xnoremap (easymotion-e) :call EasyMotion#E(1,0) -nnoremap (easymotion-e) :call EasyMotion#E(0,0) -snoremap (easymotion-e) :call EasyMotion#E(0,0) -onoremap (easymotion-e) :call EasyMotion#E(0,0) -xnoremap (easymotion-bd-E) :call EasyMotion#EW(1,2) -nnoremap (easymotion-bd-E) :call EasyMotion#EW(0,2) -snoremap (easymotion-bd-E) :call EasyMotion#EW(0,2) -onoremap (easymotion-bd-E) :call EasyMotion#EW(0,2) -xnoremap (easymotion-iskeyword-e) :call EasyMotion#EK(1,0) -nnoremap (easymotion-iskeyword-e) :call EasyMotion#EK(0,0) -snoremap (easymotion-iskeyword-e) :call EasyMotion#EK(0,0) -onoremap (easymotion-iskeyword-e) :call EasyMotion#EK(0,0) -xnoremap (easymotion-b) :call EasyMotion#WB(1,1) -nnoremap (easymotion-b) :call EasyMotion#WB(0,1) -snoremap (easymotion-b) :call EasyMotion#WB(0,1) -onoremap (easymotion-b) :call EasyMotion#WB(0,1) -xnoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(1,1) -nnoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(0,1) -snoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(0,1) -onoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(0,1) -xnoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(1,2) -nnoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(0,2) -snoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(0,2) -onoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(0,2) -xnoremap (easymotion-W) :call EasyMotion#WBW(1,0) -nnoremap (easymotion-W) :call EasyMotion#WBW(0,0) -snoremap (easymotion-W) :call EasyMotion#WBW(0,0) -onoremap (easymotion-W) :call EasyMotion#WBW(0,0) -xnoremap (easymotion-bd-w) :call EasyMotion#WB(1,2) -nnoremap (easymotion-bd-w) :call EasyMotion#WB(0,2) -snoremap (easymotion-bd-w) :call EasyMotion#WB(0,2) -onoremap (easymotion-bd-w) :call EasyMotion#WB(0,2) -xnoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(1,2) -nnoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(0,2) -snoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(0,2) -onoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(0,2) -xnoremap (easymotion-ge) :call EasyMotion#E(1,1) -nnoremap (easymotion-ge) :call EasyMotion#E(0,1) -snoremap (easymotion-ge) :call EasyMotion#E(0,1) -onoremap (easymotion-ge) :call EasyMotion#E(0,1) -xnoremap (easymotion-E) :call EasyMotion#EW(1,0) -nnoremap (easymotion-E) :call EasyMotion#EW(0,0) -snoremap (easymotion-E) :call EasyMotion#EW(0,0) -onoremap (easymotion-E) :call EasyMotion#EW(0,0) -xnoremap (easymotion-bd-e) :call EasyMotion#E(1,2) -nnoremap (easymotion-bd-e) :call EasyMotion#E(0,2) -snoremap (easymotion-bd-e) :call EasyMotion#E(0,2) -onoremap (easymotion-bd-e) :call EasyMotion#E(0,2) -xnoremap (easymotion-B) :call EasyMotion#WBW(1,1) -nnoremap (easymotion-B) :call EasyMotion#WBW(0,1) -snoremap (easymotion-B) :call EasyMotion#WBW(0,1) -onoremap (easymotion-B) :call EasyMotion#WBW(0,1) -nnoremap (easymotion-overwin-w) :call EasyMotion#overwin#w() -nnoremap (easymotion-overwin-line) :call EasyMotion#overwin#line() -nnoremap (easymotion-overwin-f2) :call EasyMotion#OverwinF(2) -nnoremap (easymotion-overwin-f) :call EasyMotion#OverwinF(1) -xnoremap (easymotion-Tln) :call EasyMotion#TL(-1,1,1) -nnoremap (easymotion-Tln) :call EasyMotion#TL(-1,0,1) -snoremap (easymotion-Tln) :call EasyMotion#TL(-1,0,1) -onoremap (easymotion-Tln) :call EasyMotion#TL(-1,0,1) -xnoremap (easymotion-t2) :call EasyMotion#T(2,1,0) -nnoremap (easymotion-t2) :call EasyMotion#T(2,0,0) -snoremap (easymotion-t2) :call EasyMotion#T(2,0,0) -onoremap (easymotion-t2) :call EasyMotion#T(2,0,0) -xnoremap (easymotion-t) :call EasyMotion#T(1,1,0) -nnoremap (easymotion-t) :call EasyMotion#T(1,0,0) -snoremap (easymotion-t) :call EasyMotion#T(1,0,0) -onoremap (easymotion-t) :call EasyMotion#T(1,0,0) -xnoremap (easymotion-s) :call EasyMotion#S(1,1,2) -nnoremap (easymotion-s) :call EasyMotion#S(1,0,2) -snoremap (easymotion-s) :call EasyMotion#S(1,0,2) -onoremap (easymotion-s) :call EasyMotion#S(1,0,2) -xnoremap (easymotion-tn) :call EasyMotion#T(-1,1,0) -nnoremap (easymotion-tn) :call EasyMotion#T(-1,0,0) -snoremap (easymotion-tn) :call EasyMotion#T(-1,0,0) -onoremap (easymotion-tn) :call EasyMotion#T(-1,0,0) -xnoremap (easymotion-bd-t2) :call EasyMotion#T(2,1,2) -nnoremap (easymotion-bd-t2) :call EasyMotion#T(2,0,2) -snoremap (easymotion-bd-t2) :call EasyMotion#T(2,0,2) -onoremap (easymotion-bd-t2) :call EasyMotion#T(2,0,2) -xnoremap (easymotion-tl) :call EasyMotion#TL(1,1,0) -nnoremap (easymotion-tl) :call EasyMotion#TL(1,0,0) -snoremap (easymotion-tl) :call EasyMotion#TL(1,0,0) -onoremap (easymotion-tl) :call EasyMotion#TL(1,0,0) -xnoremap (easymotion-bd-tn) :call EasyMotion#T(-1,1,2) -nnoremap (easymotion-bd-tn) :call EasyMotion#T(-1,0,2) -snoremap (easymotion-bd-tn) :call EasyMotion#T(-1,0,2) -onoremap (easymotion-bd-tn) :call EasyMotion#T(-1,0,2) -xnoremap (easymotion-fn) :call EasyMotion#S(-1,1,0) -nnoremap (easymotion-fn) :call EasyMotion#S(-1,0,0) -snoremap (easymotion-fn) :call EasyMotion#S(-1,0,0) -onoremap (easymotion-fn) :call EasyMotion#S(-1,0,0) -xnoremap (easymotion-bd-tl) :call EasyMotion#TL(1,1,2) -nnoremap (easymotion-bd-tl) :call EasyMotion#TL(1,0,2) -snoremap (easymotion-bd-tl) :call EasyMotion#TL(1,0,2) -onoremap (easymotion-bd-tl) :call EasyMotion#TL(1,0,2) -xnoremap (easymotion-fl) :call EasyMotion#SL(1,1,0) -nnoremap (easymotion-fl) :call EasyMotion#SL(1,0,0) -snoremap (easymotion-fl) :call EasyMotion#SL(1,0,0) -onoremap (easymotion-fl) :call EasyMotion#SL(1,0,0) -xnoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,1,2) -nnoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,0,2) -snoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,0,2) -onoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,0,2) -xnoremap (easymotion-bd-fn) :call EasyMotion#S(-1,1,2) -nnoremap (easymotion-bd-fn) :call EasyMotion#S(-1,0,2) -snoremap (easymotion-bd-fn) :call EasyMotion#S(-1,0,2) -onoremap (easymotion-bd-fn) :call EasyMotion#S(-1,0,2) -xnoremap (easymotion-f) :call EasyMotion#S(1,1,0) -nnoremap (easymotion-f) :call EasyMotion#S(1,0,0) -snoremap (easymotion-f) :call EasyMotion#S(1,0,0) -onoremap (easymotion-f) :call EasyMotion#S(1,0,0) -xnoremap (easymotion-bd-fl) :call EasyMotion#SL(1,1,2) -nnoremap (easymotion-bd-fl) :call EasyMotion#SL(1,0,2) -snoremap (easymotion-bd-fl) :call EasyMotion#SL(1,0,2) -onoremap (easymotion-bd-fl) :call EasyMotion#SL(1,0,2) -xnoremap (easymotion-Fl2) :call EasyMotion#SL(2,1,1) -nnoremap (easymotion-Fl2) :call EasyMotion#SL(2,0,1) -snoremap (easymotion-Fl2) :call EasyMotion#SL(2,0,1) -onoremap (easymotion-Fl2) :call EasyMotion#SL(2,0,1) -xnoremap (easymotion-tl2) :call EasyMotion#TL(2,1,0) -nnoremap (easymotion-tl2) :call EasyMotion#TL(2,0,0) -snoremap (easymotion-tl2) :call EasyMotion#TL(2,0,0) -onoremap (easymotion-tl2) :call EasyMotion#TL(2,0,0) -xnoremap (easymotion-f2) :call EasyMotion#S(2,1,0) -nnoremap (easymotion-f2) :call EasyMotion#S(2,0,0) -snoremap (easymotion-f2) :call EasyMotion#S(2,0,0) -onoremap (easymotion-f2) :call EasyMotion#S(2,0,0) -xnoremap (easymotion-Fln) :call EasyMotion#SL(-1,1,1) -nnoremap (easymotion-Fln) :call EasyMotion#SL(-1,0,1) -snoremap (easymotion-Fln) :call EasyMotion#SL(-1,0,1) -onoremap (easymotion-Fln) :call EasyMotion#SL(-1,0,1) -xnoremap (easymotion-sln) :call EasyMotion#SL(-1,1,2) -nnoremap (easymotion-sln) :call EasyMotion#SL(-1,0,2) -snoremap (easymotion-sln) :call EasyMotion#SL(-1,0,2) -onoremap (easymotion-sln) :call EasyMotion#SL(-1,0,2) -xnoremap (easymotion-tln) :call EasyMotion#TL(-1,1,0) -nnoremap (easymotion-tln) :call EasyMotion#TL(-1,0,0) -snoremap (easymotion-tln) :call EasyMotion#TL(-1,0,0) -onoremap (easymotion-tln) :call EasyMotion#TL(-1,0,0) -xnoremap (easymotion-fl2) :call EasyMotion#SL(2,1,0) -nnoremap (easymotion-fl2) :call EasyMotion#SL(2,0,0) -snoremap (easymotion-fl2) :call EasyMotion#SL(2,0,0) -onoremap (easymotion-fl2) :call EasyMotion#SL(2,0,0) -xnoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,1,2) -nnoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,0,2) -snoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,0,2) -onoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,0,2) -xnoremap (easymotion-T2) :call EasyMotion#T(2,1,1) -nnoremap (easymotion-T2) :call EasyMotion#T(2,0,1) -snoremap (easymotion-T2) :call EasyMotion#T(2,0,1) -onoremap (easymotion-T2) :call EasyMotion#T(2,0,1) -xnoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,1,2) -nnoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,0,2) -snoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,0,2) -onoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,0,2) -xnoremap (easymotion-T) :call EasyMotion#T(1,1,1) -nnoremap (easymotion-T) :call EasyMotion#T(1,0,1) -snoremap (easymotion-T) :call EasyMotion#T(1,0,1) -onoremap (easymotion-T) :call EasyMotion#T(1,0,1) -xnoremap (easymotion-bd-t) :call EasyMotion#T(1,1,2) -nnoremap (easymotion-bd-t) :call EasyMotion#T(1,0,2) -snoremap (easymotion-bd-t) :call EasyMotion#T(1,0,2) -onoremap (easymotion-bd-t) :call EasyMotion#T(1,0,2) -xnoremap (easymotion-Tn) :call EasyMotion#T(-1,1,1) -nnoremap (easymotion-Tn) :call EasyMotion#T(-1,0,1) -snoremap (easymotion-Tn) :call EasyMotion#T(-1,0,1) -onoremap (easymotion-Tn) :call EasyMotion#T(-1,0,1) -xnoremap (easymotion-s2) :call EasyMotion#S(2,1,2) -nnoremap (easymotion-s2) :call EasyMotion#S(2,0,2) -snoremap (easymotion-s2) :call EasyMotion#S(2,0,2) -onoremap (easymotion-s2) :call EasyMotion#S(2,0,2) -xnoremap (easymotion-Tl) :call EasyMotion#TL(1,1,1) -nnoremap (easymotion-Tl) :call EasyMotion#TL(1,0,1) -snoremap (easymotion-Tl) :call EasyMotion#TL(1,0,1) -onoremap (easymotion-Tl) :call EasyMotion#TL(1,0,1) -xnoremap (easymotion-sn) :call EasyMotion#S(-1,1,2) -nnoremap (easymotion-sn) :call EasyMotion#S(-1,0,2) -snoremap (easymotion-sn) :call EasyMotion#S(-1,0,2) -onoremap (easymotion-sn) :call EasyMotion#S(-1,0,2) -xnoremap (easymotion-Fn) :call EasyMotion#S(-1,1,1) -nnoremap (easymotion-Fn) :call EasyMotion#S(-1,0,1) -snoremap (easymotion-Fn) :call EasyMotion#S(-1,0,1) -onoremap (easymotion-Fn) :call EasyMotion#S(-1,0,1) -xnoremap (easymotion-sl) :call EasyMotion#SL(1,1,2) -nnoremap (easymotion-sl) :call EasyMotion#SL(1,0,2) -snoremap (easymotion-sl) :call EasyMotion#SL(1,0,2) -onoremap (easymotion-sl) :call EasyMotion#SL(1,0,2) -xnoremap (easymotion-Fl) :call EasyMotion#SL(1,1,1) -nnoremap (easymotion-Fl) :call EasyMotion#SL(1,0,1) -snoremap (easymotion-Fl) :call EasyMotion#SL(1,0,1) -onoremap (easymotion-Fl) :call EasyMotion#SL(1,0,1) -xnoremap (easymotion-sl2) :call EasyMotion#SL(2,1,2) -nnoremap (easymotion-sl2) :call EasyMotion#SL(2,0,2) -snoremap (easymotion-sl2) :call EasyMotion#SL(2,0,2) -onoremap (easymotion-sl2) :call EasyMotion#SL(2,0,2) -xnoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,1,2) -nnoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,0,2) -snoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,0,2) -onoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,0,2) -xnoremap (easymotion-F) :call EasyMotion#S(1,1,1) -nnoremap (easymotion-F) :call EasyMotion#S(1,0,1) -snoremap (easymotion-F) :call EasyMotion#S(1,0,1) -onoremap (easymotion-F) :call EasyMotion#S(1,0,1) -xnoremap (easymotion-bd-f) :call EasyMotion#S(1,1,2) -nnoremap (easymotion-bd-f) :call EasyMotion#S(1,0,2) -snoremap (easymotion-bd-f) :call EasyMotion#S(1,0,2) -onoremap (easymotion-bd-f) :call EasyMotion#S(1,0,2) -xnoremap (easymotion-F2) :call EasyMotion#S(2,1,1) -nnoremap (easymotion-F2) :call EasyMotion#S(2,0,1) -snoremap (easymotion-F2) :call EasyMotion#S(2,0,1) -onoremap (easymotion-F2) :call EasyMotion#S(2,0,1) -xnoremap (easymotion-bd-f2) :call EasyMotion#S(2,1,2) -nnoremap (easymotion-bd-f2) :call EasyMotion#S(2,0,2) -snoremap (easymotion-bd-f2) :call EasyMotion#S(2,0,2) -onoremap (easymotion-bd-f2) :call EasyMotion#S(2,0,2) -xnoremap (easymotion-Tl2) :call EasyMotion#TL(2,1,1) -nnoremap (easymotion-Tl2) :call EasyMotion#TL(2,0,1) -snoremap (easymotion-Tl2) :call EasyMotion#TL(2,0,1) -onoremap (easymotion-Tl2) :call EasyMotion#TL(2,0,1) -xnoremap (easymotion-fln) :call EasyMotion#SL(-1,1,0) -nnoremap (easymotion-fln) :call EasyMotion#SL(-1,0,0) -snoremap (easymotion-fln) :call EasyMotion#SL(-1,0,0) -onoremap (easymotion-fln) :call EasyMotion#SL(-1,0,0) -xnoremap (openbrowser-smart-search) :call openbrowser#_keymap_smart_search('v') -nnoremap (openbrowser-smart-search) :call openbrowser#_keymap_smart_search('n') -xnoremap (openbrowser-search) :call openbrowser#_keymap_search('v') -nnoremap (openbrowser-search) :call openbrowser#_keymap_search('n') -xnoremap (openbrowser-open-incognito) :call openbrowser#_keymap_open('v', 0, ['--incognito']) -nnoremap (openbrowser-open-incognito) :call openbrowser#_keymap_open('n', 0, ['--incognito']) -xnoremap (openbrowser-open) :call openbrowser#_keymap_open('v') -nnoremap (openbrowser-open) :call openbrowser#_keymap_open('n') -nnoremap (lsp-signature-help) :call lsp#ui#vim#signature_help#get_signature_help_under_cursor() -nnoremap (lsp-previous-reference) :call lsp#internal#document_highlight#jump(-1) -nnoremap (lsp-next-reference) :call lsp#internal#document_highlight#jump(+1) -nnoremap (lsp-status) :echo lsp#get_server_status() -nnoremap (lsp-peek-implementation) :call lsp#ui#vim#implementation(1) -nnoremap (lsp-implementation) :call lsp#ui#vim#implementation(0) -xnoremap (lsp-document-range-format) :silent call lsp#internal#document_range_formatting#format({ 'bufnr': bufnr('%') }) -nnoremap (lsp-document-range-format) :set opfunc=lsp#internal#document_range_formatting#opfunc g@ -vnoremap (lsp-document-format) :silent call lsp#internal#document_range_formatting#format({ 'bufnr': bufnr('%') }) -nnoremap (lsp-document-format) :call lsp#internal#document_formatting#format({ 'bufnr': bufnr('%') }) -nnoremap (lsp-workspace-symbol-search) :call lsp#internal#workspace_symbol#search#do({}) -nnoremap (lsp-workspace-symbol) :call lsp#ui#vim#workspace_symbol('') -nnoremap (lsp-peek-type-definition) :call lsp#ui#vim#type_definition(1) -nnoremap (lsp-type-hierarchy) :call lsp#internal#type_hierarchy#show() -nnoremap (lsp-type-definition) :call lsp#ui#vim#type_definition(0) -nnoremap (lsp-rename) :call lsp#ui#vim#rename() -nnoremap (lsp-references) :call lsp#ui#vim#references({}) -nnoremap (lsp-previous-diagnostic-nowrap) :call lsp#internal#diagnostics#movement#_previous_diagnostics("-wrap=0") -nnoremap (lsp-previous-diagnostic) :call lsp#internal#diagnostics#movement#_previous_diagnostics() -nnoremap (lsp-next-diagnostic-nowrap) :call lsp#internal#diagnostics#movement#_next_diagnostics("-wrap=0") -nnoremap (lsp-next-diagnostic) :call lsp#internal#diagnostics#movement#_next_diagnostics() -nnoremap (lsp-previous-warning-nowrap) :call lsp#internal#diagnostics#movement#_previous_warning("-wrap=0") -nnoremap (lsp-previous-warning) :call lsp#internal#diagnostics#movement#_previous_warning() -nnoremap (lsp-next-warning-nowrap) :call lsp#internal#diagnostics#movement#_next_warning("-wrap=0") -nnoremap (lsp-next-warning) :call lsp#internal#diagnostics#movement#_next_warning() -nnoremap (lsp-previous-error-nowrap) :call lsp#internal#diagnostics#movement#_previous_error("-wrap=0") -nnoremap (lsp-previous-error) :call lsp#internal#diagnostics#movement#_previous_error() -nnoremap (lsp-next-error-nowrap) :call lsp#internal#diagnostics#movement#_next_error("-wrap=0") -nnoremap (lsp-next-error) :call lsp#internal#diagnostics#movement#_next_error() -nnoremap (lsp-preview-focus) :call lsp#ui#vim#output#focuspreview() -nnoremap (lsp-preview-close) :call lsp#ui#vim#output#closepreview() -nnoremap (lsp-hover-preview) :call lsp#internal#document_hover#under_cursor#do({ 'ui': 'preview' }) -nnoremap (lsp-hover-float) :call lsp#internal#document_hover#under_cursor#do({ 'ui': 'float' }) -nnoremap (lsp-hover) :call lsp#internal#document_hover#under_cursor#do({}) -nnoremap (lsp-document-diagnostics) :call lsp#internal#diagnostics#document_diagnostics_command#do({}) -nnoremap (lsp-document-symbol-search) :call lsp#internal#document_symbol#search#do({}) -nnoremap (lsp-document-symbol) :call lsp#ui#vim#document_symbol() -nnoremap (lsp-peek-definition) :call lsp#ui#vim#definition(1) -nnoremap (lsp-definition) :call lsp#ui#vim#definition(0) -nnoremap (lsp-peek-declaration) :call lsp#ui#vim#declaration(1) -nnoremap (lsp-declaration) :call lsp#ui#vim#declaration(0) -nnoremap (lsp-code-lens) :call lsp#ui#vim#code_lens() -nnoremap (lsp-code-action-preview) :call lsp#ui#vim#code_action({ 'ui': 'preview' }) -nnoremap (lsp-code-action-float) :call lsp#ui#vim#code_action({ 'ui': 'float' }) -nnoremap (lsp-code-action) :call lsp#ui#vim#code_action({}) -nnoremap (lsp-call-hierarchy-outgoing) :call lsp#ui#vim#call_hierarchy_outgoing() -nnoremap (lsp-call-hierarchy-incoming) :call lsp#ui#vim#call_hierarchy_incoming({}) -xnoremap (expand_region_shrink) :call expand_region#next('v', '-') -xnoremap (expand_region_expand) :call expand_region#next('v', '+') -nnoremap (expand_region_expand) :call expand_region#next('n', '+') -snoremap (complete_parameter#overload_up) :call cmp#overload_next(0) -nnoremap (complete_parameter#overload_up) :call cmp#overload_next(0) -snoremap (complete_parameter#overload_down) :call cmp#overload_next(1) -nnoremap (complete_parameter#overload_down) :call cmp#overload_next(1) -snoremap (complete_parameter#goto_previous_parameter) :call cmp#goto_next_param(0) -nnoremap (complete_parameter#goto_previous_parameter) :call cmp#goto_next_param(0) -snoremap (complete_parameter#goto_next_parameter) :call cmp#goto_next_param(1) -nnoremap (complete_parameter#goto_next_parameter) :call cmp#goto_next_param(1) -nmap <2-LeftMouse> (matchup-double-click) -nnoremap (matchup-reload) :MatchupReload -nnoremap (matchup-double-click) :call matchup#text_obj#double_click() -onoremap (matchup-a%) :call matchup#text_obj#delimited(0, 0, 'delim_all') -onoremap (matchup-i%) :call matchup#text_obj#delimited(1, 0, 'delim_all') -xnoremap (matchup-a%) :call matchup#text_obj#delimited(0, 1, 'delim_all') -xnoremap (matchup-i%) :call matchup#text_obj#delimited(1, 1, 'delim_all') -onoremap (matchup-z%) :call matchup#motion#op('z%') -xnoremap 155_(matchup-z%) :call matchup#motion#jump_inside(1) -nnoremap (matchup-z%) :call matchup#motion#jump_inside(0) -onoremap (matchup-[%) :call matchup#motion#op('[%') -onoremap (matchup-]%) :call matchup#motion#op(']%') -xnoremap 155_(matchup-[%) :call matchup#motion#find_unmatched(1, 0) -xnoremap 155_(matchup-]%) :call matchup#motion#find_unmatched(1, 1) -nnoremap (matchup-[%) :call matchup#motion#find_unmatched(0, 0) -nnoremap (matchup-]%) :call matchup#motion#find_unmatched(0, 1) -onoremap (matchup-g%) :call matchup#motion#op('g%') -xnoremap 155_(matchup-g%) :call matchup#motion#find_matching_pair(1, 0) -onoremap (matchup-%) :call matchup#motion#op('%') -xnoremap 155_(matchup-%) :call matchup#motion#find_matching_pair(1, 1) -nnoremap (matchup-g%) :call matchup#motion#find_matching_pair(0, 0) -nnoremap (matchup-%) :call matchup#motion#find_matching_pair(0, 1) -nnoremap 155_(wise) empty(g:v_motion_force) ? 'v' : g:v_motion_force -nnoremap (matchup-hi-surround) :call matchup#matchparen#highlight_surrounding() -map (SmoothieBackwards) -map (SmoothieBackwards) -map (SmoothieBackwards) -map (SmoothieForwards) -map (SmoothieForwards) -map (SmoothieForwards) -map (SmoothieUpwards) -map (SmoothieDownwards) -noremap (Smoothie_G) call smoothie#cursor_movement('G')  -noremap (Smoothie_gg) call smoothie#cursor_movement('gg')  -noremap (SmoothieBackwards) call smoothie#backwards()  -noremap (SmoothieForwards) call smoothie#forwards()  -noremap (SmoothieUpwards) call smoothie#upwards()  -noremap (SmoothieDownwards) call smoothie#downwards()  -nnoremap GitGutterPreviewHunk :call gitgutter#utility#warn('Please change your map GitGutterPreviewHunk to (GitGutterPreviewHunk)') -nnoremap (GitGutterPreviewHunk) :GitGutterPreviewHunk -nnoremap GitGutterUndoHunk :call gitgutter#utility#warn('Please change your map GitGutterUndoHunk to (GitGutterUndoHunk)') -nnoremap (GitGutterUndoHunk) :GitGutterUndoHunk -nnoremap GitGutterStageHunk :call gitgutter#utility#warn('Please change your map GitGutterStageHunk to (GitGutterStageHunk)') -nnoremap (GitGutterStageHunk) :GitGutterStageHunk -xnoremap GitGutterStageHunk :call gitgutter#utility#warn('Please change your map GitGutterStageHunk to (GitGutterStageHunk)') -xnoremap (GitGutterStageHunk) :GitGutterStageHunk -nnoremap GitGutterPrevHunk &diff ? '[c' : ":\call gitgutter#utility#warn('Please change your map \GitGutterPrevHunk to \(GitGutterPrevHunk)')\ " -nnoremap (GitGutterPrevHunk) &diff ? '[c' : ":\execute v:count1 . 'GitGutterPrevHunk'\ " -nnoremap GitGutterNextHunk &diff ? ']c' : ":\call gitgutter#utility#warn('Please change your map \GitGutterNextHunk to \(GitGutterNextHunk)')\ " -nnoremap (GitGutterNextHunk) &diff ? ']c' : ":\execute v:count1 . 'GitGutterNextHunk'\ " -xnoremap (GitGutterTextObjectOuterVisual) :call gitgutter#hunk#text_object(0) -xnoremap (GitGutterTextObjectInnerVisual) :call gitgutter#hunk#text_object(1) -onoremap (GitGutterTextObjectOuterPending) :call gitgutter#hunk#text_object(0) -onoremap (GitGutterTextObjectInnerPending) :call gitgutter#hunk#text_object(1) -xmap (easymotion-prefix)l (easyoperator-line-select) -omap (easymotion-prefix)l (easyoperator-line-select) -nnoremap (easyoperator-line-yank) :call easyoperator#line#selectlinesyank() -nnoremap (easyoperator-line-delete) :call easyoperator#line#selectlinesdelete() -xnoremap (easyoperator-line-select) :call easyoperator#line#selectlines() -onoremap (easyoperator-line-select) :call easyoperator#line#selectlines() -nnoremap (easyoperator-line-select) :call easyoperator#line#selectlines() -tnoremap (fzf-normal)  -tnoremap (fzf-insert) i -nnoremap (fzf-normal) -nnoremap (fzf-insert) i -nnoremap (grammarous-move-to-previous-error) :call grammarous#move_to_previous_error(getpos('.')[1 : 2], b:grammarous_result) -nnoremap (grammarous-move-to-next-error) :call grammarous#move_to_next_error(getpos('.')[1 : 2], b:grammarous_result) -nnoremap (grammarous-disable-category) :call grammarous#disable_category_at(getpos('.')[1 : 2], b:grammarous_result) -nnoremap (grammarous-disable-rule) :call grammarous#disable_rule_at(getpos('.')[1 : 2], b:grammarous_result) -nnoremap (grammarous-remove-error) :call grammarous#remove_error_at(getpos('.')[1 : 2], b:grammarous_result) -nnoremap (grammarous-close-info-window) :call grammarous#info_win#close() -nnoremap (grammarous-fixall) :call grammarous#fixall(b:grammarous_result) -nnoremap (grammarous-fixit) :call grammarous#fixit(grammarous#get_error_at(getpos('.')[1 : 2], b:grammarous_result)) -nnoremap (grammarous-reset) :call grammarous#reset() -nnoremap (grammarous-open-info-window) :call grammarous#create_update_info_window_of(b:grammarous_result) -nnoremap (grammarous-move-to-info-window) :call grammarous#create_and_jump_to_info_window_of(b:grammarous_result) -tnoremap :q -tnoremap :bnext -tnoremap :bprev -tnoremap :wincmd j -tnoremap :wincmd k -tnoremap :wincmd h -tnoremap :wincmd l -vnoremap YankGitRemoteURL :call SpaceVim#util#CopyToClipboard(3) -nnoremap YankGitRemoteURL :call SpaceVim#util#CopyToClipboard(2) -nnoremap :wincmd p -noremap :NERDTreeToggle -noremap :TagbarToggle -vnoremap ReverseLines :ReverseLines -nnoremap ReverseLines :ReverseLines -nnoremap :MundoToggle -vnoremap (wildfire-water) -xnoremap (jplus :call dein#autoload#_on_map('(jplus', 'vim-jplus','x') -nnoremap (jplus :call dein#autoload#_on_map('(jplus', 'vim-jplus','n') -xnoremap (wildfire- :call dein#autoload#_on_map('(wildfire-', 'wildfire.vim','x') -nnoremap (wildfire- :call dein#autoload#_on_map('(wildfire-', 'wildfire.vim','n') -xnoremap SpaceVim-plugin-iedit :call SpaceVim#plugins#iedit#start(1) -nnoremap SpaceVim-plugin-iedit :call SpaceVim#plugins#iedit#start() -vnoremap :w -nnoremap :w -nnoremap gk -nnoremap gj -xnoremap  :call SpaceVim#plugins#runner#close() -nnoremap :call SpaceVim#plugins#ctrlg#display() -vnoremap :m '<-2 gv=gv -vnoremap :m '>+1 gv=gv -nnoremap :m .-2 == -nnoremap :m .+1 == -nnoremap :wincmd j -nnoremap :wincmd k -nnoremap :wincmd h -nnoremap :wincmd l -cnoremap  -cnoremap  -cnoremap  -imap S ISurround -imap s Isurround -imap % (matchup-c_g%) -inoremap  pumvisible() ? "\" : "\ " -cnoremap  repeat('', strchars(getcmdline()) - getcmdpos() + 1) -imap  pumvisible() ? "\" : "\ " -imap  Isurround -cnoremap  w -imap ( pumvisible() ? has('patch-7.4.744') ? complete_parameter#pre_complete("()") : '(' : (len(maparg('delimitMate(', 'i')) == 0) ? "\delimitMate(" : '(' -inoremap jk  -let &cpo=s:cpo_save -unlet s:cpo_save -set autoindent -set autoread -set background=dark -set backspace=indent,eol,start -set backup -set backupdir=~/.cache/SpaceVim/old/backup// -set cindent -set complete=.,w,b,u,t -set completeopt=menu,menuone,longest -set cpoptions=aABceFsd -set directory=~/.cache/SpaceVim/old/swap// -set display=lastline -set expandtab -set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 -set fillchars=vert:│,fold:· -set grepprg=grep\ -nH\ $* -set guifont=Hack -set guioptions=agit -set helplang=en -set hidden -set hlsearch -set incsearch -set laststatus=2 -set listchars=tab:→\ ,eol:↵,trail:·,extends:↷,precedes:↶ -set matchtime=0 -set nomodeline -set mouse=nv -set mousemodel=popup -set nrformats=bin,hex -set pumheight=15 -set runtimepath=~/.SpaceVim.d/,~/.SpaceVim/,~/.SpaceVim/bundle/indentLine,~/.SpaceVim/bundle/vim-repeat,~/.SpaceVim/bundle/vim-grammarous,~/.SpaceVim/bundle/vim-virtualenv,~/.SpaceVim/bundle/vim-textobj-line,~/.cache/vimfiles/repos/github.com/junegunn/fzf,~/.SpaceVim/bundle/vim-hug-neovim-rpc,~/.SpaceVim/bundle/coveragepy.vim,~/.SpaceVim/bundle/vim-emoji,~/.SpaceVim/bundle/gtags.vim,~/.SpaceVim/bundle/vim-easyoperator-line,~/.SpaceVim/bundle/vim-cursorword,~/.cache/vimfiles/repos/github.com/nanotech/jellybeans.vim,~/.SpaceVim/bundle/neomake,~/.cache/vimfiles/repos/github.com/airblade/vim-gitgutter,~/.SpaceVim/bundle/neosnippet-snippets,~/.SpaceVim/bundle/tagbar,~/.SpaceVim/bundle/nvim-if-lua-compat,~/.SpaceVim/bundle/vim-smoothie,~/.SpaceVim/bundle/vim-textobj-indent,~/.cache/vimfiles/repos/github.com/icymind/NeoSolarized,~/.SpaceVim/bundle/vim-matchup,~/.cache/vimfiles/repos/github.com/racer-rust/vim-racer,~/.SpaceVim/bundle/gruvbox,~/.cache/vimfiles/repos/github.com/lambdalisue/vim-gista,~/.SpaceVim/bundle/CompleteParameter.vim,~/.cache/vimfiles/repos/github.com/joshdick/onedark.vim,~/.SpaceVim/bundle/vim-clipboard,~/.SpaceVim/bundle/python-imports.vim,~/.SpaceVim/bundle/editorconfig-vim,~/.cache/vimfiles/repos/github.com/srcery-colors/srcery-vim,~/.SpaceVim/bundle/delimitMate,~/.SpaceVim/bundle/vim-expand-region,~/.SpaceVim/bundle/vim-textobj-user,~/.cache/vimfiles/repos/github.com/prabirshrestha/vim-lsp,~/.cache/vimfiles/repos/github.com/w0ng/vim-hybrid,~/.SpaceVim/bundle/nerdtree,~/.SpaceVim/bundle/open-browser.vim,~/.SpaceVim/bundle/dracula,~/.SpaceVim/bundle/rust.vim,~/.SpaceVim/bundle/tagbar-proto.vim,~/.SpaceVim/bundle/vim-one,~/.cache/vimfiles/repos/github.com/Gabirel/molokai,~/.SpaceVim/bundle/tabular,~/.cache/vimfiles/repos/github.com/Shougo/deoplete-clangx,~/.cache/vimfiles/repos/github.com/vim-scripts/dbext.vim,~/.SpaceVim/bundle/git.vim,~/.SpaceVim/bundle/vim-easymotion,~/.SpaceVim/bundle/nvim-yarp,~/.SpaceVim/bundle/vim-startify,~/.cache/vimfiles/repos/github.com/arcticicestudio/nord-vim,~/.SpaceVim/bundle/github.vim,~/.cache/vimfiles/repos/github.com/junegunn/fzf.vim,~/.SpaceVim/bundle/tagbar-makefile.vim,~/.cache/vimfiles/repos/github.com/prabirshrestha/async.vim,~/.SpaceVim/bundle/dein.vim,~/.SpaceVim/bundle/vim-table-mode,~/.SpaceVim/bundle/neoformat,~/.SpaceVim/bundle/vim-textobj-entire,~/.SpaceVim/bundle/vim-surround,~/.cache/vimfiles/repos/github.com/SpaceVim/vim-material,~/.SpaceVim/bundle/deoplete-dictionary,~/.cache/vimfiles/repos/github.com/JuliaEditorSupport/julia-vim,~/.SpaceVim/bundle/clever-f.vim,~/.SpaceVim/bundle/nerdcommenter,~/.cache/vimfiles/repos/github.com/drewtempelmeyer/palenight.vim,~/.cache/vimfiles/.cache/vimrc/.dein,/usr/share/vim/vim90,~/.SpaceVim/bundle/indentLine/after,~/.SpaceVim/bundle/vim-matchup/after,~/.SpaceVim/bundle/CompleteParameter.vim/after,~/.cache/vimfiles/repos/github.com/srcery-colors/srcery-vim/after,~/.SpaceVim/bundle/dracula/after,~/.SpaceVim/bundle/rust.vim/after,~/.SpaceVim/bundle/tabular/after,~/.cache/vimfiles/.cache/vimrc/.dein/after,~/.SpaceVim.d/after,~/.SpaceVim/bundle/dein.vim/,~/.SpaceVim/after -set scrolloff=1 -set noshelltemp -set shiftwidth=3 -set shortmess=filnxtToOScsF -set showmatch -set noshowmode -set showtabline=2 -set sidescrolloff=5 -set smartindent -set smarttab -set softtabstop=3 -set spelllang=de_de -set suffixes=.bak,~,.o,.h,.info,.swp,.obj,.info,.aux,.log,.dvi,.bbl,.out,.o,.lo -set tabline=%!SpaceVim#layers#core#tabline#get() -set tabstop=3 -set tags=./tags,./TAGS,tags,TAGS,~/.cache/SpaceVim/tags/_home_max__fgfs_Aircraft_A320-family_/tags -set termencoding=utf-8 -set ttimeout -set ttimeoutlen=50 -set undodir=~/.cache/SpaceVim/old/undofile// -set undofile -set viminfo='20,\"500 -set wildignore=*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,*.ttf,*.TTF,*.png,*/target/*,.git,.svn,.hg,.DS_Store,*.svg -set wildignorecase -set wildmenu -set window=59 -set nowritebackup -let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1 -let v:this_session=expand(":p") -silent only -silent tabonly -cd ~/.fgfs/Aircraft/A320-family -if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' - let s:wipebuf = bufnr('%') -endif -if &shortmess =~ 'A' - set shortmess=aoOA -else - set shortmess=aoO -endif -badd +228 Nasal/FMGC/FCU.nas -badd +84 Nasal/FMGC/FMGC-b.nas -badd +3201 Models/FlightDeck/a320.flightdeck.xml -badd +1059 Nasal/FMGC/FMGC.nas -badd +784 A320-main.xml -argglobal -%argdel -edit Nasal/FMGC/FCU.nas -let s:save_splitbelow = &splitbelow -let s:save_splitright = &splitright -set splitbelow splitright -wincmd _ | wincmd | -vsplit -1wincmd h -wincmd w -let &splitbelow = s:save_splitbelow -let &splitright = s:save_splitright -wincmd t -let s:save_winminheight = &winminheight -let s:save_winminwidth = &winminwidth -set winminheight=0 -set winheight=1 -set winminwidth=0 -set winwidth=1 -exe 'vert 1resize ' . ((&columns * 159 + 159) / 319) -exe 'vert 2resize ' . ((&columns * 159 + 159) / 319) -argglobal -balt A320-main.xml -let s:cpo_save=&cpo -set cpo&vim -imap g delimitMateJumpMany -imap delimitMateS-BS -imap delimitMateBS -imap delimitMateBS -nmap [c (GitGutterPrevHunk) -xmap \hs (GitGutterStageHunk) -nmap ]c (GitGutterNextHunk) -xmap ac (GitGutterTextObjectOuterVisual) -omap ac (GitGutterTextObjectOuterPending) -xmap ic (GitGutterTextObjectInnerVisual) -omap ic (GitGutterTextObjectInnerPending) -imap g delimitMateJumpMany -imap  delimitMateBS -imap " delimitMate" -imap ' delimitMate' -imap ( delimitMate( -imap ) delimitMate) -imap [ delimitMate[ -imap ] delimitMate] -imap ` delimitMate` -imap { delimitMate{ -imap } delimitMate} -let &cpo=s:cpo_save -unlet s:cpo_save -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal backupcopy= -setlocal balloonexpr= -setlocal nobinary -setlocal nobreakindent -setlocal breakindentopt= -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinscopedecls=public,protected,private -setlocal cinwords=if,else,while,do,for,switch -setlocal colorcolumn= -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t -setlocal completefunc= -setlocal concealcursor= -setlocal conceallevel=0 -setlocal nocopyindent -setlocal cryptmethod= -setlocal nocursorbind -setlocal nocursorcolumn -setlocal nocursorline -setlocal cursorlineopt=both -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'nasal' -setlocal filetype=nasal -endif -setlocal fillchars= -setlocal fixendofline -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=marker -setlocal foldmethod=marker -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=SpaceVim#default#Customfoldtext() -setlocal foldtext=SpaceVim#default#Customfoldtext() -setlocal formatexpr= -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal formatoptions=tcq -setlocal formatprg= -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=-1 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -set linebreak -setlocal linebreak -setlocal nolisp -setlocal lispoptions= -setlocal lispwords= -setlocal nolist -setlocal listchars= -setlocal makeencoding= -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=bin,hex -set number -setlocal number -set numberwidth=3 -setlocal numberwidth=3 -setlocal omnifunc=syntaxcomplete#Complete -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -setlocal norelativenumber -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal scrolloff=-1 -setlocal shiftwidth=3 -setlocal noshortname -setlocal showbreak= -setlocal sidescrolloff=-1 -setlocal signcolumn=auto -setlocal smartindent -setlocal nosmoothscroll -setlocal softtabstop=3 -set spell -setlocal spell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=de_de -setlocal spelloptions= -setlocal statusline=%#SpaceVim_statusline_ia#\ %{\ get(w:,\ \"winid\",\ winnr())\ }\ %#SpaceVim_statusline_ia_SpaceVim_statusline_b#%#SpaceVim_statusline_b#%{\ get(w:,\ \"winwidth\",\ 150)\ <\ 31\ ?\ \"\"\ :\ (\"\ 21.2k\ FCU.nas\ \ \")}%{\ get(w:,\ \"winwidth\",\ 150)\ <\ 41\ ?\ \"\"\ :\ (\"\ \ nasal\ \")}%{\ get(w:,\ \"winwidth\",\ 150)\ <\ 55\ ?\ \"\"\ :\ (\"\ \ ❖\ ⓢ\ \ \ \")}%=%{\"\ \"\ .\ &ff\ .\ \"|\"\ .\ (&fenc!=\"\"?&fenc:&enc)\ .\ \"\ \"}\ %P\ -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'nasal' -setlocal syntax=nasal -endif -setlocal tabstop=3 -setlocal tagcase= -setlocal tagfunc= -setlocal tags= -setlocal termwinkey= -setlocal termwinscroll=10000 -setlocal termwinsize= -setlocal textwidth=0 -setlocal thesaurus= -setlocal thesaurusfunc= -setlocal undofile -setlocal undolevels=-123456 -setlocal varsofttabstop= -setlocal vartabstop= -setlocal virtualedit= -setlocal wincolor= -setlocal nowinfixheight -setlocal nowinfixwidth -set nowrap -setlocal nowrap -setlocal wrapmargin=0 -let s:l = 228 - ((29 * winheight(0) + 28) / 57) -if s:l < 1 | let s:l = 1 | endif -keepjumps exe s:l -normal! zt -keepjumps 228 -normal! 010| -wincmd w -argglobal -if bufexists(fnamemodify("Nasal/FMGC/FCU.nas", ":p")) | buffer Nasal/FMGC/FCU.nas | else | edit Nasal/FMGC/FCU.nas | endif -balt Nasal/FMGC/FMGC.nas -let s:cpo_save=&cpo -set cpo&vim -imap g delimitMateJumpMany -imap delimitMateS-BS -imap delimitMateBS -imap delimitMateBS -nmap [c (GitGutterPrevHunk) -xmap \hs (GitGutterStageHunk) -nmap ]c (GitGutterNextHunk) -xmap ac (GitGutterTextObjectOuterVisual) -omap ac (GitGutterTextObjectOuterPending) -xmap ic (GitGutterTextObjectInnerVisual) -omap ic (GitGutterTextObjectInnerPending) -imap g delimitMateJumpMany -imap  delimitMateBS -imap " delimitMate" -imap ' delimitMate' -imap ( delimitMate( -imap ) delimitMate) -imap [ delimitMate[ -imap ] delimitMate] -imap ` delimitMate` -imap { delimitMate{ -imap } delimitMate} -let &cpo=s:cpo_save -unlet s:cpo_save -setlocal keymap= -setlocal noarabic -setlocal autoindent -setlocal backupcopy= -setlocal balloonexpr= -setlocal nobinary -setlocal nobreakindent -setlocal breakindentopt= -setlocal bufhidden= -setlocal buflisted -setlocal buftype= -setlocal cindent -setlocal cinkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal cinoptions= -setlocal cinscopedecls=public,protected,private -setlocal cinwords=if,else,while,do,for,switch -setlocal colorcolumn= -setlocal comments=s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:- -setlocal commentstring=/*%s*/ -setlocal complete=.,w,b,u,t -setlocal completefunc= -setlocal concealcursor= -setlocal conceallevel=0 -setlocal nocopyindent -setlocal cryptmethod= -setlocal nocursorbind -setlocal nocursorcolumn -setlocal cursorline -setlocal cursorlineopt=both -setlocal define= -setlocal dictionary= -setlocal nodiff -setlocal equalprg= -setlocal errorformat= -setlocal expandtab -if &filetype != 'nasal' -setlocal filetype=nasal -endif -setlocal fillchars= -setlocal fixendofline -setlocal foldcolumn=0 -setlocal foldenable -setlocal foldexpr=0 -setlocal foldignore=# -setlocal foldlevel=0 -setlocal foldmarker={{{,}}} -set foldmethod=marker -setlocal foldmethod=indent -setlocal foldminlines=1 -setlocal foldnestmax=20 -set foldtext=SpaceVim#default#Customfoldtext() -setlocal foldtext=SpaceVim#default#Customfoldtext() -setlocal formatexpr= -setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* -setlocal formatoptions=tcq -setlocal formatprg= -setlocal grepprg= -setlocal iminsert=0 -setlocal imsearch=-1 -setlocal include= -setlocal includeexpr= -setlocal indentexpr= -setlocal indentkeys=0{,0},0),0],:,0#,!^F,o,O,e -setlocal noinfercase -setlocal iskeyword=@,48-57,_,192-255 -setlocal keywordprg= -set linebreak -setlocal linebreak -setlocal nolisp -setlocal lispoptions= -setlocal lispwords= -setlocal nolist -setlocal listchars= -setlocal makeencoding= -setlocal makeprg= -setlocal matchpairs=(:),{:},[:] -setlocal nomodeline -setlocal modifiable -setlocal nrformats=bin,hex -set number -setlocal number -set numberwidth=3 -setlocal numberwidth=3 -setlocal omnifunc=syntaxcomplete#Complete -setlocal path= -setlocal nopreserveindent -setlocal nopreviewwindow -setlocal quoteescape=\\ -setlocal noreadonly -set relativenumber -setlocal relativenumber -setlocal norightleft -setlocal rightleftcmd=search -setlocal noscrollbind -setlocal scrolloff=-1 -setlocal shiftwidth=3 -setlocal noshortname -setlocal showbreak= -setlocal sidescrolloff=-1 -setlocal signcolumn=auto -setlocal smartindent -setlocal nosmoothscroll -setlocal softtabstop=3 -set spell -setlocal spell -setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ -setlocal spellfile= -setlocal spelllang=de_de -setlocal spelloptions= -setlocal statusline=%#SpaceVim_statusline_a#%{SpaceVim#layers#core#statusline#mode(mode())}\ %{\ get(w:,\ \"winid\",\ winnr())\ }\ %#SpaceVim_statusline_a_SpaceVim_statusline_b#%#SpaceVim_statusline_b#%{\ &modified\ ?\ '\ *\ '\ :\ '\ -\ '}21.2k\ FCU.nas\ %#SpaceVim_statusline_b_SpaceVim_statusline_c#%#SpaceVim_statusline_c#\ nasal\ %#SpaceVim_statusline_c_SpaceVim_statusline_b#%#SpaceVim_statusline_b#\ ❖\ ⓢ\ \ %#SpaceVim_statusline_b_SpaceVim_statusline_c#%#SpaceVim_statusline_b_SpaceVim_statusline_z#%#SpaceVim_statusline_z#%=%#SpaceVim_statusline_z#%{SpaceVim#layers#core#statusline#_current_tag()}%#SpaceVim_statusline_b_SpaceVim_statusline_z#%#SpaceVim_statusline_b#%{\"\ \"\ .\ g:_spacevim_statusline_fileformat\ .\ \"\ |\ \"\ .\ (&fenc!=\"\"?&fenc:&enc)\ .\ \"\ \"}%#SpaceVim_statusline_c_SpaceVim_statusline_b#%#SpaceVim_statusline_c#%{'\ '\ .\ join(map(getpos('.')[1:2],\ \"printf('%3d',\ v:val)\"),\ ':')\ .\ '\ '}%#SpaceVim_statusline_b_SpaceVim_statusline_c#%#SpaceVim_statusline_b#\ %P\ %#SpaceVim_statusline_c_SpaceVim_statusline -setlocal suffixesadd= -setlocal swapfile -setlocal synmaxcol=3000 -if &syntax != 'nasal' -setlocal syntax=nasal -endif -setlocal tabstop=3 -setlocal tagcase= -setlocal tagfunc= -setlocal tags= -setlocal termwinkey= -setlocal termwinscroll=10000 -setlocal termwinsize= -setlocal textwidth=0 -setlocal thesaurus= -setlocal thesaurusfunc= -setlocal undofile -setlocal undolevels=-123456 -setlocal varsofttabstop= -setlocal vartabstop= -setlocal virtualedit= -setlocal wincolor= -setlocal nowinfixheight -setlocal nowinfixwidth -set nowrap -setlocal nowrap -setlocal wrapmargin=0 -23 -normal! zo -34 -normal! zo -36 -normal! zo -53 -normal! zo -214 -normal! zo -let s:l = 231 - ((123 * winheight(0) + 28) / 57) -if s:l < 1 | let s:l = 1 | endif -keepjumps exe s:l -normal! zt -keepjumps 231 -normal! 013| -wincmd w -2wincmd w -exe 'vert 1resize ' . ((&columns * 159 + 159) / 319) -exe 'vert 2resize ' . ((&columns * 159 + 159) / 319) -tabnext 1 -if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 - silent exe 'bwipe ' . s:wipebuf -endif -unlet! s:wipebuf -set winheight=1 winwidth=20 -set shortmess=filnxtToOScsF -let &winminheight = s:save_winminheight -let &winminwidth = s:save_winminwidth -let s:sx = expand(":p:r")."x.vim" -if filereadable(s:sx) - exe "source " . fnameescape(s:sx) -endif -let &g:so = s:so_save | let &g:siso = s:siso_save -doautoall SessionLoadPost -unlet SessionLoad -" vim: set ft=vim : From 34d4605e72a8c5308ce7f73e91c4c5fb70972655 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Tue, 20 Feb 2024 11:39:50 +0100 Subject: [PATCH 52/54] Cleaned up Managed Speed vars. Preparing to merge last redundant vars: fmgc.Custom.Input.spdManaged has same functionality as fmgc.FMGCNodes.mngSpdActive --- Models/Instruments/ND/canvas/style.nas | 2 +- Models/Instruments/PFD/PFD.nas | 2 +- Nasal/FMGC/FCU.nas | 2 -- Nasal/FMGC/FMGC.nas | 40 ++++++++++++++++++++++---- gui/dialogs/a3xx-autoflight-dlg.xml | 12 ++++---- 5 files changed, 42 insertions(+), 16 deletions(-) diff --git a/Models/Instruments/ND/canvas/style.nas b/Models/Instruments/ND/canvas/style.nas index 6cc66949..1bc5969a 100644 --- a/Models/Instruments/ND/canvas/style.nas +++ b/Models/Instruments/ND/canvas/style.nas @@ -60,7 +60,7 @@ canvas.NDStyles["Airbus"] = { lat_ctrl: "/it-autoflight/output/lat", managed_val: 1, ver_ctrl: "/it-autoflight/output/vert", - spd_ctrl: "/it-autoflight/input/spd-managed", + spd_ctrl: "/FMGC/internal/mng-spd-active", current_wp: "/autopilot/route-manager/current-wp", ap1: "/it-autoflight/output/ap1", ap2: "/it-autoflight/output/ap2", diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 179874b3..49ddddbc 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -2270,7 +2270,7 @@ var input = { targetMach: "/it-autoflight/input/mach", targetKts: "/it-autoflight/input/kts", targetHeading: "/it-autoflight/input/hdg", - managedSpd: "/it-autoflight/input/spd-managed", + managedSpd: "/FMGC/internal/mng-spd-active", ktsMach: "/it-autoflight/input/kts-mach", showHdg: "/it-autoflight/custom/show-hdg", hdgDiff: "/instrumentation/pfd/hdg-diff", diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index ea2881e7..f56467fe 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -56,10 +56,8 @@ var FCUController = { FCUworking: 0, kts: props.globals.initNode("/fcu/input/kts", 100, "INT"), mach: props.globals.initNode("/fcu/input/mach", 0.01, "DOUBLE"), - # FCU Speed Modes are 0: undefined 1: selected 2: managed spdPreselect: props.globals.initNode("/fcu/input/spd-preselect", 0, "BOOL"), spdWindowOpen: props.globals.initNode("/fcu/output/spd-window-open", 1, "BOOL"), - spdWindowDot: props.globals.initNode("/fcu/output/spd-window-dot", 0, "BOOL"), _init: 0, init: func() { me.FCU1 = FCU.new(systems.ELEC.Bus.dcEss); diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index c515769b..980dd5a0 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -44,8 +44,6 @@ if (getprop("/options/company-options/default-ga-thrRed-agl") != nil) { var minAccelAlt = getprop("/options/company-options/default-accel-agl"); var minThrRed = getprop("/options/company-options/default-thrRed-agl"); -var mngSpdActive = props.globals.initNode("/FMGC/internal/managed-spd-active", 0, "BOOL"); - setprop("/position/gear-agl-ft", 0); # 1500 ft is a default value not shown anywhere. It may not exist. @@ -68,7 +66,7 @@ var FMGCinit = func { FMGCNodes.vmax.setValue(338); FMGCInternal.phase = 0; # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done FMGCNodes.phase.setValue(0); - mngSpdActive.setBoolValue(nil); + FMGCNodes.mngSpdActive.setBoolValue(nil); FMGCInternal.mngSpd = 157; FMGCInternal.mngSpdCmd = 157; FMGCInternal.mngKtsMach = 0; @@ -247,7 +245,6 @@ var FMGCInternal = { machSwitchover: 0, mngKtsMach: 0, mngSpd: 0, - mngSpdActive: 0, mngSpdCmd: 0, # This can't be init to -98, because we don't want it to run until WOW has gone to false and back to true @@ -1041,6 +1038,17 @@ var ManagedSPD = maketimer(0.25, func { if (waypoint != nil) { constraintSpeed = flightPlanController.flightplans[2].getWP(FPLN.currentWP.getValue()).speed_cstr; + + if ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and flightPlanController.flightplans[2].getWP(FPLN.currentWP.getValue()).wp_role == "sid") { + i = FPLN.currentWP.getValue(); + while (flightPlanController.flightplans[2].getWP(i).wp_role == "sid") { + if (flightPlanController.flightplans[2].getWP(i).speed_cstr != nil and flightPlanController.flightplans[2].getWP(i).speed_cstr > 100) { + constraintSpeed = flightPlanController.flightplans[2].getWP(i).speed_cstr; + break; + } + i = i + 1; + } + } } if ((Modes.PFD.FMA.pitchMode == " " or Modes.PFD.FMA.pitchMode == "SRS") and (FMGCInternal.phase == 0 or FMGCInternal.phase == 1)) { @@ -1165,9 +1173,29 @@ var ManagedSPD = maketimer(0.25, func { } else { # no FCU: speed cannot be controlled # no commands to FCU - ManagedSPD.stop(); - FMGCNodes.mngSpdActive.setBoolValue(nil); + fmgc.ManagedSPD.stop(); + fmgc.FMGCNodes.mngSpdActive.setBoolValue(nil); fmgc.Custom.Input.spdManaged.setBoolValue(nil); + if (fcu.input.spdPreselect.getBoolValue()){ + fcu.input.spdPreselect.setBoolValue(nil); + fcu.spdSelectTimer.stop(); + if (fmgc.Input.ktsMach.getBoolValue()){ + fmgc.Input.mach.setValue(fcu.input.mach.getValue()); + } else { + fmgc.Input.kts.setValue(fcu.input.kts.getValue()); + } + } else { + if (fmgc.Input.ktsMach.getBoolValue()){ + fcu.FCUController.mach = math.clamp(math.round(fmgc.Velocities.indicatedMach.getValue(), 0.01), 0.01, 0.99); + fmgc.Input.mach.setValue(fcu.FCUController.mach); + fcu.input.mach.setValue(fcu.FCUController.mach); + } else { + fcu.FCUController.ias = math.clamp(math.round(fmgc.Velocities.indicatedAirspeedKt.getValue()), 100, 399); + fmgc.Input.kts.setValue(fcu.FCUController.ias); + fcu.input.kts.setValue(fcu.FCUController.ias); + } + } + fcu.FCUController.spdWindowOpen.setBoolValue(1); } }); diff --git a/gui/dialogs/a3xx-autoflight-dlg.xml b/gui/dialogs/a3xx-autoflight-dlg.xml index 20ef7ace..c56796b5 100644 --- a/gui/dialogs/a3xx-autoflight-dlg.xml +++ b/gui/dialogs/a3xx-autoflight-dlg.xml @@ -201,7 +201,7 @@ 0 - /it-autoflight/input/spd-managed + FMGC/internal/mng-spd-active 0 @@ -268,7 +268,7 @@ 1 - /it-autoflight/input/spd-managed + FMGC/internal/mng-spd-active 0 @@ -291,7 +291,7 @@ 1 - /it-autoflight/input/spd-managed + FMGC/internal/mng-spd-active 0 @@ -315,7 +315,7 @@ 1 - /it-autoflight/input/spd-managed + FMGC/internal/mng-spd-active 0 @@ -335,7 +335,7 @@ 1 - /it-autoflight/input/spd-managed + FMGC/internal/mng-spd-active 0 @@ -359,7 +359,7 @@ 1 - /it-autoflight/input/spd-managed + FMGC/internal/mng-spd-active 0 From b69cd3ffb175260981758173c133c09345314e21 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Tue, 20 Feb 2024 19:59:31 +0100 Subject: [PATCH 53/54] consolidated all managed speed into mngSpdActive, and spdWindowOpen --- Nasal/FMGC/FCU.nas | 117 +++++++++++++++++------------------------- Nasal/FMGC/FMGC-b.nas | 4 -- Nasal/FMGC/FMGC.nas | 36 ++++--------- 3 files changed, 56 insertions(+), 101 deletions(-) diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index f56467fe..90c516f2 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -237,7 +237,6 @@ var FCUController = { }, SPDPush: func() { if (me.FCUworking) { - fmgc.Custom.Input.spdManaged.setBoolValue(1); fmgc.ManagedSPD.start(); } }, @@ -245,10 +244,8 @@ var FCUController = { mach: 0, SPDPull: func() { if (me.FCUworking and fmgc.FMGCNodes.selSpdEnable.getBoolValue()) { - if (fmgc.Custom.Input.spdManaged.getBoolValue()) { - fmgc.ManagedSPD.stop(); + if (!fcu.FCUController.spdWindowOpen.getBoolValue()) { fmgc.FMGCNodes.mngSpdActive.setBoolValue(nil); - fmgc.Custom.Input.spdManaged.setBoolValue(nil); if (input.spdPreselect.getBoolValue()){ input.spdPreselect.setBoolValue(nil); spdSelectTimer.stop(); @@ -271,13 +268,15 @@ var FCUController = { } else { if (fmgc.Input.ktsMach.getBoolValue()){ me.mach = fcu.input.mach.getValue(); + fmgc.Input.mach.setValue(me.mach); } else { me.ias = fcu.input.kts.getValue(); + fmgc.Input.kts.setValue(me.ias); } } # a selected speed must be available. SPD window can be opened - me.spdWindowOpen.setBoolValue(1); + fcu.FCUController.spdWindowOpen.setBoolValue(1); fmgc.ManagedSPD.stop(); } @@ -288,30 +287,11 @@ var FCUController = { if (me.FCUworking) { # window can be opened. it will close if preselect # timer is over - me.spdWindowOpen.setBoolValue(1); - - if (fmgc.Input.ktsMach.getBoolValue()) { - if (fmgc.Custom.Input.spdManaged.getBoolValue()) { - # get actual managed speed - # get from fmgc when window opens - # get from window if window already open - if(!input.spdPreselect.getBoolValue()) { - # speed preselection on FCU as speed is managed - input.spdPreselect.setBoolValue(1); - me.machTemp = math.clamp(math.round(fmgc.Velocities.indicatedMach.getValue(), 0.01), 0.01, 0.99); - } else { - me.machTemp = fcu.input.mach.getValue(); - } - me.spdWindowOpen.setBoolValue(1); - - # timer is started by rotating speed selection knob - # and reset by rotating again - if (!spdSelectTimer.isRunning){ - spdSelectTimer.start(); - } else { - spdSelectTimer.restart(spdPreselectTime); - } + if (fcu.FCUController.spdWindowOpen.getBoolValue()){ + # get actual selected speed + # speed is directly controlled if it is not managed + if (fmgc.Input.ktsMach.getBoolValue()) { if (d == 1) { me.machTemp = math.round(me.machTemp + 0.001, 0.001); # Kill floating point error } else if (d == -1) { @@ -321,27 +301,52 @@ var FCUController = { } else if (d == -10) { me.machTemp = math.round(me.machTemp - 0.01, 0.01); # Kill floating point error } + if (!fmgc.FMGCNodes.mngSpdActive.getBoolValue()) { + # if selected spd, set the spd + fmgc.Input.mach.setValue(math.clamp(me.machTemp, 0.10, 0.99)); + } fcu.input.mach.setValue(math.clamp(me.machTemp, 0.10, 0.99)); - } else { - # get actual selected speed - # speed is directly controlled if it is not managed - me.machTemp = fcu.input.mach.getValue(); + me.iasTemp = fcu.input.kts.getValue(); if (d == 1) { - me.machTemp = math.round(me.machTemp + 0.001, 0.001); # Kill floating point error + me.iasTemp = me.iasTemp + 1; } else if (d == -1) { - me.machTemp = math.round(me.machTemp - 0.001, 0.001); # Kill floating point error + me.iasTemp = me.iasTemp - 1; } else if (d == 10) { - me.machTemp = math.round(me.machTemp + 0.01, 0.01); # Kill floating point error + me.iasTemp = me.iasTemp + 10; } else if (d == -10) { - me.machTemp = math.round(me.machTemp - 0.01, 0.01); # Kill floating point error + me.iasTemp = me.iasTemp - 10; } - fmgc.Input.mach.setValue(math.clamp(me.machTemp, 0.10, 0.99)); - fcu.input.mach.setValue(math.clamp(me.machTemp, 0.10, 0.99)); + if (!fmgc.FMGCNodes.mngSpdActive.getBoolValue()) { + # if selected spd, set the spd + fmgc.Input.kts.setValue(math.clamp(me.iasTemp, 100, 399)); + } + fcu.input.kts.setValue(math.clamp(me.iasTemp, 100, 399)); } } else { - if (fmgc.Custom.Input.spdManaged.getBoolValue()) { + me.spdWindowOpen.setBoolValue(1); + + if (fmgc.Input.ktsMach.getBoolValue()) { + # get actual managed speed + # get from fmgc when window opens + # get from window if window already open + if(!input.spdPreselect.getBoolValue()) { + # speed preselection on FCU as speed is managed + input.spdPreselect.setBoolValue(1); + me.machTemp = math.clamp(math.round(fmgc.Velocities.indicatedMach.getValue(), 0.01), 0.01, 0.99); + } else { + me.machTemp = fcu.input.mach.getValue(); + } + + # timer is started by rotating speed selection knob + # and reset by rotating again + if (!spdSelectTimer.isRunning){ + spdSelectTimer.start(); + } else { + spdSelectTimer.restart(spdPreselectTime); + } + } else { # get actual managed speed # get from fmgc when window opens # get from window if window already open @@ -352,7 +357,6 @@ var FCUController = { } else { me.iasTemp = fcu.input.kts.getValue(); } - me.spdWindowOpen.setBoolValue(1); # timer is started by rotating speed selection knob # and reset by rotating again @@ -361,36 +365,9 @@ var FCUController = { } else { spdSelectTimer.restart(spdPreselectTime); } - - if (d == 1) { - me.iasTemp = me.iasTemp + 1; - } else if (d == -1) { - me.iasTemp = me.iasTemp - 1; - } else if (d == 10) { - me.iasTemp = me.iasTemp + 10; - } else if (d == -10) { - me.iasTemp = me.iasTemp - 10; - } - fcu.input.kts.setValue(math.clamp(me.iasTemp, 100, 399)); - } else { - # get actual selected speed - # speed is directly controlled if it is not managed - me.iasTemp = fcu.input.kts.getValue(); - - if (d == 1) { - me.iasTemp = me.iasTemp + 1; - } else if (d == -1) { - me.iasTemp = me.iasTemp - 1; - } else if (d == 10) { - me.iasTemp = me.iasTemp + 10; - } else if (d == -10) { - me.iasTemp = me.iasTemp - 10; - } - fmgc.Input.kts.setValue(math.clamp(me.iasTemp, 100, 399)); - fcu.input.kts.setValue(math.clamp(me.iasTemp, 100, 399)); - } - } - } + } + } + } }, HDGPush: func() { if (me.FCUworking) { diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index dba546a1..22d2e0de 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -179,9 +179,6 @@ var Custom = { ndTrkSel: [props.globals.getNode("/instrumentation/efis[0]/trk-selected", 1), props.globals.getNode("/instrumentation/efis[1]/trk-selected", 1)], showHdg: props.globals.initNode("/it-autoflight/custom/show-hdg", 1, "BOOL"), trkFpa: props.globals.initNode("/it-autoflight/custom/trk-fpa", 0, "BOOL"), - Input: { - spdManaged: props.globals.initNode("/it-autoflight/input/spd-managed", 0, "BOOL"), - }, Output: { fmaPower: 0, vsFCU: props.globals.initNode("/it-autoflight/output/vs-fcu-display", "", "STRING"), @@ -216,7 +213,6 @@ var ITAF = { Input.trk.setBoolValue(0); Input.trueCourse.setBoolValue(0); Input.toga.setBoolValue(0); - Custom.Input.spdManaged.setBoolValue(0); Output.ap1.setBoolValue(0); Output.ap2.setBoolValue(0); Output.athr.setBoolValue(0); diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 980dd5a0..5fbe9ce4 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -1127,28 +1127,26 @@ var ManagedSPD = maketimer(0.25, func { # valid managed speed FMGCNodes.mngSpdActive.setBoolValue(1); - fmgc.Custom.Input.spdManaged.setBoolValue(1); if (!fcu.input.spdPreselect.getBoolValue()) { fcu.FCUController.spdWindowOpen.setBoolValue(nil); } } else { # v2 not initialized - # managed speed can remain engaged if previously activated - # but it is not active controlled by fmgc FMGCNodes.mngSpdActive.setBoolValue(nil); - if (fmgc.Custom.Input.spdManaged.getBoolValue() and !fcu.input.spdPreselect.getBoolValue() and + if (!fcu.input.spdPreselect.getBoolValue() and (systems.ADIRS.Operating.aligned[0].getBoolValue() or systems.ADIRS.Operating.aligned[1].getBoolValue() or systems.ADIRS.Operating.aligned[2].getBoolValue())) { fcu.FCUController.spdWindowOpen.setBoolValue(nil); + } else { + fcu.FCUController.spdWindowOpen.setBoolValue(1); } } } else { # conditions for active managed speed not met fmgc.ManagedSPD.stop(); fmgc.FMGCNodes.mngSpdActive.setBoolValue(nil); - fmgc.Custom.Input.spdManaged.setBoolValue(nil); if (fcu.input.spdPreselect.getBoolValue()){ fcu.input.spdPreselect.setBoolValue(nil); fcu.spdSelectTimer.stop(); @@ -1175,7 +1173,6 @@ var ManagedSPD = maketimer(0.25, func { # no commands to FCU fmgc.ManagedSPD.stop(); fmgc.FMGCNodes.mngSpdActive.setBoolValue(nil); - fmgc.Custom.Input.spdManaged.setBoolValue(nil); if (fcu.input.spdPreselect.getBoolValue()){ fcu.input.spdPreselect.setBoolValue(nil); fcu.spdSelectTimer.stop(); @@ -1240,45 +1237,31 @@ setlistener("/FMGC/internal/pitch-mode", func() { # enable managed speed if FMS has a valid position when on ground setlistener("/systems/navigation/aligned-1", func(val) { - if (val.getBoolValue() and (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow"))){ - if (!fmgc.Custom.Input.spdManaged.getBoolValue()) { - fmgc.Custom.Input.spdManaged.setBoolValue(1); - fcu.FCUController.spdWindowOpen.setBoolValue(nil); - fmgc.ManagedSPD.start(); - } + if ((getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow"))){ + fmgc.ManagedSPD.start(); } }, 0, 0); setlistener("/systems/navigation/aligned-2", func(val) { - if (val.getBoolValue() and (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow"))){ - if (!fmgc.Custom.Input.spdManaged.getBoolValue()) { - fmgc.Custom.Input.spdManaged.setBoolValue(1); - fcu.FCUController.spdWindowOpen.setBoolValue(nil); - fmgc.ManagedSPD.start(); - } + if ((getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow"))){ + fmgc.ManagedSPD.start(); } }, 0, 0); setlistener("/systems/navigation/aligned-3", func(val) { - if (val.getBoolValue() and (getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow"))){ - if (!fmgc.Custom.Input.spdManaged.getBoolValue()) { - fmgc.Custom.Input.spdManaged.setBoolValue(1); - fcu.FCUController.spdWindowOpen.setBoolValue(nil); - fmgc.ManagedSPD.start(); - } + if ((getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow"))){ + fmgc.ManagedSPD.start(); } }, 0, 0); setlistener("/it-autoflight/output/fd1", func(val) { if (val.getBoolValue() and getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow") and !fmgc.Output.fd2.getBoolValue()){ - fmgc.Custom.Input.spdManaged.setBoolValue(1); fmgc.ManagedSPD.start(); } }, 0, 0); setlistener("/it-autoflight/output/fd2", func(val) { if (val.getBoolValue() and getprop("/gear/gear[1]/wow") and getprop("/gear/gear[2]/wow") and !fmgc.Output.fd1.getBoolValue()){ - fmgc.Custom.Input.spdManaged.setBoolValue(1); fmgc.ManagedSPD.start(); } }, 0, 0); @@ -1313,7 +1296,6 @@ setlistener("/ECAM/logic/ground-calc-immediate", func(val) { setlistener("/ECAM/phases/phase-calculation/one-engine-running", func(val) { if (val.getBoolValue() and ecam.FWC.Logic.gnd.getBoolValue()){ fmgc.FMGCNodes.selSpdEnable.setBoolValue(0); - fmgc.Custom.Input.spdManaged.setBoolValue(1); fmgc.ManagedSPD.start(); } else { fmgc.FMGCNodes.selSpdEnable.setBoolValue(1); From d9f26fee4812cfbd3bffca836920d0e8ad7782e8 Mon Sep 17 00:00:00 2001 From: Maximiliano Keller Date: Thu, 22 Feb 2024 15:53:52 +0100 Subject: [PATCH 54/54] removed unused "fmgcSpeedValid" --- Nasal/FMGC/FMGC.nas | 1 - 1 file changed, 1 deletion(-) diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 5fbe9ce4..fbf7f73a 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -59,7 +59,6 @@ var FMGCAlignTime = [props.globals.initNode("/FMGC/internal/align1-time", 0, "DO var adirsSkip = props.globals.getNode("/systems/acconfig/options/adirs-skip"); var blockCalculating = props.globals.initNode("/FMGC/internal/block-calculating", 0, "BOOL"); var fuelCalculating = props.globals.initNode("/FMGC/internal/fuel-calculating", 0, "BOOL"); -var fmgcSpeedValid = props.globals.initNode("/FMGC/internal/fmgc-speed-valid", 0, "BOOL"); var FMGCinit = func { FMGCInternal.maxspeed = 338;