本文整理汇总了Java中org.md2k.datakitapi.source.datasource.DataSourceType.ACCELEROMETER_Z属性的典型用法代码示例。如果您正苦于以下问题:Java DataSourceType.ACCELEROMETER_Z属性的具体用法?Java DataSourceType.ACCELEROMETER_Z怎么用?Java DataSourceType.ACCELEROMETER_Z使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.md2k.datakitapi.source.datasource.DataSourceType
的用法示例。
在下文中一共展示了DataSourceType.ACCELEROMETER_Z属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDataSourceType
public String getDataSourceType(byte[] ANTRxMessage) {
byte mSequenceNumber = (byte) (ANTRxMessage[8] & 0x0F);
switch (mSequenceNumber) {
case NINE_AXIS_ACCL_X_CHANNEL:
return DataSourceType.ACCELEROMETER_X;
case NINE_AXIS_ACCL_Y_CHANNEL:
return DataSourceType.ACCELEROMETER_Y;
case NINE_AXIS_ACCL_Z_CHANNEL:
return DataSourceType.ACCELEROMETER_Z;
case NINE_AXIS_GYRO_X_CHANNEL:
return DataSourceType.GYROSCOPE_X;
case NINE_AXIS_GYRO_Y_CHANNEL:
return DataSourceType.GYROSCOPE_Y;
case NINE_AXIS_GYRO_Z_CHANNEL:
return DataSourceType.GYROSCOPE_Z;
default:
return null;
}
}
示例2: getDataSourceType
public String getDataSourceType(byte[] ANTRxMessage) {
final byte[] fixed_send_order = {0, 1, 0, 2, 0, 7, 0, 3, 0, 4, 0, 7, (byte) 0xFF, (byte) 0xFF, (byte) 0xFF, 8};
byte mSequenceNumber = (byte) (ANTRxMessage[8] & 0x0F);
switch (fixed_send_order[mSequenceNumber]) {
case ECG_CHANNEL:
return DataSourceType.ECG;
case ACCELX_CHANNEL:
return DataSourceType.ACCELEROMETER_X;
case ACCELY_CHANNEL:
return DataSourceType.ACCELEROMETER_Y;
case ACCELZ_CHANNEL:
return DataSourceType.ACCELEROMETER_Z;
case RIP_BASELINE_CHANNEL:
return DataSourceType.RESPIRATION_BASELINE;
case RIP_CHANNEL:
return DataSourceType.RESPIRATION;
case MISC_CHANNEL:
return "BATTERY_SKIN_AMBIENT";
// Packetizer.getInstance().addPacket(samples, SAMPLE_NO, 8, timestamp);
//try {
//textBATTERY.setText("Battery: " + (float)samples[0]/4096*3*2 + "V");
//textSKIN.setText("Skin Temperature: " + samples[1]);
//textAMBIENT.setText("Ambient Temperature: " + samples[2]);
//Log.d(TAG, "Battery: " + (float)samples[0]/4096*3*2 + "V");
//Log.d(TAG, "Skin Temperature: " + samples[1]);
//Log.d(TAG, "Ambient Temperature: " + samples[2]);
//}
//catch(Exception e)
//{
// Log.e(TAG, "antDecodeAutoSense: Caught exception " + e);
//}
//Log.d(TAG, "SKIN TEMP: " + samples[1]);
//Log.d(TAG, "AMBIENT TEMP: " + samples[2]);
//Log.d(TAG, "BATTERY: " + samples[0]);
default:
return null;
}
}