History log of /system/chre/platform/slpi/platform_sensor.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9b1bbd8f55a6f8e943a66a6970c0c91efa36371b 23-Aug-2017 Meng-hsuan Chung <menghsuan@google.com> Override passive light sensor request to be active

This addresses a deficiency in the passive sensor design using the
sensor status monitor indication.

Bug: 64392906
Test: use SensorWorld to request Light in passive mode. Verify that the error
logging is observed and the samples are received.

Change-Id: I9fe189ca8735a89ad9f1705fbbbb7a27589a9bfb
/system/chre/platform/slpi/platform_sensor.cc
e0653a607542819b492d789952159a528c9a5e4e 23-Aug-2017 Arthur Ishiguro <arthuri@google.com> Waits for SMR service before registering

Makes sure we don't register for a service that is unavailable.

Bug: 63601406
Test: Load CHRE, make sure sensor world runs.
Change-Id: I8fbf2af1e95d873e7b636659b6001274d26015ec
/system/chre/platform/slpi/platform_sensor.cc
b9d199936165f42ac7e7eabac1bdb4968d938f4f 22-Aug-2017 Brian Duddie <bduddie@google.com> Switch to SMR for sensors support

To support receiving sensor data while in micro-image, use SMR to
communicate with SMGR rather than going through the QMI client APIs.
SMR essentially wraps the QMI interfaces and provides a short-cut that
bypasses encode/decode, though it only exposes an asynchronous API.

Bug: 63601406
Test: confirm that sensors still work in big image using SensorWorld
Change-Id: I4f5331081e5c7d5978999e281479c5672e59a1c4
/system/chre/platform/slpi/platform_sensor.cc
a265e07f2a3bdf0a0ebb4d76048eb021eabd6126 16-Aug-2017 Meng-hsuan Chung <menghsuan@google.com> Modify passive sensor implementation

- Remove the usage of asynchronous and estimated numbers of CHRE and
non-CHRE clients to decide whether to enable a passive request or not.
- Use the newly added SNS_SMGR_CLIENT_REQUEST_INFO_REQ_V01
message in the SMGR API to determine the presence of other non-CHRE clients.

Bug: 64392906
Test: 1) toggle accel/gyro/mag from sensor HAL and verify they are
enabled/disabled as expected in CHRE.
2) revert IMU cal one CL at a time to 093d0ac and verify
everything works fine.
Change-Id: I7a728065924d6dad78a67426e8312d0271a7f7e8
/system/chre/platform/slpi/platform_sensor.cc
01bfb64846ac21a263d47e1956a04c6063beac75 13-Jul-2017 Andrew Rossignol <aarossig@google.com> Prefer FIXTOFLT_Q16_SP over FIXTOFLT_Q16 to avoid double promotion

Bug: 63640902
Test: ./load_chre.sh, basic sanity check
Change-Id: Ic3faa62924233f20c108c8c95cf6eaac48cf5036
/system/chre/platform/slpi/platform_sensor.cc
72b7b72c530eae1d1eac57580c74eee2e16de0ec 07-Jul-2017 Brian Duddie <bduddie@google.com> Use longer timeout for QMI client init

Allow a lenient timeout of up to 5 seconds when initializing QMI clients
for the SLPI sensor implementation. This may help avoid triggering an
SLPI SSR if initialization is delayed due to a temporary AP-side issue.

Bug: 63110085
Test: confirm CHRE initializes normally after reboot
Change-Id: I766f92b8da65eac2893bd72f8715f794458cb285
/system/chre/platform/slpi/platform_sensor.cc
8fb8be9b9efbd8e7efdb0d6ed83f0dbe01743d24 09-Jun-2017 Meng-hsuan Chung <menghsuan@google.com> Make one-shot sensor requests with meaningful interval

Bug: 38419769
Test: use SensorWorld to enable InstantMotion and StationaryDetect
and make sure they get triggered.

Change-Id: I971b581c4ce9ab231f04fa08e89f7caf4d40c636
/system/chre/platform/slpi/platform_sensor.cc
2323f21e236e76969531c1afcafa026d219e82a2 06-Jun-2017 Meng-hsuan Chung <menghsuan@google.com> Overrides oneShot instead of onChange sensors' minInterval

Test: start chre and observe sensorInfo
Change-Id: Iadcb2818f0a0a5c8a011da53a26100fc18a77c20
/system/chre/platform/slpi/platform_sensor.cc
47fa8296dbccd2882294e55f39a55277dcb6e0d2 02-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adds typecasts to log message arguments"
7a7e350395f5ffee3592ed23e2154619e272fdd4 02-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Override one-shot sensor's minInterval to DEFAULT"
e349e7416181e31b019ca9004e881b22bab60ed3 01-Jun-2017 Meng-hsuan Chung <menghsuan@google.com> Override one-shot sensor's minInterval to DEFAULT

