资讯详情

Android/Linux 方向传感器的调试经验

1、HAL层传感器信息:

文件路径:MSM8916.LA.1.1-PostCS-CT-CMCC-r113500.1srcLINUXandroidhardwareqcomsensors

文件名:NativeSensorManager.cpp

int NativeSensorManager::getDataInfo() {

……

if (has_acc && has_compass) {

int index;

list = &context[mSensorCount];

list->sensor = &sensor_list[mSensorCount];

list->sensor->name = "orientation";

list->sensor->vendor = "quic";

list->sensor->version = 1;

list->sensor->handle = '_ypr';

list->sensor->type = SENSOR_TYPE_ORIENTATION;

list->sensor->maxRange = 360.0f;

list->sensor->resolution = 1.0f/256.0f;

list->sensor->power = 1;

list->sensor->minDelay = 1;

list->data_fd = -1;

list->data_path = NULL;

list->enable_path = NULL;

list->driver = new OrientationSensor(list);

mSensorCount ;

list->dep_mask |= 1 << SENSOR_TYPE_ACCELEROMETER;

list->dep_mask |= 1 << SENSOR_TYPE_MAGNETIC_FIELD;

}

……

}

标签: 传感器has500

锐单商城拥有海量元器件数据手册IC替代型号,打造 电子元器件IC百科大全!

锐单商城 - 一站式电子元器件采购平台