Updates implementation and examples to use dynamic-friendly interface

Signed-off-by: deadprogram <ron@hybridgroup.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
deadprogram
2016-03-18 15:28:40 -07:00
committed by Mihai Tudor Panu
parent 3e7fca21ee
commit 83b0512ffb
4 changed files with 108 additions and 32 deletions

View File

@ -58,7 +58,9 @@ main(int argc, char **argv)
sensor->enableShockDetection(true);
for(int i=0; i<300; i++) {
if (sensor->isShockDetected()) {
sensor->getShockDetectData(&axis, &direction);
sensor->getNextShock();
axis = sensor->getAxis();
direction = sensor->getDirection();
printf("shock data is: %d, %d\n", axis, direction);
}
usleep(10000);