Commits

Cliff Biffle committed c9818f3

Commented out the bit test functions in DroneState -- they're useful documentation, but I'm not convinced they're the right interface (very low-level) and they're not being tested.

  • Participants
  • Parent commits f783c55

Comments (0)

Files changed (1)

File src/org/mg8/ardrone/comms/navdata/DroneState.java

     this.bits = bits;
   }
   
-  public boolean isFlying() {
-    return bit(0);
-  }
-  
-  public boolean isVideoEnabled() {
-    return bit(1);
-  }
-  
-  public boolean isVisionEnabled() {
-    return bit(2);
-  }
-  
-  /** The alternative is Euler angle control. */
-  public boolean isControllingAngularSpeed() {
-    return bit(3);
-  }
-  
-  public boolean isControllingAltitude() {
-    return bit(4);
-  }
-  
-  public boolean isStartButtonPressed() {
-    return bit(5);
-  }
-  
-  public boolean hasReceivedControlAck() {
-    return bit(6);
-  }
-  
-  public boolean isNavDataDemoEnabled() {
-    return bit(10);
-  }
-  
-  public boolean isNavDataSuppressed() {
-    return bit(11);
-  }
-  
-  public boolean hasMotorProblem() {
-    return bit(12);
-  }
-  
-  public boolean hasCommunicationProblem() {
-    return bit(13);
-  }
-  
-  public boolean hasBatteryWarning() {
-    return bit(15);
-  }
-  
-  public boolean hasUserEmergency() {
-    return bit(16);
-  }
-  
-  public boolean hasTimerElapsed() {
-    return bit(17);
-  }
-  
-  public boolean hasExceededAngleLimits() {
-    return bit(19);
-  }
-  
-  public boolean hasUltrasonicProblem() {
-    return bit(21);
-  }
-  
-  public boolean hasAutomaticCutoutEngaged() {
-    return bit(22);
-  }
-  
-  public boolean isPicVersionOkay() {
-    return bit(23);
-  }
-  
-  public boolean isAtCodecThreadRunning() {
-    return bit(24);
-  }
-  
-  public boolean isNavDataThreadRunning() {
-    return bit(25);
-  }
-  
-  public boolean isVideoThreadRunning() {
-    return bit(26);
-  }
-  
-  public boolean isAcquisitionThreadRunning() {
-    return bit(27);
-  }
-  
-  public boolean isControlExecutionDelayed() {
-    return bit(28);
-  }
-  
-  public boolean hasAdcProblem() {
-    return bit(29);
-  }
-  
-  public boolean isCommunicationsWatchdogTripped() {
-    return bit(30);
-  }
-  
-  public boolean hasEmergency() {
-    return bit(31);
-  }
+//  public boolean isFlying() {
+//    return bit(0);
+//  }
+//  
+//  public boolean isVideoEnabled() {
+//    return bit(1);
+//  }
+//  
+//  public boolean isVisionEnabled() {
+//    return bit(2);
+//  }
+//  
+//  /** The alternative (and default) is Euler angle control. */
+//  public boolean isControllingAngularSpeed() {
+//    return bit(3);
+//  }
+//  
+//  public boolean isControllingAltitude() {
+//    return bit(4);
+//  }
+//  
+//  public boolean isStartButtonPressed() {
+//    return bit(5);
+//  }
+//  
+//  public boolean hasReceivedControlAck() {
+//    return bit(6);
+//  }
+//  
+//  public boolean isNavDataDemoEnabled() {
+//    return bit(10);
+//  }
+//  
+//  public boolean isNavDataSuppressed() {
+//    return bit(11);
+//  }
+//  
+//  public boolean hasMotorProblem() {
+//    return bit(12);
+//  }
+//  
+//  public boolean hasCommunicationProblem() {
+//    return bit(13);
+//  }
+//  
+//  public boolean hasBatteryWarning() {
+//    return bit(15);
+//  }
+//  
+//  public boolean hasUserEmergency() {
+//    return bit(16);
+//  }
+//  
+//  public boolean hasTimerElapsed() {
+//    return bit(17);
+//  }
+//  
+//  public boolean hasExceededAngleLimits() {
+//    return bit(19);
+//  }
+//  
+//  public boolean hasUltrasonicProblem() {
+//    return bit(21);
+//  }
+//  
+//  public boolean hasAutomaticCutoutEngaged() {
+//    return bit(22);
+//  }
+//  
+//  public boolean isPicVersionOkay() {
+//    return bit(23);
+//  }
+//  
+//  public boolean isAtCodecThreadRunning() {
+//    return bit(24);
+//  }
+//  
+//  public boolean isNavDataThreadRunning() {
+//    return bit(25);
+//  }
+//  
+//  public boolean isVideoThreadRunning() {
+//    return bit(26);
+//  }
+//  
+//  public boolean isAcquisitionThreadRunning() {
+//    return bit(27);
+//  }
+//  
+//  public boolean isControlExecutionDelayed() {
+//    return bit(28);
+//  }
+//  
+//  public boolean hasAdcProblem() {
+//    return bit(29);
+//  }
+//  
+//  public boolean isCommunicationsWatchdogTripped() {
+//    return bit(30);
+//  }
+//  
+//  public boolean hasEmergency() {
+//    return bit(31);
+//  }
   
   @Override public String toString() {
     return "DroneState(" + Integer.toHexString(bits) + ")";
     return 31 * bits;
   }
   
-  private boolean bit(int index) {
-    return (bits & (1 << index)) != 0;
-  }
+//  private boolean bit(int index) {
+//    return (bits & (1 << index)) != 0;
+//  }
 }