CAC_smartcushion / Mbed OS AdiSense1000_V21_Smartcushion

Fork of Sean_AdiSense1000_V21 by Rohan Gurav

Revision:
35:853be4d80ff3
Parent:
34:029fc3b83f78
Child:
36:4aded4b4f060
diff -r 029fc3b83f78 -r 853be4d80ff3 smartcushion_adisense_config.c
--- a/smartcushion_adisense_config.c	Mon Sep 24 11:39:35 2018 +0000
+++ b/smartcushion_adisense_config.c	Thu Sep 27 12:14:22 2018 +0000
@@ -168,15 +168,17 @@
                 .disablePublishing = false,
                 .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE,
                 .measurementsPerCycle = 1,
-                .extraSettlingTime = 10,
-                .offsetAdjustment = -0.15,
+                .extraSettlingTime = 100,
+                .offsetAdjustment = +0.07,
                 /* Optional threshold limits applied to the processed measurement results */
                 .lowThreshold = -2.0,
                 .highThreshold = 2.0,
                 .spiChannelConfig = {
-                    .sensor = ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_ADV_L1, //ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_ADI_ADXL362,
+                    //.sensor = ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_ADV_L1, 
+                    //ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_ADI_ADXL362,
+                    .sensor = ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_DEF_L1, 
                     .configurationCommand = {
-                        .command = { 0x0A, 0x2C, 0x03 }, /* +/-8G range */
+                        .command = { 0x0A, 0x2C, 0x83 }, /* +/-8G range 0x03, default 0x83 for +/-2G */
                         .commandLength = 3,
                     },
                 },
@@ -185,26 +187,20 @@
             {
                 /* Accelerometer Y-Axis (virtual channel) */
                 .enableChannel = true,
-                .offsetAdjustment = -0.15,
+                .offsetAdjustment = 0,
                 /* Optional threshold limits applied to the processed measurement results */
                 .lowThreshold = -2.0,
                 .highThreshold = 2.0,
-                .spiChannelConfig = {
-                    .sensor = ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_ADV_L1,
-                },
             },
             [ADI_SENSE_1000_CHANNEL_ID_SPI_2] =
             {
                 /* Accelerometer Z-Axis (virtual channel) */
                 .enableChannel = true,
                 /* Optional adjustment applied to the PROCESSED OUTPUT value from the sensor */
-                .offsetAdjustment = -0.4,
+                .offsetAdjustment = -0.2,
                 /* Optional threshold limits applied to the processed measurement results */
                 .lowThreshold = -2,
                 .highThreshold = 2,
-                .spiChannelConfig = {
-                    .sensor = ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_ADV_L1,
-                },
             },