Instead of merely overriding sensor info with DEFAULT minInteval in
SensorRequestManager, this is now done in PlatformSensor where
minInterval is stored.

Test: run SensorWorld to enable one-shot sensors and query sensor info

Change-Id: Ife0a604282987f7e2d2d0c8571972e9200aa23da
/system/chre/platform/slpi/platform_sensor.cc
837bdb95b56d493cecad8d47f7fe113227056192 01-Jun-2017 Arthur Ishiguro <arthuri@google.com> Adds typecasts to log message arguments

These LOG code raised errors when changing from platform log
to ashLog due to type mismatch.

Test: CHRE compiles
Change-Id: I63dcd35a01673eaf413f94483fff4ceec52b4999
/system/chre/platform/slpi/platform_sensor.cc
eef8a43284e93de1b5a38426d6f8687d0a009b00 31-May-2017 Meng-hsuan Chung <menghsuan@google.com> Compensate for sensor timestamp rollovers

Test: compile and run SensorWorld

Bug: 62141763
Change-Id: I5b1fc6bbe790b6b1d2316ff2abbeb3adae7f198e
/system/chre/platform/slpi/platform_sensor.cc
86bb62ca9e700b72f182d2473300a6accd9c4818 24-May-2017 Meng-hsuan Chung <menghsuan@google.com> Post sampling change event to nanoapps

Test: load and make sure ImuCal receives it.

Change-Id: I80d39ed72f4d2854cb37ef4468b1c18cf37472ad
/system/chre/platform/slpi/platform_sensor.cc
50d7d95f1d8cae0e9c6202086b9bd432adff7bf1 23-May-2017 Andrew Rossignol <aarossig@google.com> Removes support for multiple event loops

- This feature is not needed and was not implemented entirely.
- This leaves many TODOs.
- Most CHRE systems are single-threaded.
- Multi-threaded support can be handled in a better way and held under
conditional compilation to reduce code size.

Test: run_sim.sh, load_chre.sh
Change-Id: I33fa68bc24ee423c6a3a190e5ba75bfcf7074ed3
/system/chre/platform/slpi/platform_sensor.cc
6797f377898193cbf15b71eba313bd783e552836 12-May-2017 Meng-hsuan Chung <menghsuan@google.com> Implements sampling status update

Upon sampling status change,
- update sampling status
- post the CHRE event

Also modifies SensorWorld to receive this event.

Test: compile and test on device.

Change-Id: If98330d509eddbedd8071a6fd5d402868179f083
/system/chre/platform/slpi/platform_sensor.cc
c19ad86fa95a9a9a069ad6a43038593a4cbca1eb 17-May-2017 Meng-hsuan Chung <menghsuan@google.com> Remove spammy loggings from sensor status monitor

Test: compile, run and observe loggings.

Change-Id: Icc6b381c1b9d90b1a208236131eb964ed35780fb
/system/chre/platform/slpi/platform_sensor.cc
f0818e71d208cca00f98addee6abfafc9b47958c 16-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Synchronize CHRE fifo flushes with other SLPI clients."
6728dd67ed72aae305f11bc0fa468a9ce0055817 12-May-2017 Meng-hsuan Chung <menghsuan@google.com> Synchronize CHRE fifo flushes with other SLPI clients.

Test: run CTS SensorBatchingFifoTest#testAccelerometerFifoLength test

Bug: 38139441
Change-Id: I331b67fb5989df5f5a4e422fa82df1f13ea626d8
/system/chre/platform/slpi/platform_sensor.cc
21dbd17bfcaf3fad5eddd05b8f2d414288edb09b 11-May-2017 Meng-hsuan Chung <menghsuan@google.com> Request filtered data for accel/gyro

Bug: 37872477
Change-Id: I9a3a466a5f2f10dd1149fa0ad812761b2ed791d1
/system/chre/platform/slpi/platform_sensor.cc
2b8f386e109c5470fbe8da4d3242e75c70993a1e 24-Apr-2017 Meng-hsuan Chung <menghsuan@google.com> Rework sensor request interval/latency merging.

Override high non-default interval/latency sensor request and
merge sensor request through minimum batch interval.

Test: run_tests.sh

Bug: 37904930

