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.
Fork of Sean_AdiSense1000_V21 by
Diff: smartcushion_adisense_config.c
- Revision:
- 36:4aded4b4f060
- Parent:
- 35:853be4d80ff3
diff -r 853be4d80ff3 -r 4aded4b4f060 smartcushion_adisense_config.c --- a/smartcushion_adisense_config.c Thu Sep 27 12:14:22 2018 +0000 +++ b/smartcushion_adisense_config.c Thu Oct 25 08:59:30 2018 +0000 @@ -32,7 +32,7 @@ .disablePublishing = false, .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, .measurementsPerCycle = 1, - .extraSettlingTime = 0.0000, + .extraSettlingTime = 1000, .measurementUnit = ADI_SENSE_1000_MEASUREMENT_UNIT_CELSIUS, .adcChannelConfig = { .sensor = ADI_SENSE_1000_ADC_SENSOR_RTD_2WIRE_PT100_DEF_L1, @@ -42,10 +42,10 @@ .diodeRatio = ADI_SENSE_1000_ADC_EXC_CURRENT_IOUT_DIODE_DEFAULT //.swapOption = ADI_SENSE_1000_ADC_EXC_CURRENT_SWAP_NONE, }, .filter = { - .type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, - .fs = 0, - //.type = ADI_SENSE_1000_ADC_FILTER_SINC4, - //.fs = 1920, + //.type = ADI_SENSE_1000_ADC_FILTER_FIR_25SPS, +// .fs = 0, + .type = ADI_SENSE_1000_ADC_FILTER_SINC4, + .fs = 1920, }, .reference = { .type = ADI_SENSE_1000_ADC_REFERENCE_RESISTOR_INTERNAL_1, @@ -60,6 +60,7 @@ .disablePublishing = false, .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, .measurementsPerCycle = 1, + .offsetAdjustment = -1, .extraSettlingTime = 20000, .adcChannelConfig = { @@ -108,6 +109,7 @@ .disablePublishing = false, .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, .measurementsPerCycle = 1, + .offsetAdjustment = -0.7, .extraSettlingTime = 20000, .adcChannelConfig = { @@ -168,29 +170,26 @@ .disablePublishing = false, .compensationChannel = ADI_SENSE_1000_CHANNEL_ID_NONE, .measurementsPerCycle = 1, - .extraSettlingTime = 100, - .offsetAdjustment = +0.07, + .extraSettlingTime = 10000, + .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_DEF_L1, - .configurationCommand = { - .command = { 0x0A, 0x2C, 0x83 }, /* +/-8G range 0x03, default 0x83 for +/-2G */ - .commandLength = 3, - }, }, }, [ADI_SENSE_1000_CHANNEL_ID_SPI_1] = { /* Accelerometer Y-Axis (virtual channel) */ .enableChannel = true, - .offsetAdjustment = 0, + .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_DEF_L1, + }, }, [ADI_SENSE_1000_CHANNEL_ID_SPI_2] = { @@ -201,6 +200,9 @@ /* Optional threshold limits applied to the processed measurement results */ .lowThreshold = -2, .highThreshold = 2, + .spiChannelConfig = { + .sensor = ADI_SENSE_1000_SPI_SENSOR_ACCELEROMETER_A_DEF_L1, + }, },