vrahane commented on a change in pull request #1088: [WIP] fix self test
URL: https://github.com/apache/mynewt-core/pull/1088#discussion_r189122242
 
 

 ##########
 File path: hw/drivers/sensors/lis2dw12/src/lis2dw12.c
 ##########
 @@ -1863,60 +1915,94 @@ int lis2dw12_get_int1_on_int2_map(struct sensor_itf 
*itf, uint8_t *val)
 int lis2dw12_run_self_test(struct sensor_itf *itf, int *result)
 {
     int rc;
-    int16_t base[3], pos[3];
+    /*configure min and max values for reading 5 samples, and accounting for
+     * both negative and positive offset */
+    int min = LIS2DW12_ST_MIN*5*2;
+    int max = LIS2DW12_ST_MAX*5*2;
+
+    int16_t data[3], diff[3] = {0,0,0};
     int i;
-    int16_t change;
-    uint8_t fs;
+    uint8_t prev_config[6];
+    //set config per datasheet, with positive self test mode enabled.
 
 Review comment:
   coding_style: C++ comments are not allowed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to