]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/panel.cxx
Updates from David Megginson.
[flightgear.git] / src / Cockpit / panel.cxx
index 5f638f44f09a3d19a5a15d07c657421ae88836e8..6825dca4ea4aba53f27daac554c54399837725ed 100644 (file)
@@ -476,6 +476,7 @@ FGToggleAction::doAction ()
 ////////////////////////////////////////////////////////////////////////
 
 FGPanelTransformation::FGPanelTransformation ()
+  : table(0)
 {
 }
 
@@ -664,7 +665,11 @@ FGInstrumentLayer::transform () const
     } else if (val > t->max) {
       val = t->max;
     }
-    val = val * t->factor + t->offset;
+    if(t->table==0) {
+       val = val * t->factor + t->offset;
+    } else {
+       val = t->table->interpolate(val) * t->factor + t->offset;
+    }
 
     switch (t->type) {
     case FGPanelTransformation::XSHIFT: