1
0
Fork 0

FG1000 - Fix 3D model GDUs, find nearest ID on DTO

This commit is contained in:
Stuart Buchanan 2018-04-29 21:15:18 +01:00
parent 1b52eaccbd
commit 8fdffa16e6
17 changed files with 56 additions and 45 deletions

View file

@ -191,7 +191,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -300,6 +299,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -307,6 +307,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -719,7 +720,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -191,7 +191,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -300,6 +299,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -307,6 +307,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -719,7 +720,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -191,7 +191,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -300,6 +299,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -307,6 +307,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -719,7 +720,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -191,7 +191,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -300,6 +299,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -307,6 +307,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -719,7 +720,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -203,7 +203,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -552,6 +551,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -559,6 +559,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -971,7 +972,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -203,7 +203,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -552,6 +551,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -559,6 +559,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -971,7 +972,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -203,7 +203,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -552,6 +551,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -559,6 +559,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -971,7 +972,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -203,7 +203,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -552,6 +551,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -559,6 +559,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -971,7 +972,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -208,7 +208,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -557,6 +556,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -564,6 +564,7 @@
<command>FG1000HardKeyPushed</command>
<device>1</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -976,7 +977,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -203,7 +203,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -552,6 +551,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -559,6 +559,7 @@
<command>FG1000HardKeyPushed</command>
<device>2</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -971,7 +972,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -203,7 +203,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -552,6 +551,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -559,6 +559,7 @@
<command>FG1000HardKeyPushed</command>
<device>3</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -971,7 +972,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -203,7 +203,6 @@
</action>
</animation>
<animation>
<type>knob</type>
<object-name>NavOuter</object-name>
@ -552,6 +551,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>ALT_INNER</notification>
<offset>1</offset>
</binding>
</action>
<shift-action>
@ -559,6 +559,7 @@
<command>FG1000HardKeyPushed</command>
<device>4</device>
<notification>ALT_OUTER</notification>
<offset>1</offset>
</binding>
</shift-action>
<hovered>
@ -971,7 +972,7 @@
<animation>
<type>pick</type>
<object-name>FMSInner</object-name>
<object-name>FmsInner</object-name>
<action>
<button>0</button>
<binding>

View file

@ -336,9 +336,9 @@ setDirectTo : func(param)
# No flightplan, or waypoint not found, so use the GPS DTO function.
# Hokey property-based interface.
setprop("/instrumentation/gps/scratch/ident", id);
setprop("/instrumentation/gps/scratch/altitude-ft", 0);
setprop("/instrumentation/gps/scratch/latitude-deg", 0);
setprop("/instrumentation/gps/scratch/longitude-deg", 0);
setprop("/instrumentation/gps/scratch/altitude-ft", alt_ft);
setprop("/instrumentation/gps/scratch/latitude-deg", getprop("/position/latitude-deg"));
setprop("/instrumentation/gps/scratch/longitude-deg", getprop("/position/longitude-deg"));
}
# Switch the GPS to DTO mode.

View file

@ -113,13 +113,13 @@ var DirectTo =
},
offdisplay : func() {
me.DirectToChart.setVisible(0);
if (me.DirectToChart != nil) me.DirectToChart.setVisible(0);
me._group.setVisible(0);
me.getElement("Group").setVisible(0);
me.getController().offdisplay();
},
ondisplay : func() {
me.DirectToChart.setVisible(1);
if (me.DirectToChart != nil) me.DirectToChart.setVisible(1);
me._group.setVisible(1);
me.getElement("Group").setVisible(1);
me.getController().ondisplay();

View file

@ -51,7 +51,6 @@ var NearestVORController =
me._crsrToggle = 1;
},
# Input Handling
handleCRSR : func() {
me._crsrToggle = (! me._crsrToggle);

View file

@ -54,6 +54,8 @@ var PFDInstrumentsController =
_leg_xtrk_nm : 0,
_leg_valid : 0,
_navSelected : 1,
_nav1_id : "",
_nav1_freq : 0.0,
_nav1_radial_deg : 0,

View file

@ -52,14 +52,13 @@ var searchCmd = func {
# FIXME: do we return the current route even if it isn't active?
printlog(_MP_dbg_lvl, "Running query: ", name);
var plans = []; # TODO: multiple flightplans?
var plans = [];
var driver = me.route_driver;
driver.update();
if(!driver.shouldUpdate()) return me.last_result;
# http://wiki.flightgear.org/Nasal_Flightplan
var planCount = driver.getNumberOfFlightPlans();
for (var idx = 0; idx < planCount; idx += 1) {
#var fp = driver.getFlightPlan(idx);
if (driver.getFlightPlan(idx) == nil) return [];
var fpSize = driver.getPlanSize(idx);
if(fpSize < 2) continue;
var type = driver.getFlightPlanType(idx);
@ -91,4 +90,3 @@ var searchCmd = func {
me.last_result = plans;
return plans;
};