當前位置: 首頁>>代碼示例>>Java>>正文


Java Arm類代碼示例

本文整理匯總了Java中com.thalmic.myo.enums.Arm的典型用法代碼示例。如果您正苦於以下問題:Java Arm類的具體用法?Java Arm怎麽用?Java Arm使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Arm類屬於com.thalmic.myo.enums包,在下文中一共展示了Arm類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: toString

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
@Override
public String toString() {
	StringBuilder builder = new StringBuilder("\r");

	String xDisplay = String.format("[%s%s]", repeatCharacter('*', (int) rollW), repeatCharacter(' ', (int) (SCALE - rollW)));
	String yDisplay = String.format("[%s%s]", repeatCharacter('*', (int) pitchW), repeatCharacter(' ', (int) (SCALE - pitchW)));
	String zDisplay = String.format("[%s%s]", repeatCharacter('*', (int) yawW), repeatCharacter(' ', (int) (SCALE - yawW)));

	String armString = null;
	if (whichArm != null) {
		armString = String.format("[%s]", whichArm == Arm.ARM_LEFT ? "L" : "R");
	} else {
		armString = String.format("[?]");
	}
	String poseString = null;
	if (currentPose != null) {
		String poseTypeString = currentPose.getType().toString();
		poseString = String.format("[%s%" + (SCALE - poseTypeString.length()) + "s]", poseTypeString, " ");
	} else {
		poseString = String.format("[%14s]", " ");
	}
	builder.append(xDisplay);
	builder.append(yDisplay);
	builder.append(zDisplay);
	builder.append(armString);
	builder.append(poseString);
	return builder.toString();
}
 
開發者ID:glaudiston,項目名稱:project-bianca,代碼行數:29,代碼來源:MyoThalmic.java

示例2: toString

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
@Override
   public String toString() {
StringBuilder builder = new StringBuilder("\r");

String xDisplay = String.format("[%s%s]", repeatCharacter('*', (int) rollW), repeatCharacter(' ', (int) (SCALE - rollW)));
String yDisplay = String.format("[%s%s]", repeatCharacter('*', (int) pitchW), repeatCharacter(' ', (int) (SCALE - pitchW)));
String zDisplay = String.format("[%s%s]", repeatCharacter('*', (int) yawW), repeatCharacter(' ', (int) (SCALE - yawW)));

String armString = null;
if (whichArm != null) {
    armString = String.format("[%s]", whichArm == Arm.ARM_LEFT ? "L" : "R");
} else {
    armString = String.format("[?]");
}
String poseString = null;
if (currentPose != null) {
    String poseTypeString = currentPose.getType()
	    .toString();
    poseString = String.format("[%s%" + (SCALE - poseTypeString.length()) + "s]", poseTypeString, " ");
} else {
    poseString = String.format("[%14s]", " ");
}
builder.append(xDisplay);
builder.append(yDisplay);
builder.append(zDisplay);
builder.append(armString);
builder.append(poseString);
return builder.toString();
   }
 
開發者ID:glaudiston,項目名稱:project-bianca,代碼行數:30,代碼來源:DataCollector.java

示例3: toString

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
@Override
public String toString() {
  StringBuilder builder = new StringBuilder("\r");

  String xDisplay = String.format("[%s%s]", repeatCharacter('*', (int) rollW), repeatCharacter(' ', (int) (scale - rollW)));
  String yDisplay = String.format("[%s%s]", repeatCharacter('*', (int) pitchW), repeatCharacter(' ', (int) (scale - pitchW)));
  String zDisplay = String.format("[%s%s]", repeatCharacter('*', (int) yawW), repeatCharacter(' ', (int) (scale - yawW)));

  String armString = null;
  if (whichArm != null) {
    armString = String.format("[%s]", whichArm == Arm.ARM_LEFT ? "L" : "R");
  } else {
    armString = String.format("[?]");
  }
  String poseString = null;
  if (currentPose != null) {
    String poseTypeString = currentPose.getType().toString();
    poseString = String.format("[%s%" + (scale - poseTypeString.length()) + "s]", poseTypeString, " ");
  } else {
    poseString = String.format("[%14s]", " ");
  }
  builder.append(xDisplay);
  builder.append(yDisplay);
  builder.append(zDisplay);
  builder.append(armString);
  builder.append(poseString);
  return builder.toString();
}
 
開發者ID:MyRobotLab,項目名稱:myrobotlab,代碼行數:29,代碼來源:MyoThalmic.java

示例4: onArmSync

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
@Override
public void onArmSync(Myo myo, long timestamp, Arm arm, XDirection xDirection) {
	whichArm = arm;
}
 
開發者ID:glaudiston,項目名稱:project-bianca,代碼行數:5,代碼來源:MyoThalmic.java

示例5: onArmSync

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
@Override
   public void onArmSync(Myo myo, long timestamp, Arm arm, XDirection xDirection) {
whichArm = arm;
   }
 
開發者ID:glaudiston,項目名稱:project-bianca,代碼行數:5,代碼來源:DataCollector.java

示例6: onArmSync

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
@Override
public void onArmSync(Myo myo, long timestamp, Arm arm, XDirection xDirection) {
}
 
開發者ID:glaudiston,項目名稱:project-bianca,代碼行數:4,代碼來源:AbstractDeviceListener.java

示例7: onArmSync

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
@Override
public void onArmSync(Myo myo, long arg1, Arm arm, XDirection direction, WarmupState warmUpState) {
  log.info("onArmSync {}", arm);
  whichArm = arm;
  invoke("publishArmSync", arm);
}
 
開發者ID:MyRobotLab,項目名稱:myrobotlab,代碼行數:7,代碼來源:MyoThalmic.java

示例8: publishArmSync

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
public Arm publishArmSync(Arm arm) {
  return arm;
}
 
開發者ID:MyRobotLab,項目名稱:myrobotlab,代碼行數:4,代碼來源:MyoThalmic.java

示例9: onArmSync

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
@Override
public void onArmSync(Myo myo, long timestamp, Arm arm, XDirection xDirection, float rotation, WarmupState warmupState) {
	whichArm = arm;
}
 
開發者ID:NicholasAStuart,項目名稱:myo-java,代碼行數:5,代碼來源:DataCollector.java

示例10: onArmSync

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
@Override
public void onArmSync(Myo myo, long timestamp, Arm arm, XDirection xDirection, float rotation, WarmupState warmupState) {
}
 
開發者ID:NicholasAStuart,項目名稱:myo-java,代碼行數:4,代碼來源:AbstractDeviceListener.java

示例11: onArmSync

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
public void onArmSync(Myo myo, long timestamp, Arm arm, XDirection xDirection); 
開發者ID:glaudiston,項目名稱:project-bianca,代碼行數:2,代碼來源:DeviceListener.java

示例12: onArmSync

import com.thalmic.myo.enums.Arm; //導入依賴的package包/類
public void onArmSync(Myo myo, long timestamp, Arm arm, XDirection xDirection, float rotation, WarmupState warmupState); 
開發者ID:NicholasAStuart,項目名稱:myo-java,代碼行數:2,代碼來源:DeviceListener.java


注:本文中的com.thalmic.myo.enums.Arm類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。