(Working) Code to interface 3 LoadCells to ADISense1000 and display values using the Labview code.

Fork of 4Bridge_ADISense1000_Example_copy by CAC_smartcushion

Revision:
3:83d10123d1cd
Parent:
2:2f9f9f7f0243
--- a/sample_lut_data.c	Thu Jul 19 13:25:33 2018 +0000
+++ b/sample_lut_data.c	Wed Aug 08 08:08:53 2018 +0000
@@ -1,23 +1,24 @@
+/*
+ * File: sample_lut_data.c
+ * The following example illustrates how individual tables can be declared, and
+ * later assembled into a complete LUT data structure using adi_sense_1000_AssembleLutData().
+ * That LUT data structure can then be written to the ADI Sense 1000 device 
+ * using adi_sense_1000_SetLutData().
+ */
+
 #include "adi_sense_1000_lut_data.h"
 #include "adi_sense_1000_sensor_types.h"
 
 /*
- * The following example illustrates how individual tables can be declared, and
- * later assembled into a complete LUT data structure using
- * adi_sense_1000_AssembleLutData().  That LUT data structure can then be
- * written to the ADI Sense 1000 device using adi_sense_1000_SetLutData().
- */
-
-
-
-/*
  * The following table provide linearisation data for a 4-wire bridge sensor
  * identified with the ADI_SENSE_1000_ADC_SENSOR_BRIDGE_4WIRE_1_DEF_L2
  * sensor type.  The Look-Up Table provided maps a range of input (X)
  * values to a corresponding range of output (Y) values.  In this example,
  * the bridge sensor input in millivolts is effectively translated to volts.
  */
-ADI_SENSE_1000_LUT_DESCRIPTOR bridge_4wire_1_def_l2_range1_desc = {
+
+ADI_SENSE_1000_LUT_DESCRIPTOR bridge_4wire_1_def_l2_range1_desc = 
+{
     .geometry = ADI_SENSE_1000_LUT_GEOMETRY_NES_1D,
     .equation = ADI_SENSE_1000_LUT_EQUATION_LUT,
     .dir = ADI_SENSE_1000_LUT_TC_DIRECTION_FORWARD,
@@ -26,13 +27,16 @@
     .length = 0, /* Filled by adi_sense_1000_AssembleLutData() */
     .crc16 = 0   /* Filled by adi_sense_1000_AssembleLutData() */
 };
-ADI_SENSE_1000_LUT_1D_NES bridge_4wire_1_def_l2_range1_data = {
+
+ADI_SENSE_1000_LUT_1D_NES bridge_4wire_1_def_l2_range1_data = 
+{
     .nElements = 2,
-    .lut = {
+    .lut = 
+    {
         -3300.0f, /* x(min) */
         +3300.0f, /* x(max) */
-        -3.3f,    /* y(min) */
-        +3.3f,    /* y(max) */
+        -3300.0f,    /* y(min) */
+        +3300.0f,    /* y(max) */
     },
 };
 
@@ -40,13 +44,15 @@
  * The following variables can be passed as parameters to
  * adi_sense_1000_AssembleLutData()
  */
-ADI_SENSE_1000_LUT_DESCRIPTOR *sample_lut_desc_list[] = {
+ADI_SENSE_1000_LUT_DESCRIPTOR *sample_lut_desc_list[] = 
+{
 
     &bridge_4wire_1_def_l2_range1_desc,
     
 };
 
-ADI_SENSE_1000_LUT_TABLE_DATA *sample_lut_data_list[] = {
+ADI_SENSE_1000_LUT_TABLE_DATA *sample_lut_data_list[] = 
+{
     
     (ADI_SENSE_1000_LUT_TABLE_DATA *) &bridge_4wire_1_def_l2_range1_data,