]> git.mxchange.org Git - flightgear.git/commitdiff
Add support for flipping the instrument panel vertically on screen (if
authorcurt <curt>
Mon, 19 Aug 2002 02:07:39 +0000 (02:07 +0000)
committercurt <curt>
Mon, 19 Aug 2002 02:07:39 +0000 (02:07 +0000)
we want to do a full screen panel on a device that is mounted upside
down.)

src/Cockpit/kr_87.cxx
src/Cockpit/panel.cxx
src/Cockpit/panel.hxx
src/Cockpit/steam.cxx

index 0cc2b4adffdb7efc4d2dee8514c224a4485b623c..a675f1adc57cc4605c004929ae66089eb99c332c 100644 (file)
@@ -254,7 +254,7 @@ void FGKR_87::update( double dt ) {
     // Radio
     ////////////////////////////////////////////////////////////////////////
 
-    if ( on_off_vol_btn >= 0.01 ) {
+    if ( on_off_vol_btn >= 0.05 ) {
         // buttons
         if ( adf_btn == 0 ) {
             ant_mode = 1;
index bf5a1c13f87a0073c0e226894584fd648cca0b37..0199dd1789e1911c3409aa369f748985cb12efba 100644 (file)
@@ -272,6 +272,7 @@ FGPanel::update (double dt)
     _x_offset = fgGetInt("/sim/panel/x-offset");
     _y_offset = fgGetInt("/sim/panel/y-offset");
     _jitter = fgGetFloat("/sim/panel/jitter");
+    _flipx = fgGetBool("/sim/panel/flip-x");
 
                                // Do nothing if the panel isn't visible.
     if ( !fgPanelVisible() ) {
@@ -330,8 +331,11 @@ FGPanel::update (GLfloat winx, GLfloat winw, GLfloat winy, GLfloat winh)
   glMatrixMode(GL_PROJECTION);
   glPushMatrix();
   glLoadIdentity();
-  gluOrtho2D(winx, winx + winw, winy, winy + winh); /* right side up */
-  // gluOrtho2D(winx + winw, winx, winy + winh, winy); /* up side down */
+  if ( _flipx ) {
+    gluOrtho2D(winx + winw, winx, winy + winh, winy); /* up side down */
+  } else {
+    gluOrtho2D(winx, winx + winw, winy, winy + winh); /* right side up */
+  }
   
   glMatrixMode(GL_MODELVIEW);
   glPushMatrix();
index b038b828d566dfe893506f58bdc2ae5620e1320d..d0d1b9805d493d619533d0ca5a935396410a0474 100644 (file)
@@ -197,6 +197,7 @@ private:
   int _y_offset;
   int _view_height;
   float _jitter;
+  bool _flipx;
 
   const SGPropertyNode * _xsize_node;
   const SGPropertyNode * _ysize_node;
index c947325ee8b5c151e00bdacc3ac370a03ace6062..4bc4fe6e72737092f4dc0c9eb75cf32acd56ddfb 100644 (file)
@@ -318,7 +318,7 @@ void FGSteam::_CatchUp()
        More subtle flaw is having it not move or a travel limit
        occasionally due to some dirt in the tube or on the ball.
        */
-       d = - current_aircraft.fdm_state->get_A_Z_pilot();
+       d = -current_aircraft.fdm_state->get_A_Z_pilot();
        if ( d < 1 ) d = 1;
        set_lowpass ( & the_TC_rad,
                current_aircraft.fdm_state->get_A_Y_pilot () / d,