From 2c9f4355b1669c7f656585be7e083cbd4036d963 Mon Sep 17 00:00:00 2001 From: dragonprevost Date: Tue, 13 Nov 2018 14:36:05 -0800 Subject: added to bindings --- readme.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 2b48970..2b5a6a2 100644 --- a/readme.md +++ b/readme.md @@ -25,6 +25,7 @@ The Accelerometer measures acceleration in 3 dimensions, X, Y, and Z. These dime If adjusting the value of `DEFAUTL_THRESHOLD_MS2` keep in mind that gravity implies a motionless magnitude of -9.8m/s^2. ## Bindings +App.adef ``` ... bindings: @@ -33,6 +34,7 @@ bindings: } ... ``` +Component.cdef ``` ... requires: @@ -45,6 +47,8 @@ requires: ... ``` -## Example + +## Example + -- cgit v1.2.3 From 86b44a139649d1bc63f69dde18f27abcacb94177 Mon Sep 17 00:00:00 2001 From: dragonprevost Date: Tue, 13 Nov 2018 16:11:27 -0800 Subject: fixed submodule in readme clone --- readme.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 2b5a6a2..64b1b05 100644 --- a/readme.md +++ b/readme.md @@ -4,8 +4,7 @@ This application is designed to operate on a [MongOH Red](https://mangoh.io/mang ## Prerequisites -When cloning use ``git clone --recurse-submodule https://github.com/brnkl/motion-service.git`` -to include the util module. +When cloning use ``git clone https://github.com/brnkl/motion-service.git``. ## Building -- cgit v1.2.3 From caf251e70652039b5f64eb9a3b594674f1da5646 Mon Sep 17 00:00:00 2001 From: dragonprevost Date: Tue, 13 Nov 2018 19:38:14 -0800 Subject: added rough example to readme --- readme.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 64b1b05..08eac0b 100644 --- a/readme.md +++ b/readme.md @@ -48,6 +48,32 @@ requires: ## Example +For getting a list of impact information you may follow this example. +``` +double x_arr [array_size]; +double y_arr [array_size]; +double z_arr [array_size]; +uint64 timestamps[array_size]; + +// Fills arrays with x, y, and z acceleration that have been recorded at each impact. + +le_result_t result = getSuddenImpact(x_arr, y_arr, z_arr, timestamps); + +for (int i = 0; i < array_size; i++) + LE_INFO("X: %d - Y: %d - Z: %d - time: %ul", x_arr[i], + y_arr[i], + z_arr[i], + timestamps[i]); +``` +For receiving the current acceleration only + +``` +double x_val; +double y_val; +double z_val; +le_result_t result = getCurrentAcceleration(x_val, y_val, z_val); +LE_INFO("Current Acceleration: X: %d - Y: %d - Z: %d"); +``` -- cgit v1.2.3 From 7ba91139470e24608d255ec0156444e26133d935 Mon Sep 17 00:00:00 2001 From: dragonprevost Date: Tue, 13 Nov 2018 19:40:11 -0800 Subject: gramard check in readme --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 08eac0b..62b7a4e 100644 --- a/readme.md +++ b/readme.md @@ -47,7 +47,7 @@ requires: ``` -## Example +## Examples For getting a list of impact information you may follow this example. ``` double x_arr [array_size]; -- cgit v1.2.3