Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 28:8a7a908a8fdb, committed 2019-10-03
- Comitter:
- Vkadaba
- Date:
- Thu Oct 03 05:55:23 2019 +0000
- Parent:
- 27:4c8d8ee6fcbd
- Child:
- 29:713c24b07795
- Commit message:
- Code clean up and config files updated
Changed in this revision
--- a/main.cpp Thu Oct 03 05:31:14 2019 +0000 +++ b/main.cpp Thu Oct 03 05:55:23 2019 +0000 @@ -52,7 +52,6 @@ extern ADMW_CONFIG sensor2_typeT_cjc0_config; extern ADMW_CONFIG sensor3_typeJ_cjc0_config; extern ADMW_CONFIG i2c0_sensirionSHT3X_config; -extern ADMW_CONFIG spi0_adiAdxl362_config; extern ADMW_CONFIG multichannel_continuous_config; extern ADMW_CONFIG multichannel_multicycle_config; extern ADMW_CONFIG multichannel_singlecycle_config;
--- a/sensor2_bridge_4w_load_cell_config.c Thu Oct 03 05:31:14 2019 +0000
+++ b/sensor2_bridge_4w_load_cell_config.c Thu Oct 03 05:55:23 2019 +0000
@@ -50,10 +50,9 @@
.powerMode = ADMW1001_POWER_MODE_ACTIVE,
},
.measurement = {
- .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE,
- .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE,
- .externalRef1Value = 1000.123,
- .vBiasEnable = true,
+ .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS,
+ .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, // FIX: Temporarily all values from json are hardcoded to this one in the Contracts.FileGenerator - > file translations!!
+ .cycleInterval = 0,
},
.diagnostics = {
.disableGlobalDiag = true,
@@ -61,32 +60,32 @@
.osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
},
.channels = {
- [ADMW1001_CH_ID_ANLG_2_UNIVERSAL] = {
+ [ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = {
.enableChannel = true,
- .measurementsPerCycle = 10,
- .extraSettlingTime = 0.00050000002374872565,
.disablePublishing = false,
-
+ .compensationChannel = ADMW1001_CH_ID_NONE,
+ .lutSelect = ADMW1001_LUT_DEFAULT,
.measurementUnit = ADMW1001_MEASUREMENT_UNIT_UNSPECIFIED,
.lowThreshold = 0,
- .highThreshold = 200,
+ .highThreshold = 45359.2,
+ .offsetAdjustment = 0.0,
+ .gainAdjustment = 0.0,
+ .sensorParameter = 0.0,
+ .measurementsPerCycle = 1,
+ .cycleSkipCount = 0,
+ .extraSettlingTime = 4499.99986449257,
+ .priority = 0,
.adcChannelConfig = {
.sensor = ADMW1001_ADC_SENSOR_BRIDGE_4WIRE_1,
- .gain = ADMW1001_ADC_GAIN_8X,
- .current = {
- .excitationState = ADMW1001_ADC_EXC_STATE_OFF,
- .outputLevel = ADMW1001_ADC_NO_EXTERNAL_EXC_CURRENT,
- },
+ .gain = ADMW1001_ADC_GAIN_32X,
.filter = {
.type = ADMW1001_ADC_FILTER_SINC3,
- .sf = 125,
+ .sf = ADMW1001_SF_8P24HZ,
.chopMode = ADMW1001_CHOP_MD_SW,
- .notch1p2 = false,
- .groundSwitch = ADMW1001_ADC_GND_SW_CLOSED,
+ .notch1p2 = true,
+ .groundSwitch = ADMW1001_ADC_GND_SW_CLOSED
},
- .reference = {
- ADMW1001_ADC_REFERENCE_VOLTAGE_AVDD,
- },
+ .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_AVDD,
},
},
},
--- a/sensor2_typeT_cjc0_config.c Thu Oct 03 05:31:14 2019 +0000
+++ b/sensor2_typeT_cjc0_config.c Thu Oct 03 05:55:23 2019 +0000
@@ -49,32 +49,78 @@
.powerMode = ADMW1001_POWER_MODE_ACTIVE,
},
.measurement = {
- .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE,
- .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE,
+ .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS,
+ .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, // FIX: Temporarily all values from json are hardcoded to this one in the Contracts.FileGenerator - > file translations!!
+ .cycleInterval = 0,
+ },
+ .diagnostics = {
+ .disableGlobalDiag = true,
+ .disableMeasurementDiag = true,
+ .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
},
.channels = {
[ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = {
.enableChannel = true,
.disablePublishing = false,
.compensationChannel = ADMW1001_CH_ID_NONE,
+ .lutSelect = ADMW1001_LUT_DEFAULT,
.measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS,
- .measurementsPerCycle = 10,
+ .lowThreshold = -50,
+ .highThreshold = 250,
+ .offsetAdjustment = 0.0,
+ .gainAdjustment = 0.0,
+ .sensorParameter = 0.0,
+ .measurementsPerCycle = 1,
+ .cycleSkipCount = 0,
.extraSettlingTime = 0,
+ .priority = 0,
.adcChannelConfig = {
.sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100,
- .gain = ADMW1001_ADC_GAIN_8X,
+ .gain = ADMW1001_ADC_GAIN_1X,
.current = {
+ .excitationState= ADMW1001_ADC_EXC_STATE_ALWAYS_ON,
.outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA,
+ .diodeRatio = 0,
},
+ .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN,
.filter = {
.type = ADMW1001_ADC_FILTER_SINC3,
+ .sf = ADMW1001_SF_8P24HZ,
+ .chopMode = ADMW1001_CHOP_MD_SW,
+ .notch1p2 = true,
+ .groundSwitch = ADMW1001_ADC_GND_SW_OPEN
},
- .reference = {
- ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL,
+ .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL,
+ },
+ },
+ [ADMW1001_CH_ID_ANLG_1_DIFFERENTIAL] = {
+ .enableChannel = true,
+ .disablePublishing = false,
+ .compensationChannel = ADMW1001_CH_ID_ANLG_1_UNIVERSAL,
+ .lutSelect = ADMW1001_LUT_DEFAULT,
+ .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS,
+ .lowThreshold = -50,
+ .highThreshold = 250,
+ .offsetAdjustment = 0.0,
+ .gainAdjustment = 0.0,
+ .sensorParameter = 0.0,
+ .measurementsPerCycle = 1,
+ .cycleSkipCount = 0,
+ .extraSettlingTime = 4499.99986449257,
+ .priority = 0,
+ .adcChannelConfig = {
+ .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_T,
+ .gain = ADMW1001_ADC_GAIN_8X,
+ .filter = {
+ .type = ADMW1001_ADC_FILTER_SINC3,
+ .sf = ADMW1001_SF_8P24HZ,
+ .chopMode = ADMW1001_CHOP_MD_SW,
+ .notch1p2 = true,
+ .groundSwitch = ADMW1001_ADC_GND_SW_OPEN
},
+ .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL,
},
},
},
},
};
-
--- a/sensor3_typeJ_cjc0_config.c Thu Oct 03 05:31:14 2019 +0000
+++ b/sensor3_typeJ_cjc0_config.c Thu Oct 03 05:55:23 2019 +0000
@@ -52,32 +52,78 @@
.powerMode = ADMW1001_POWER_MODE_ACTIVE,
},
.measurement = {
- .operatingMode = ADMW1001_OPERATING_MODE_SINGLECYCLE,
- .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE,
+ .operatingMode = ADMW1001_OPERATING_MODE_CONTINUOUS,
+ .dataReadyMode = ADMW1001_DATAREADY_PER_CYCLE, // FIX: Temporarily all values from json are hardcoded to this one in the Contracts.FileGenerator - > file translations!!
+ .cycleInterval = 0,
+ },
+ .diagnostics = {
+ .disableGlobalDiag = true,
+ .disableMeasurementDiag = true,
+ .osdFrequency = ADMW1001_OPEN_SENSOR_DIAGNOSTICS_DISABLED,
},
.channels = {
[ADMW1001_CH_ID_ANLG_1_UNIVERSAL] = {
.enableChannel = true,
.disablePublishing = false,
.compensationChannel = ADMW1001_CH_ID_NONE,
+ .lutSelect = ADMW1001_LUT_DEFAULT,
.measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS,
- .measurementsPerCycle = 10,
+ .lowThreshold = -50,
+ .highThreshold = 250,
+ .offsetAdjustment = 0.0,
+ .gainAdjustment = 0.0,
+ .sensorParameter = 0.0,
+ .measurementsPerCycle = 1,
+ .cycleSkipCount = 0,
.extraSettlingTime = 0,
+ .priority = 0,
.adcChannelConfig = {
.sensor = ADMW1001_ADC_SENSOR_RTD_2WIRE_PT100,
- .gain = ADMW1001_ADC_GAIN_8X,
+ .gain = ADMW1001_ADC_GAIN_1X,
.current = {
+ .excitationState= ADMW1001_ADC_EXC_STATE_ALWAYS_ON,
.outputLevel = ADMW1001_ADC_EXC_CURRENT_250uA,
+ .diodeRatio = 0,
},
+ .rtdCurve = ADMW1001_ADC_RTD_CURVE_EUROPEAN,
.filter = {
.type = ADMW1001_ADC_FILTER_SINC3,
+ .sf = ADMW1001_SF_8P24HZ,
+ .chopMode = ADMW1001_CHOP_MD_SW,
+ .notch1p2 = true,
+ .groundSwitch = ADMW1001_ADC_GND_SW_OPEN
},
- .reference = {
- ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL,
+ .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL,
+ },
+ },
+ [ADMW1001_CH_ID_ANLG_1_DIFFERENTIAL] = {
+ .enableChannel = true,
+ .disablePublishing = false,
+ .compensationChannel = ADMW1001_CH_ID_ANLG_1_UNIVERSAL,
+ .lutSelect = ADMW1001_LUT_DEFAULT,
+ .measurementUnit = ADMW1001_MEASUREMENT_UNIT_CELSIUS,
+ .lowThreshold = -50,
+ .highThreshold = 250,
+ .offsetAdjustment = 0.0,
+ .gainAdjustment = 0.0,
+ .sensorParameter = 0.0,
+ .measurementsPerCycle = 1,
+ .cycleSkipCount = 0,
+ .extraSettlingTime = 4499.99986449257,
+ .priority = 0,
+ .adcChannelConfig = {
+ .sensor = ADMW1001_ADC_SENSOR_THERMOCOUPLE_J,
+ .gain = ADMW1001_ADC_GAIN_8X,
+ .filter = {
+ .type = ADMW1001_ADC_FILTER_SINC3,
+ .sf = ADMW1001_SF_8P24HZ,
+ .chopMode = ADMW1001_CHOP_MD_SW,
+ .notch1p2 = true,
+ .groundSwitch = ADMW1001_ADC_GND_SW_OPEN
},
+ .reference = ADMW1001_ADC_REFERENCE_VOLTAGE_INTERNAL,
},
},
},
},
};
-