diff options
Diffstat (limited to 'readme.md')
| -rw-r--r-- | readme.md | 26 | 
1 files changed, 26 insertions, 0 deletions
| @@ -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"); +``` | 
