   }
   
   override func glkView(view: GLKView, drawInRect rect: CGRect) {
-    
-    currentDH += 0.01
 
     if let s = socket {
       if !s.isConnected {
+        currentDH += 0.01
+
         latestData = FlightData()
         
         latestData!.DeltaH = currentDH

      }
    }
    
    glClearColor(0,0,0,1)
    glClear(GLbitfield(GL_COLOR_BUFFER_BIT) | GLbitfield(GL_DEPTH_BUFFER_BIT))
    

      var txt = NSString(format: "%.0f", abs(InversePseudoLog10(Double(power))))
      drawText(txt as String, align: left ? .Right : .Left, position: (xPos + lgeTickSize * 1.25, y), fontSize: 12)
      
      if !(power == logMax) {
        let nextPow = InversePseudoLog10(Double(power >= 0 ? power+1 : power))
        let halfPoint = PseudoLog10(nextPow*0.5)
        y = 0.25 + GLfloat((halfPoint-bottom)/logRange * 0.5)
        if abs(nextPow) == 1 {
          txt = NSString(format: "%.1f", abs(nextPow*0.5))
        } else {
          txt = NSString(format: "%.0f", abs(nextPow*0.5))
        }
        drawText(txt as String, align: left ? .Right : .Left, position: (xPos + medTickSize * 1.25, y), fontSize: 9)
      }
    }
    
  }