Change-Id: I87bf17f25e15f4f59785574d8132dbc7b48301bf
/system/chre/platform/slpi/platform_sensor.cc
89da36532e7427af9e81456ca7625455cdc5e9c2 20-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adds support for passive sensors"
4b4a86528ae065f30d548f4c79771cbc79e3e1ba 15-Apr-2017 Meng-hsuan Chung <menghsuan@google.com> Remove one-shot sensor's latency check

Bug: 37359237

Change-Id: Iea32184fb33cbe0e1c9bd15bc30782eacbe582b7
/system/chre/platform/slpi/platform_sensor.cc
f4f692d5178bf2ff40e33f7ebce86c84811d1178 31-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Adds support for passive sensors

Test: use SensorWorld to subscribe to passive sensors.
Use sensorlogger to enable sensors of the same sensor ID and verify that
SensorWorld receive data only when sensorlogger is enabled.

Change-Id: I24bed3a2f4837c57fc70f181bf4ac7483846e023
/system/chre/platform/slpi/platform_sensor.cc
53cec69ff23e5ffabf9f29d824c14fbdb18dc856 17-Apr-2017 Brian Duddie <bduddie@google.com> Rework sensor model

Model Sensor as a composite object made up of common code, common
interface and platform-specific implementation, and platform-specific
interface and implementation. These interfaces are composed via
inheritance, as they are in chre::Nanoapp, but without polymorphic
behavior.

Test: run sensor world on SLPI
Change-Id: I568688e012d0777c863be2c8b1f301322dfde0f6
/system/chre/platform/slpi/platform_sensor.cc
d9fd3fc29ccc7b91ba01dade085c2fc927b4e7b2 14-Apr-2017 Brian Duddie <bduddie@google.com> Fix argument passed to qmi_client_release

qmi_client_release takes qmi_client_type, rather than qmi_client_type*.
Also add a log to help confirm that the release completed successfully.

Bug: 37225840
Test: run on device, restart CHRE repeatedly, confirm no crash
Change-Id: I5ce1d027a7faf959acf57367be8f21ec9b9575ed
/system/chre/platform/slpi/platform_sensor.cc
c6ef3f619155a7f6e2f0ff5fbc77a11526d9970f 22-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Implements the ashSetCalibration ASH API

Test: use TimerWorld to inject a different bias/matrix every 5 seconds.
Observe the changes in QSensorTest and verify the sign and axis changes
are as expected.

Change-Id: I55cdfe90b9ca392df414a52b2574777a2221b3c5
/system/chre/platform/slpi/platform_sensor.cc
67de3f239af66c0d5733950a916bc5566f2017f0 15-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Adds support for on-change sensors

- adds getLastEvent() and setLastEvent() to Sensor and PlatformSensor
- adds getSensor() to SensorRequestManager
- delivers last valid event when a nanoapp has a new on-change sensor request.
- last event validity is handled internally in Sensor::setLastEvent().
- last event memory is handled in the constructor/destructor of PlatformSensor.

Change-Id: Ic2d4b0777cab7da57f6e8bbb0ec8df4764f8e776
/system/chre/platform/slpi/platform_sensor.cc
9cab6df9598abbf843a7b37eed0c7039048deba7 18-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Adds move assignment to PlatformSensor

This CL allows Platformsensor to allocate/free memory internally.

Also
- makes PlatformSensor non-copyable
- adds a move constructor to PlatformSensor
- changes Sensor's copy constructor to move constructor.

Change-Id: Ib944c230d534a81f76c0cb01dc545ad27c7a0543
/system/chre/platform/slpi/platform_sensor.cc
69fb1d72e0aba8aeb7b7e8adf6acddff6f2b079d 14-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Adds support for InstantMotion and StationaryDetect

Also modifies sensor world nanoapp to exercise them.

Change-Id: Id4b70aa919074aa21da92c5658b73e2d66b85bb6
/system/chre/platform/slpi/platform_sensor.cc
90db64e2ff34e67d967abf755c9dc2dd9a715079 11-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Deliver Prox data using chreSensorByteData

Change-Id: Ib38e12dbd53f9d7268179b12541b549415fa1c95
/system/chre/platform/slpi/platform_sensor.cc
cea64a899fafc0e75dc0e63dbe699ca5679564ad 09-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Removes one-shot sensor's requests after delivering data to clients

Change-Id: Ieedc53cd140eedfb206eb6e8cdda06894a77fc07
/system/chre/platform/slpi/platform_sensor.cc
48fda6e1eedf6ba80ae7596fc7676f8318a1e88e 07-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Implements the chreGetSensorInfo CHRE API

