DASH

Материал из Toshiba AC100 wiki
Перейти к: навигация, поиск

Sony DASH Sensor framework (HAL)

Documentation

http://developer.sonymobile.com/downloads/documentation/dynamic-android-sensor-hal-dash-presentation/

Sources

https://github.com/CyanogenMod/android_hardware_sony_DASH

How to enable DASH

  1. WIP. Examples from Sony Lotus repo https://github.com/XperiaSTE/android_device_sony_lotus
  2. BoardConfig
# Sensors
SOMC_CFG_SENSORS := true
SOMC_CFG_SENSORS_COMPASS_LSM303DLHC := yes
SOMC_CFG_SENSORS_ACCELEROMETER_LSM303DLHC_LT := yes
SOMC_CFG_SENSORS_LIGHT_AS3677 := yes
SOMC_CFG_SENSORS_LIGHT_AS3677_PATH := "/sys/devices/platform/nmk-i2c.2/i2c-2/2-0040"
SOMC_CFG_SENSORS_LIGHT_AS3677_MAXRANGE := 12276
SOMC_CFG_SENSORS_PROXIMITY_APDS9702 := yes
SOMC_CFG_SENSORS_PRESSURE_BMP180 := yes
  1. Makefile
# Device specific hardware configuration scripts
PRODUCT_COPY_FILES += \
	$(LOCAL_PATH)/config/dash.conf:system/etc/dash.conf
  1. DASH Config (dash.conf)
# Setup LSM303DLHC accelerometer axis
lsm303dlhc-acceleration_axis_map = 0,1,2
lsm303dlhc-acceleration_axis_sign = 1,1,1

# Setup LSM303DLHC magnetic axis
lsm303dlhx-magnetic_axis_map = 0,2,1
lsm303dlhx-magnetic_axis_sign = 1,1,1