精华内容
下载资源
问答
  • SENSOR

    2016-10-22 12:57:14
    SENSOR SENSOR_TYPE_ACCELEROMETER 1 //加速度 SENSOR_TYPE_MAGNETIC_FIELD 2 //磁力 SENSOR_TYPE_ORIENTATION 3 //方向 SENSOR_TYPE_GYROSCOPE 4 //陀螺仪 SENSOR_TYPE_LIGHT 5 //光线感应 SENSOR_TYPE_PRESSURE 6 ...

    SENSOR

    • SENSOR_TYPE_ACCELEROMETER 1 //加速度
    • SENSOR_TYPE_MAGNETIC_FIELD 2 //磁力
    • SENSOR_TYPE_ORIENTATION 3 //方向
    • SENSOR_TYPE_GYROSCOPE 4 //陀螺仪
    • SENSOR_TYPE_LIGHT 5 //光线感应
    • SENSOR_TYPE_PRESSURE 6 //压力
    • SENSOR_TYPE_TEMPERATURE 7 //温度
    • SENSOR_TYPE_PROXIMITY 8 //接近
    • SENSOR_TYPE_GRAVITY 9 //重力
    • SENSOR_TYPE_LINEAR_ACCELERATION 10//线性加速度
    • SENSOR_TYPE_ROTATION_VECTOR 11//旋转矢量

    开发传感器的步骤

    1. 调用Context的getSystemService(Context.SENSOR_SERVICE)方法获取SensorManager对象。
    2. 调用SensorManager的getDefaultSensor(int type)方法来获取指定类型的传感器。
    3. 一般在Activity的onResume()方法中调用SensorManager的registerListener()为指定传感器注册监听器即可。程序可以通过实现监听器即可获取传感器传回来的数据。
    4. SersorManager提供的注册传感器的方法为registerListener(SensorListener listener, Sensor sensor, int rate)该方法中三个参数说明如下:
      • listener:监听传感器事件的监听器
      • sensor:传感器对象
      • rate:指定获取传感器数据的频率
        rate可以获取传感器数据的频率,支持如下几个频率值:
        • SENSOR_DELAY_FASTEST:最快,延迟最小。
        • SENSOR_DELAY_GAME:适合游戏的频率。
        • SENSOR_DELAY_NORMAL:正常频率
        • SENSOR_DELAY_UI:适合普通用户界面的频率。

    加速度传感器

    加速度传感器又叫G-sensor,返回x、y、z三轴的加速度数值。该数值包含地心引力的影响,单位是m/s^2。
    - 将手机平放在桌面上,x轴默认为0,y轴默认0,z轴默认9.81。
    - 将手机朝下放在桌面上,z轴为-9.81。
    - 将手机向左倾斜,x轴为正值。
    - 将手机向右倾斜,x轴为负值。
    - 将手机向上倾斜,y轴为负值。
    - 将手机向下倾斜,y轴为正值。

    加速度传感器可能是最为成熟的一种mems产品,市场上的加速度传感器种类很多。
    手机中常用的加速度传感器有BOSCH(博世)的BMA系列,AMK的897X系列,ST的LIS3X系列等。
    这些传感器一般提供±2G至±16G的加速度测量范围,采用I2C或SPI接口和MCU相连,数据精度小于16bit。

    方向传感器

    方向传感器简称为O-sensor,返回三轴的角度数据,方向数据的单位是角度。方向传感器提供三个数据,分别为azimuth、pitch和roll。
    - azimuth:方位,返回水平时磁北极和Y轴的夹角,范围为0°至360°。
    0°=北,90°=东,180°=南,270°=西。
    - pitch:x轴和水平面的夹角,范围为-180°至180°。
    当z轴向y轴转动时,角度为正值。
    - roll:y轴和水平面的夹角,由于历史原因,范围为-90°至90°。
    当x轴向z轴移动时,角度为正值。

    陀螺仪传感器

    陀螺仪传感器叫做Gyro-sensor,返回x、y、z三轴的角加速度数据。
    角加速度的单位是radians/second

    • 水平逆时针旋转,Z轴为正。
      水平逆时针旋转,z轴为负。
    • 向左旋转,y轴为负。
      向右旋转,y轴为正。
    • 向上旋转,x轴为负。
      向下旋转,x轴为正。

    练习


    1. 开发摇一摇功能
    2. 开发指南针应用

    展开全文
  • sensor

    2017-08-05 17:47:38
    frameworks\base\core\java\android\hardware\Sensor.javasensor 的对象frameworks\base\core\java\android\hardware\SensorEvent.javasensor上发的事件对象,包含sensor信息frameworks\base\core\java\android\...


    frameworks\base\core\java\android\hardware\Sensor.java

    sensor 的对象

    frameworks\base\core\java\android\hardware\SensorEvent.java

    sensor上发的事件对象,包含sensor信息

    frameworks\base\core\java\android\hardware\SensorEventListener.java

    监听SensorEvent监听器接口

    frameworks\base\core\java\android\hardware\SensorManager.java

    用于sensor 注册与取消注册抽象类

    frameworks\base\core\java\android\hardware\LegacySensorManager.java

    与厂商相关sensor管理类

    frameworks\base\core\java\android\hardware\SystemSensorManager.java

    实现SensorManager是sensor及事件管理实现

    SensorManager-》LegacySensorManager-》SystemSensorManager实现sensor管理


    frameworks\base\services\core\java\com\android\server\SensorNotificationService.java

    是一个系统服务,实现SensorEventListener,用于监听事件并发送通知

    frameworks\base\core\java\com\android\internal\os\SensorPowerCalculator.java


    frameworks\base\services\core\java\com\mediatek\sensorhub\SensorHubService.java



    解锁码亮屏慢

    frameworks\base\packages\SystemUI\src\com\android\systemui\classifier\FalsingManager.java

    private void sessionExitpoint(boolean force) {
        if (mSessionActive && (force || !shouldSessionBeActive())) {
            mSessionActive = false;
            mSensorManager.unregisterListener(this);
        }
    }
    
    private void onSessionStart() {
        if (FalsingLog.ENABLED) {
            FalsingLog.i("onSessionStart", "classifierEnabled=" + isClassiferEnabled());
        }
        mBouncerOn = false;
        mSessionActive = true;
    
        if (mHumanInteractionClassifier.isEnabled()) {
            registerSensors(CLASSIFIER_SENSORS);
        }
        if (mDataCollector.isEnabled()) {
            registerSensors(COLLECTOR_SENSORS);
        }
    }

    根据是锁屏keyguard 时会注册p-sensor,解锁后会注销注册,由于指纹解锁应该是亮屏的。这个时候判断ps enable,不是polling mode,而且定义了GN_MTK_BSP_PS_DYNAMIC_CALI,ps_no_need_calibarate不等于1,就会动态校准。
    是android N新加的feature,在SystemUI的FalsingManager中,其中之一是通过具体感应器来监测数据, 来做容错处理,比如说用户不小心挡住传感器而导致的一些错误响应等。
    这个过程根据ps 是wait-sleep模式还是polling ,可能会导致亮屏慢200ms~300ms
    AccidentTouchWindowManager.java
    itel_mistaken_touching_proof 用来控制智能辅助功能


    public boolean isOpen() {
      return observer.value == 1;//equals to itel_mistaken_touching_proof
    }
    
    public void onScreenTurnedOff() {
        Log.d(TAG, "onScreenTurnedOff observer.value : " + observer.value);
        if (observer.value == 1 && !isRegisterSensor) {
            Log.d(TAG, "onScreenTurnedOff sensor register success");
            isRegisterSensor = true;
            mSensorManager.registerListener(this,mProximitySensor, SensorManager.SENSOR_DELAY_NORMAL);
        }
        accidentWindowDismiss();
    }
    
    public void onScreenTurnedOn() {
        Log.d(TAG, "onScreenTurnedOn isSensorShow : " +isSensorShow+" isProximity: "+isProximity+" mHallState "+mHallState);
        if (isSensorShow && isProximity && (mHallState == 0)) {
            accidentWindowShow();
        } else if (isRegisterSensor) {
            isRegisterSensor = false;
            mSensorManager.unregisterListener(this);
        }
    }
    展开全文
  • Sensor

    2018-08-28 11:11:33
    Sensor输入子系统 采用了通用的Linux输入框架,它通过/sys/class/input节点和用户空间进行交互。 Evdev提供了一种访问/dev/input/eventX输入设备事件的通用方法。 系统开机启动 init 是 zygote的父进程, 而...

    Sensor输入子系统

    采用了通用的Linux输入框架,它通过/sys/class/input节点和用户空间进行交互。

    Evdev提供了一种访问/dev/input/eventX输入设备事件的通用方法。

    系统开机启动

    init 是 zygote的父进程, 而system_server和其他所有的com.xxx结尾的应用程序都是从zygote fork 而来

    #init.rc
    service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
    SystemServer 启动

    系统启动时SystemServer main() 调用android_server_systemserver_nativeInit()

       public static void main(String[] args) {
    
            /*
             * In case the runtime switched since last boot (such as when
             * the old runtime was removed in an OTA), set the system
             * property so that it is in sync. We can't do this in
             * libnativehelper's JniInvocation::Init code where we already
             * had to fallback to a different runtime because it is
             * running as root and we need to be the system user to set
             * the property. http://b/11463182
             */
            SystemProperties.set("persist.sys.dalvik.vm.lib",
                                 VMRuntime.getRuntime().vmLibrary());
    
            if (System.currentTimeMillis() < EARLIEST_SUPPORTED_TIME) {
                // If a device's clock is before 1970 (before 0), a lot of
                // APIs crash dealing with negative numbers, notably
                // java.io.File#setLastModified, so instead we fake it and
                // hope that time from cell towers or NTP fixes it
                // shortly.
                Slog.w(TAG, "System clock is before 1970; setting to 1970.");
                SystemClock.setCurrentTimeMillis(EARLIEST_SUPPORTED_TIME);
            }
    
            if (SamplingProfilerIntegration.isEnabled()) {
                SamplingProfilerIntegration.start();
                timer = new Timer();
                timer.schedule(new TimerTask() {
                    @Override
                    public void run() {
                        SamplingProfilerIntegration.writeSnapshot("system_server", null);
                    }
                }, SNAPSHOT_INTERVAL, SNAPSHOT_INTERVAL);
            }
    
            // Mmmmmm... more memory!
            dalvik.system.VMRuntime.getRuntime().clearGrowthLimit();
    
            // The system server has to run all of the time, so it needs to be
            // as efficient as possible with its memory usage.
            VMRuntime.getRuntime().setTargetHeapUtilization(0.8f);
    
            Environment.setUserRequired(true);
    
            System.loadLibrary("android_servers");
    
            Slog.i(TAG, "Entered the Android system server!");
    
            // Initialize native services.
            nativeInit();
    
            // This used to be its own separate thread, but now it is
            // just the loop we run on the main thread.
            ServerThread thr = new ServerThread();
            thr.initAndLoop();
        }
    }
    static void android_server_SystemServer_nativeInit(JNIEnv* env, jobject clazz) {
        char propBuf[PROPERTY_VALUE_MAX];
        property_get("system_init.startsensorservice", propBuf, "1");
        if (strcmp(propBuf, "1") == 0) {
            // Start the sensor service
            SensorService::instantiate();
        }
    }
    systemReady

    客户端实例化PowerManagerService.java中systemReady,初始化SystemSensorManager

    SensorManager sensorManager = new SystemSensorManager(mContext, mHandler.getLooper());

    系统开机启动的时候,会创建SystemSensorManager的实例,在其构造函数中,主要做:

    初始化JNI:调用JNI函数nativeClassInit()进行初始化 (android_hardware_SensorManager.cpp)

    获取Sensor列表:调用JNI函数nativeGetNextSensor,对Sensor模块进行初始化。

    创建了native层SensorManager的实例。

        public SystemSensorManager(Context context, Looper mainLooper) {
            mMainLooper = mainLooper;
        mContext = context;
            mTargetSdkLevel = context.getApplicationInfo().targetSdkVersion;
            mGsensorDiscard = 0;
            synchronized(sSensorModuleLock) {
                if (!sSensorModuleInitialized) {
                    sSensorModuleInitialized = true;
    
                    nativeClassInit();
    
                    // initialize the sensor list
                    final ArrayList<Sensor> fullList = sFullSensorsList;
                    int i = 0;
                    do {
                        Sensor sensor = new Sensor();
                        i = nativeGetNextSensor(sensor, i);
                        if (i>=0) {
                            //Log.d(TAG, "found sensor: " + sensor.getName() +
                            //        ", handle=" + sensor.getHandle());
                            fullList.add(sensor);
                            sHandleToSensor.append(sensor.getHandle(), sensor);
                        }
                    } while (i>0);
                }
            }
        }
    

    服务端实现

    SensorService初始化

    SensorService::onFirstRef()方法,在该方法中完成初始化工作。
      

    1.创建SensorDevice实例
    2.获取Sensor列表
    3.调用SensorDevice.getSensorList(),获取Sensor模块所有传感器列表
    4.为每个传感器注册监听器

    SensorDevice是单例singleton

    构造函数 SensorDevice::SensorDevice()

    调用HAL层的hw_get_module()方法,加载Sensor模块so文件
    调用sensor.h的sensors_open方法打开设备
    调用sensors_poll_device_t->activate()对Sensor模块使能

    在新的线程中读取HAL层数据

    SensorService实现了Thread类,当在onFirstRef中调用run方法后,将在新的线程中调用SensorService::threadLoop()方法

    bool SensorService::threadLoop()
    {
        ALOGD("nuSensorService thread starting...");
        const size_t minBufferSize = SensorEventQueue::MAX_RECEIVE_BUFFER_EVENT_COUNT;
        const size_t numEventMax = minBufferSize / (1 + mVirtualSensorList.size());
        SensorDevice& device(SensorDevice::getInstance());
        const size_t vcount = mVirtualSensorList.size();
        const int halVersion = device.getHalDeviceVersion();
        do {
            ssize_t count = device.poll(mSensorEventBuffer, numEventMax);//轮询
    

    APP客户端 使用方法

    SensorManager.java    从android4.1开始,把SensorManager定义为一个抽象类,定义了一些主要的方法,该类主要是应用层直接使用的类,提供给应用层的接口)

    SystemSensorManager.java (这是implement) 应用程序通过获取其实例,并注册监听接 口,获取sensor数据。

    Activity实现了SensorEventListener接口。
      在onCreate方法中,获取SystemSensorManager,并获取到加速传感器的Sensor;
      在onResume方法中调用SystemSensorManager,registerListenerImp
      

    Sensor accSensor = sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);  
    sensorManager.registerListener(this, accSensor, SensorManager.SENSOR_DELAY_NORMAL);  
    sensorManager.unregisterListener(this, accSensor);  
    //然后在当前Activity中实现以下的两个函数  
    public void onSensorChanged(SensorEvent event)   
    public void onAccuracyChanged(Sensor sensor, int accuracy)  

    代码和动态库so

    Framework部分:

    frameworks/base/core/Java/Android/hardware/SensorManager.java
    frameworks/base/core/jni/android_hardware_sensorManager.cpp

    下面的代码会生成到:libgui.so

    frameworks/base/libs/gui/SensorManager.cpp
    frameworks/base/libs/gui/SensorEventQueue.cpp
    frameworks/base/libs/gui/SensorChannel.cpp
    frameworks/base/libs/gui/Sensor.cpp

    下面的代码会生成:libsensorservice.so

    frameworks/base/services/sensorservice/SensorService.cpp
    frameworks/base/services/sensorservice/SensorDevice.cpp

    HAL部分:这部分代码最终会生成 sensor.default.so 到/system/lib/hw/

    hardware/libhardware/include/hardware/Sensors.h
    device/qcom/msm7627a/libsensors/Sensors.cpp
    device/qcom/msm7627a/libsensors/SensorBase.h
    device/qcom/msm7627a/libsensors/AccSensor.cpp
    device/qcom/msm7627a/libsensors/ProximitySensor.cpp
    device/qcom/msm7627a/libsensors/LightSensor.cpp

    安卓的传感器

    安卓的传感器又可以分为基于硬件的和基于软件的。基于硬件的传感器往往是通过物理组件去实现的,他们通常是通过去测量特殊环境的属性获取数据,比如:重力加速度、地磁场强度或方位角度的变化。而基于软件的传感器并不依赖物理设备,尽管它们是模仿基于硬件的传感器的。基于软件的传感器通常是通过一个或更多的硬件传感器获取数据,并且有时会调用虚拟传感器或人工传感器等等,线性加速度传感器和重力传感器就是基于软件传感器的例子。下面通过官方的一张图看看安卓平台支持的所有传感器类型:

    “`
    TYPE_ACCELEROMETER
    加速度传感器,单位是m/s2,测量应用于设备X、Y、Z轴上的加速度
    传感器类型值(Sensor Type):1 (0x00000001)

    TYPE_AMBIENT_TEMPERATURE
    温度传感器,单位是℃
    传感器类型值(Sensor Type): 13 (0x0000000d)

    TYPE_GAME_ROTATION_VECTOR
    游戏动作传感器,不收电磁干扰影响
    传感器类型值(Sensor Type):15 (0x0000000f)

    TYPE_GEOMAGNETIC_ROTATION_VECTOR
    地磁旋转矢量传感器,提供手机的旋转矢量,当手机处于休眠状态时,仍可以记录设备的方位
    传感器类型值(Sensor Type):20 (0x00000014)

    TYPE_GRAVITY
    重力传感器,单位是m/s2,测量应用于设备X、Y、Z轴上的重力
    传感器类型值(Sensor Type):9 (0x00000009)

    TYPE_GYROSCOPE
    陀螺仪传感器,单位是rad/s,测量设备x、y、z三轴的角加速度
    传感器类型值(Sensor Type):4 (0x00000004)

    TYPE_GYROSCOPE_UNCALIBRATED
    未校准陀螺仪传感器,提供原始的,未校准、补偿的陀螺仪数据,用于后期处理和融合定位数据
    传感器类型值(Sensor Type):16 (0x00000010)

    TYPE_LIGHT
    光线感应传感器,单位lx,检测周围的光线强度
    传感器类型值(Sensor Type):5 (0x00000005)

    TYPE_LINEAR_ACCELERATION
    线性加速度传感器,单位是m/s2,该传感器是获取加速度传感器去除重力的影响得到的数据
    传感器类型值(Sensor Type):10 (0x0000000a)

    TYPE_MAGNETIC_FIELD
    磁力传感器,单位是uT(微特斯拉),测量设备周围三个物理轴(x,y,z)的磁场
    传感器类型值(Sensor Type):2 (0x00000002)

    TYPE_MAGNETIC_FIELD_UNCALIBRATED
    未校准磁力传感器,提供原始的,未校准的磁场数据
    传感器类型值(Sensor Type):14 (0x0000000e)

    TYPE_ORIENTATION
    方向传感器,测量设备围绕三个物理轴(x,y,z)的旋转角度
    传感器类型值(Sensor Type):3 (0x00000003)

    TYPE_PRESSURE
    压力传感器,单位是hPa(百帕斯卡),返回当前环境下的压强
    传感器类型值(Sensor Type):6 (0x00000006)

    TYPE_PROXIMITY
    距离传感器,单位是cm,用来测量某个对象到屏幕的距离
    传感器类型值(Sensor Type):8 (0x00000008)

    TYPE_RELATIVE_HUMIDITY
    湿度传感器,单位是%,来测量周围环境的相对湿度
    传感器类型值(Sensor Type):12 (0x0000000c)

    TYPE_ROTATION_VECTOR
    旋转矢量传感器,旋转矢量代表设备的方向
    传感器类型值(Sensor Type):11 (0x0000000b)

    TYPE_SIGNIFICANT_MOTION
    特殊动作触发传感器
    传感器类型值(Sensor Type):17 (0x00000011)

    TYPE_STEP_COUNTER
    计步传感器
    传感器类型值(Sensor Type):19 (0x00000013)

    TYPE_STEP_DETECTOR
    步行检测传感器,用户每走一步就触发一次事件
    传感器类型值(Sensor Type):18 (0x00000012)

    TYPE_TEMPERATURE
    温度传感器,目前已被TYPE_AMBIENT_TEMPERATURE替代
    传感器类型值(Sensor Type):7 (0x00000007)
    “`

    展开全文
  • Sensor-sensor日志

    2019-07-23 15:12:49
    在一些传感器异常的问题中我们常常需要看最近的sensor日志,那么我们可以通过dumpsys sensorservice来看最近sensor上报的数据。 二.日志的初始化已经记录 我们在SensorService.cpp中有一个std::unordered_map<...

    一.摘要

        在一些传感器异常的问题中我们常常需要看最近的sensor日志,那么我们可以通过dumpsys sensorservice来看最近sensor上报的数据。

    二.日志的初始化已经记录

        我们在SensorService.cpp中有一个std::unordered_map<int, RecentEventLogger*> mRecentEvent;对象,这个对象是专门用来记录sensor日志的,每个sensor注册时会添加到这个mRecentEvent

    const Sensor& SensorService::registerSensor(SensorInterface* s, bool isDebug, bool isVirtual) {
        int handle = s->getSensor().getHandle();
        int type = s->getSensor().getType();
        if (mSensors.add(handle, s, isDebug, isVirtual)){
            mRecentEvent.emplace(handle, new RecentEventLogger(type));
            return s->getSensor();
        } else {
            return mSensors.getNonSensor();
        }
    }

    RecentEventLogger的构造方法:

    RecentEventLogger::RecentEventLogger(int sensorType) :
            mSensorType(sensorType), mEventSize(eventSizeBySensorType(mSensorType)),
            mRecentEvents(logSizeBySensorType(sensorType)), mMaskData(false),
            mIsLastEventCurrent(false) {
        // blank
    }

    这里会初始化mSensorType,mEventSize,mRecentEvents,mMaskData,mIsLastEventCurrent。

    我们看到logSizeBySensorType(sensorType):

    constexpr size_t LOG_SIZE = 10;
    constexpr size_t LOG_SIZE_LARGE = 50;  // larger samples for debugging
    
    size_t RecentEventLogger::logSizeBySensorType(int sensorType) {
        return (sensorType == SENSOR_TYPE_STEP_COUNTER ||
                sensorType == SENSOR_TYPE_SIGNIFICANT_MOTION ||
                sensorType == SENSOR_TYPE_ACCELEROMETER ||
                sensorType == SENSOR_TYPE_LIGHT) ? LOG_SIZE_LARGE : LOG_SIZE;
    }

    这里会根据不同的sensor来初始化mRecentEvents的大小,对应记录日志的条数。

    日志的记录:

    void SensorService::recordLastValueLocked(
            const sensors_event_t* buffer, size_t count) {
        for (size_t i = 0; i < count; i++) {
            if (buffer[i].type == SENSOR_TYPE_META_DATA ||
                buffer[i].type == SENSOR_TYPE_DYNAMIC_SENSOR_META ||
                buffer[i].type == SENSOR_TYPE_ADDITIONAL_INFO) {
                continue;
            }
    
            auto logger = mRecentEvent.find(buffer[i].sensor);
            if (logger != mRecentEvent.end()) {
                logger->second->addEvent(buffer[i]);
            }
        }
    }

    三.打印sensor日志:dumpsys sensorservice

    Recent Sensor events:
    icm4x6xx Accelerometer Non-wakeup: last 50 events
    	 1 (ts=2854.096160598, wall=14:19:36.716) 0.03, 0.00, 9.86, 
    	 2 (ts=2854.296986275, wall=14:19:36.877) 0.03, 0.00, 9.86, 
    	 3 (ts=2854.497808515, wall=14:19:37.198) 0.03, 0.00, 9.86, 
    	 4 (ts=2854.698632004, wall=14:19:37.359) 0.03, -0.00, 9.86, 
    	 5 (ts=2854.899459504, wall=14:19:37.519) 0.03, 0.00, 9.88, 
    	 6 (ts=2855.100292421, wall=14:19:37.680) 0.03, 0.00, 9.86, 
    	 7 (ts=2855.301129869, wall=14:19:38.001) 0.03, 0.00, 9.86, 
    	 8 (ts=2855.501969608, wall=14:19:38.161) 0.03, 0.00, 9.86, 
    	 9 (ts=2855.702804348, wall=14:19:38.322) 0.03, 0.00, 9.87, 
    	10 (ts=2855.903625546, wall=14:19:38.483) 0.03, 0.00, 9.87, 
    	11 (ts=2856.104443046, wall=14:19:38.805) 0.03, 0.00, 9.87, 
    	12 (ts=2856.305255754, wall=14:19:38.965) 0.03, 0.00, 9.86, 
    	13 (ts=2856.506068827, wall=14:19:39.126) 0.03, 0.00, 9.87, 
    	14 (ts=2856.706884296, wall=14:19:39.287) 0.03, 0.00, 9.87, 
    	15 (ts=2856.907703254, wall=14:19:39.608) 0.03, 0.00, 9.86, 
    	16 (ts=2857.108524921, wall=14:19:39.768) 0.03, -0.00, 9.86, 
    	17 (ts=2857.309348202, wall=14:19:39.929) 0.03, -0.00, 9.86, 
    	18 (ts=2857.510160338, wall=14:19:40.090) 0.03, -0.00, 9.87, 
    	19 (ts=2857.710966379, wall=14:19:40.411) 0.03, 0.00, 9.87, 
    	20 (ts=2857.911774088, wall=14:19:40.569) 0.03, -0.00, 9.86, 
    	21 (ts=2858.112584140, wall=14:19:40.732) 0.03, 0.00, 9.87, 
    	22 (ts=2858.313397525, wall=14:19:40.894) 0.03, 0.00, 9.87, 
    	23 (ts=2858.514212942, wall=14:19:41.215) 0.03, 0.00, 9.87, 
    	24 (ts=2858.715028671, wall=14:19:41.375) 0.03, 0.00, 9.87, 
    	25 (ts=2858.915845129, wall=14:19:41.536) 0.03, 0.00, 9.87, 
    	26 (ts=2859.116662733, wall=14:19:41.697) 0.04, 0.01, 9.87, 
    	27 (ts=2859.317483983, wall=14:19:42.018) 0.03, 0.00, 9.87, 
    	28 (ts=2859.518307525, wall=14:19:42.177) 0.03, 0.00, 9.86, 
    	29 (ts=2859.719132317, wall=14:19:42.339) -0.16, 0.05, 9.86, 
    	30 (ts=2859.919957317, wall=14:19:42.502) 0.24, -0.13, 9.88, 
    	31 (ts=2860.106134504, wall=14:19:42.701) 0.07, -0.04, 9.78, 
    	32 (ts=2860.307350390, wall=14:19:42.902) 0.15, 0.22, 9.87, 
    	33 (ts=2860.508566483, wall=14:19:43.100) 0.03, 0.00, 9.86, 
    	34 (ts=2860.709783150, wall=14:19:43.304) 0.24, -0.09, 9.86, 
    	35 (ts=2860.911000546, wall=14:19:43.506) -0.41, -0.07, 9.83, 
    	36 (ts=2861.112217838, wall=14:19:43.707) 0.30, -0.58, 9.88, 
    	37 (ts=2861.313434504, wall=14:19:43.909) -0.17, 0.74, 9.87, 
    	38 (ts=2861.514651171, wall=14:19:44.109) 0.17, -0.02, 9.86, 
    	39 (ts=2861.715867838, wall=14:19:44.311) 0.03, -0.01, 9.87, 
    	40 (ts=2861.917084504, wall=14:19:44.512) 0.03, -0.00, 9.86, 
    	41 (ts=2862.118301171, wall=14:19:44.713) 0.03, -0.00, 9.86, 
    	42 (ts=2862.319517838, wall=14:19:44.914) 0.03, -0.00, 9.87, 
    	43 (ts=2862.535053046, wall=14:19:45.156) 0.03, -0.00, 9.86, 
    	44 (ts=2862.735366796, wall=14:19:45.317) 0.03, -0.00, 9.86, 
    	45 (ts=2862.936161483, wall=14:19:45.559) 0.03, -0.00, 9.87, 
    	46 (ts=2863.137457421, wall=14:19:45.719) 0.03, -0.00, 9.86, 
    	47 (ts=2863.339220233, wall=14:19:45.961) 0.03, -0.00, 9.87, 
    	48 (ts=2863.541249817, wall=14:19:46.122) 0.03, -0.00, 9.87, 
    	49 (ts=2863.743036431, wall=14:19:46.360) 0.03, -0.00, 9.87, 
    	50 (ts=2863.944253254, wall=14:19:46.520) 0.03, -0.00, 9.87, 
    tcs3701  Non-wakeup: last 10 events
    	 1 (ts=2946.619745243, wall=14:21:09.235) 444.16, 580.53, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 
    	 2 (ts=2946.739745243, wall=14:21:09.314) 444.34, 582.80, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 
    	 3 (ts=2946.819745243, wall=14:21:09.432) 444.09, 577.72, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 
    	 4 (ts=2946.939745243, wall=14:21:09.512) 444.23, 580.40, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 
    	 5 (ts=2947.019745243, wall=14:21:09.634) 444.42, 580.72, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 
    	 6 (ts=2947.139745243, wall=14:21:09.714) 444.61, 580.83, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 
    	 7 (ts=2947.219745243, wall=14:21:09.834) 444.63, 580.15, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 
    	 8 (ts=2947.339745243, wall=14:21:09.914) 444.52, 580.33, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 
    	 9 (ts=2947.419745243, wall=14:21:10.034) 444.34, 580.19, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 
    	10 (ts=2947.539745243, wall=14:21:10.114) 444.52, 580.99, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 
    tcs3701 Ambient Light Sensor Non-wakeup: last 50 events
    	 1 (ts=2226.121162390, wall=14:09:08.637) 243.82, 384.66, 0.00, 
    	 2 (ts=2229.121135411, wall=14:09:11.626) 220.43, 201.99, 0.00, 
    	 3 (ts=2234.921162911, wall=14:09:17.436) 260.77, 441.69, 0.00, 
    	 4 (ts=2243.421169366, wall=14:09:25.937) 292.10, 440.46, 0.00, 
    	 5 (ts=2246.421168637, wall=14:09:28.937) 264.20, 252.35, 0.00, 
    	 6 (ts=2254.921168846, wall=14:09:37.437) 237.25, 274.17, 0.00, 
    	 7 (ts=2259.421161085, wall=14:09:41.936) 204.11, 65.55, 0.00, 
    	 8 (ts=2263.421168637, wall=14:09:45.937) 234.64, 413.99, 0.00, 
    	 9 (ts=2269.421168794, wall=14:09:51.935) 266.84, 437.25, 0.00, 
    	10 (ts=2272.871168950, wall=14:09:55.384) 234.09, 187.97, 0.00, 
    	11 (ts=2276.171168012, wall=14:09:58.686) 260.72, 477.61, 0.00, 
    	12 (ts=2277.171167804, wall=14:09:59.687) 291.17, 558.56, 0.00, 
    	13 (ts=2278.921170669, wall=14:10:01.436) 334.27, 439.70, 0.00, 
    	14 (ts=2279.921167335, wall=14:10:02.437) 373.79, 430.49, 0.00, 
    	15 (ts=2299.371165721, wall=14:10:21.884) 415.99, 560.64, 0.00, 
    	16 (ts=2316.621180814, wall=14:10:39.136) 375.97, 332.78, 0.00, 
    	17 (ts=2336.921172324, wall=14:10:59.436) 336.79, 457.61, 0.00, 
    	18 (ts=2344.371158835, wall=14:11:06.876) 378.39, 498.37, 0.00, 
    	19 (ts=2351.021174147, wall=14:11:13.536) 343.31, 325.59, 0.00, 
    	20 (ts=2382.621179252, wall=14:11:45.137) 381.96, 565.16, 0.00, 
    	21 (ts=2387.071179773, wall=14:11:49.587) 339.37, 384.41, 0.00, 
    	22 (ts=2388.071178575, wall=14:11:50.587) 307.95, 281.18, 0.00, 
    	23 (ts=2389.071179773, wall=14:11:51.586) 275.06, 267.06, 0.00, 
    	24 (ts=2390.571180710, wall=14:11:53.086) 242.22, 266.33, 0.00, 
    	25 (ts=2394.071187273, wall=14:11:56.586) 271.57, 463.68, 0.00, 
    	26 (ts=2400.071180919, wall=14:12:02.587) 243.75, 341.59, 0.00, 
    	27 (ts=2405.571182794, wall=14:12:08.087) 276.05, 422.47, 0.00, 
    	28 (ts=2412.571180190, wall=14:12:15.085) 247.28, 257.95, 0.00, 
    	29 (ts=2414.071179721, wall=14:12:16.587) 221.20, 307.36, 0.00, 
    	30 (ts=2417.921178783, wall=14:12:20.437) 251.55, 478.45, 0.00, 
    	31 (ts=2418.921178471, wall=14:12:21.437) 285.69, 554.16, 0.00, 
    	32 (ts=2421.121180971, wall=14:12:23.636) 323.92, 546.42, 0.00, 
    	33 (ts=2425.121184873, wall=14:12:27.637) 364.95, 553.90, 0.00, 
    	34 (ts=2478.471185550, wall=14:13:20.987) 331.14, 228.03, 0.00, 
    	35 (ts=2480.971184404, wall=14:13:23.487) 378.91, 560.23, 0.00, 
    	36 (ts=2646.171204230, wall=14:16:08.686) 340.17, 332.61, 0.00, 
    	37 (ts=2653.871205793, wall=14:16:16.387) 384.60, 471.37, 0.00, 
    	38 (ts=2669.871212124, wall=14:16:32.387) 347.74, 410.62, 0.00, 
    	39 (ts=2682.321210353, wall=14:16:44.836) 311.27, 417.46, 0.00, 
    	40 (ts=2687.571212384, wall=14:16:50.086) 347.46, 468.98, 0.00, 
    	41 (ts=2694.021203061, wall=14:16:56.536) 315.81, 283.56, 0.00, 
    	42 (ts=2699.971213269, wall=14:17:02.487) 354.49, 484.49, 0.00, 
    	43 (ts=2727.821216391, wall=14:17:30.334) 394.79, 483.69, 0.00, 
    	44 (ts=2784.021222231, wall=14:18:26.536) 356.83, 375.04, 0.00, 
    	45 (ts=2806.071221138, wall=14:18:48.585) 399.96, 498.34, 0.00, 
    	46 (ts=2809.671221606, wall=14:18:52.185) 358.59, 497.79, 0.00, 
    	47 (ts=2864.358933931, wall=14:19:46.860) 403.40, 527.02, 0.00, 
    	48 (ts=2952.182837326, wall=14:21:14.699) 454.20, 593.31, 0.00, 
    	49 (ts=2954.057266805, wall=14:21:16.573) 456.20, 595.96, 0.00, 
    	50 (ts=2956.207329357, wall=14:21:18.723) 409.40, 534.90, 0.00, 
    tcs3701 Proximity Sensor Wakeup: last 10 events
    	 1 (ts=2851.045018463, wall=14:19:33.556) 5.00, 0.00, 0.00, 
    	 2 (ts=2857.257696379, wall=14:19:39.770) 0.00, 0.00, 0.00, 
    	 3 (ts=2857.990780338, wall=14:19:40.504) 5.00, 0.00, 0.00, 
    	 4 (ts=2858.402411952, wall=14:19:40.917) 0.00, 0.00, 0.00, 
    	 5 (ts=2858.608242317, wall=14:19:41.122) 5.00, 0.00, 0.00, 
    	 6 (ts=2858.916938775, wall=14:19:41.431) 0.00, 0.00, 0.00, 
    	 7 (ts=2859.437928150, wall=14:19:41.954) 5.00, 0.00, 0.00, 
    	 8 (ts=2861.322240858, wall=14:19:43.837) 0.00, 0.00, 0.00, 
    	 9 (ts=2861.425162213, wall=14:19:43.937) 5.00, 0.00, 0.00, 
    	10 (ts=2864.838007213, wall=14:19:47.344) 5.00, 0.00, 0.00, 
    

     

    展开全文
  • 转自Android sensor 待进一步整理 Sensor types This section describes sensor axes, base sensors, and composite sensors (activity, attitude, uncalibrated, and interaction). Sensor axes Sensor event ...
  • sensor_lite Introduction Directory Structure Usage Available APIs Usage Guidelines Repositories Involved Introduction The pan-sensor service subsystem provides a lightweight sensor ...
  • Sensor Hub

    千次阅读 2019-11-07 17:58:57
    Sensor Hub,中文名:传感器控制中心。 Sensor Hub主要有两个功能:  1. 在CPU休眠的情况下,实现对传感器的实时控制,从而达到降低功耗的功能。  2. 将不同类型Sensor的数据进行融合,实现多种sensor数据结合...
  • Camera Sensor

    2019-09-24 09:33:34
    camera sensor分为YUV sensor和Bayer sensor。 YUV Sensor YUV Sensor输出的格式是YUV,图像的处理效果使用sensor内部的ISP,BB端接收到的YUV格式数据后只能进行格式的转换,效果方面不进行处理,由于Sensor内部的...
  • sensor Hub

    2020-08-23 16:18:16
    Sensor Hub,中文名:传感器控制中心。 Sensor Hub主要有两个功能:  1. 在CPU休眠的情况下,实现对传感器的实时控制,从而达到降低功耗的功能。  2. 将不同类型Sensor的数据进行融合,实现多种sensor数据结合...
  • sensor hub

    2014-11-19 20:19:25
    智能机趋势,Sensor hub,替身用户体验,降低功耗
  • sensor_id: A unique sensor identifier that is used to differentiate this specific sensor instance from any others that are present on the system or in the sensor network (must match the sensor_id ...
  • Sensor Controller Studio

    2018-03-08 13:58:43
    Sensor Controller Studio is used to write, test and debug code for the CC26xx/CC13xx Sensor Controller.
  • 1.Initialize the Sensor1 Frameworksensor1_error_e error; error = sensor1_init(); if(error != SENSOR1_SUCCESS){ ALOGE(" sensor1_init returned %d\n", error); }2. Open a new Sensor1 connection sensor1_
  • fullSensor

    千次阅读 2020-02-28 00:38:37
    将Android Sutdio升级到了3.6.0。现在,我的Manifest....Expecting 'android:screenOrientation="unspecified"' or '"fullSensor"' for this activity so the user can use the application in any orientation an...
  • Sensor module abstraction

    2020-12-26 19:00:50
    <div><p>Separating the sensor conversation started in issue #125, let's outline a general status of where the system is and where we'd like to go. <h2>Current Setup <p>The sensor modules ...
  • rockchip sensor 开发指南

    2018-12-18 17:44:23
    rockchip sensor 开发指南,介绍rockchip平台sensor架构
  • SensorNetwork

    2009-11-18 10:37:36
    SensorNetwork SensorNetwork SensorNetworkSensorNetworkSe nsorNetwor kSensorNetworkSensorNetworkSensorNetworkSensorNetwork Wireless sensor network, sensys best paper
  • pulsesensor.zip

    2020-03-28 11:02:03
    stm32单片机驱动pulsesensor心率传感器的定时器、ADC程序,用于开发驱动pulsesensor心率传感器,包含传感器数据处理算法,适用于STM32系列单片机。
  • In SITL, running <code>uorb top sensor_accel sensor_gyro sensor_baro sensor_mag</code>: <pre><code>console update: 1s, num topics: 69 TOPIC NAME INST #SUB #MSG #LOST #QSIZE sensor_gyro 0 1 249 248 4 ...
  • 好文章: Android 4.4中的距离/接近...Android Proximity Sensor近距离传感器P-Sensor详解 http://www.itxm.cn/post/266.html Android 8.1 DisplayPowerController(二) Proximity Sensor的亮灭屏 https://blog.csdn.n
  • Sensor Fusion

    千次阅读 2017-03-10 15:47:25
    1. 概述首先明确几个概念和名词:Sensor Fusion - 传感器融合 IMU (Inertial Measurement Unit) - 惯性测量单元 AHRS (Attitude and Heading Reference System) - 航姿参考系统研究了一下现有的Sensor Fusion技术,...
  • LightSensor传感器

    2020-12-02 20:11:34
    sensor 将底层值转换的地方 khadas/hardware/amlogic/sensor/st/LightSensor.cpp

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 35,505
精华内容 14,202
关键字:

sensor