Also modifies SensorWorld nanoapp to exercise the API.

Change-Id: If71643bbc98edc5fb8a753aa546aa31ee4c27f48
/system/chre/platform/slpi/platform_sensor.cc
1a523ed0d82a594bf44e750a1a1b8701b323fc14 08-Mar-2017 Andrew Rossignol <aarossig@google.com> Supplies PlatformSensor method implementations for all platforms

Test: Run the simulator successfully
Change-Id: Ia14092f8a9a1cd85a88bb531614e8676bdb82449
/system/chre/platform/slpi/platform_sensor.cc
e62f9949c5aa827e175cfb239d9840d7517e8052 02-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Adds and populates sensor oneShot, onChange and minInterval properties

Change-Id: Iec1962cc95a949ecfbe99661e8ae87d7333792a5
/system/chre/platform/slpi/platform_sensor.cc
01d59972774453f9b0b7b92035f2919f8b6a5b35 28-Feb-2017 Meng-hsuan Chung <menghsuan@google.com> Adds a sensor status monitor

This helps keep track of number of clients for each sensor ID, which
will be used in implementing passive sensor subscriptions.

Change-Id: I7871c7829e9adcfba874e7ebcd5eb22026d3b71e
/system/chre/platform/slpi/platform_sensor.cc
ba02dd147fe1ab32de471743e1996b416d345a7a 17-Feb-2017 Meng-hsuan Chung <menghsuan@google.com> Add support for temperature and uncalibrated sensors

Change-Id: I4561ce1661496ad71b5f63ad66c990ac3d2e4b3b
/system/chre/platform/slpi/platform_sensor.cc
3e1892c28b41fd0b76ea86b10d00c6ef669f9354 15-Feb-2017 Meng-hsuan Chung <menghsuan@google.com> Add support for batching

Switch to use buffering API and deliver multiple samples in one event.

Change-Id: Ie8be22f3cb4b08d019c3c8da386aad357274961e
/system/chre/platform/slpi/platform_sensor.cc
9c8f6eb9f3429b0b8369e546ce2493b6c8829839 11-Feb-2017 Meng-hsuan Chung <menghsuan@google.com> Convert magnetometer unit from Gauss to micro Tesla

Change-Id: I4cefb6bad9a8ae81b4691172fc74661345faa1e3
/system/chre/platform/slpi/platform_sensor.cc
bf7f9e866c31f63b321172dec0a8d8037aa2460b 10-Feb-2017 Meng-hsuan Chung <menghsuan@google.com> Add support to post non-ThreeAxis data events

Change-Id: I74dff552e85a2976531e754cfefc44d69d0febe0
/system/chre/platform/slpi/platform_sensor.cc
d85d25561e8b14d02244336febb8f98ca956a134 09-Feb-2017 Meng-hsuan Chung <menghsuan@google.com> Convert from SMGR's NED coordinate to Android coorinate

Change-Id: I75642fe97cb833e6891ec798cfa8e0c06e814f0c
/system/chre/platform/slpi/platform_sensor.cc
cb8312e5ce53430576e2343e4863af84676c93ad 26-Jan-2017 Andrew Rossignol <aarossig@google.com> Refactors common PlatformSensor logic into a new core Sensor class

- The core Sensor class owns an optional PlatformSensor instance.

Change-Id: Id7589a2b2a898003bfa0ad3059d10b76a4f20aca
/system/chre/platform/slpi/platform_sensor.cc
78a4909cf27b3f1c4f9b8b46ebc8c0f16400dfa5 26-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds an API for obtaining a sensor handle from a SensorType

- Update the SLPI sensors implementation to publish sensor samples with
the correct handle

Change-Id: Ib82c6addd1630d2baeb0747026d6b75205824008
/system/chre/platform/slpi/platform_sensor.cc
832960191b74793c0b93f46973f70ec0bdf4d8fd 26-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds the correct event type when publishing sensor samples

Change-Id: Ia060546beaee772e86e90b9eb0da5468b2dcf876
/system/chre/platform/slpi/platform_sensor.cc
0d94eb2fcf599754d9a1087c3292ab6ac6495de6 24-Jan-2017 Andrew Rossignol <aarossig@google.com> Moves SensorContext static methods to PlatformSensor

- Renames all SensorContext-related files to PlatformSensor.
- Moves the SLPI sensor context util to platform sensor util.

Change-Id: I05e6b05ff162e7ec00a90e66d114f173b355ef5b
/system/chre/platform/slpi/platform_sensor.cc