From 821c4aad7365049c49c45e5cc4875424f0b3e92b Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Thu, 4 Feb 2021 11:37:57 -0800 Subject: [PATCH 1/3] Upgrade to R2020a Signed-off-by: Travis F. Collins --- +adi/Contents.m | 2 +- CI/scripts/Makefile | 2 +- CI/scripts/genTlbx.m | 2 +- README.md | 10 +++++----- info.xml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/+adi/Contents.m b/+adi/Contents.m index 8a7dafb..b142f2e 100644 --- a/+adi/Contents.m +++ b/+adi/Contents.m @@ -1,5 +1,5 @@ % Analog Devices, Inc. Sensor Toolbox -% Version 19.2.1 (R2019b) +% Version 20.1.1 (R2020a) % % ==== Table of Contents (TOC) ==== % diff --git a/CI/scripts/Makefile b/CI/scripts/Makefile index c6226f4..b5b7e50 100644 --- a/CI/scripts/Makefile +++ b/CI/scripts/Makefile @@ -8,7 +8,7 @@ SHELL := /bin/bash MLFLAGS := -nodisplay -nodesktop -nosplash ifeq ($(MLRELEASE),) -MLRELEASE := R2019a +MLRELEASE := R2020a endif ifeq ($(OS),Windows_NT) diff --git a/CI/scripts/genTlbx.m b/CI/scripts/genTlbx.m index 615a3a2..487b85d 100644 --- a/CI/scripts/genTlbx.m +++ b/CI/scripts/genTlbx.m @@ -4,7 +4,7 @@ function genTlbx(examples) examples = 0; end -version = '19.2.1'; +version = '20.1.1'; ml = ver('MATLAB'); ml = ml.Release(2:end-1); diff --git a/README.md b/README.md index 8c4a5d9..5b63856 100644 --- a/README.md +++ b/README.md @@ -6,20 +6,20 @@ License : [![License](https://img.shields.io/badge/license-LGPL2-blue.svg)](http Latest Release : [![GitHub release](https://img.shields.io/github/release/analogdevicesinc/SensorToolbox.svg)](https://github.com/analogdevicesinc/SensorToolbox/releases/latest) Downloads : [![Github All Releases](https://img.shields.io/github/downloads/analogdevicesinc/SensorToolbox/total.svg)](https://github.com/analogdevicesinc/SensorToolbox/releases/latest) -As with many open source packages, we use [GitHub](https://github.com/analogdevicesinc/SensorToolbox) to do develop and maintain the source, and [GitLab](https://GitLab.com/) for continuous integration. +As with many open source packages, we use [GitHub](https://github.com/analogdevicesinc/SensorToolbox) to do develop and maintain the source, and [Jenkins](https://jenkins.io/) for continuous integration. - If you want to just use SensorToolbox, we suggest using the [latest release](https://github.com/analogdevicesinc/SensorToolbox/releases/latest). - If you think you have found a bug in the release, or need a feature which isn't in the release, try the latest **untested** builds from the master branch. -| GitHub master status | MATLAB Release | Installer Package | -|:---------------------:|:-------:|:-------------------:| -| [![pipeline status](https://gitlab.com/tfcollins/SensorToolbox/badges/master/pipeline.svg)](https://gitlab.com/tfcollins/SensorToolbox/commits/master) | R2019b | | +| MATLAB Release | Installer Package | +|:--------------:|:-------------------:| +| R2020a | | If you use it, and like it - please let us know. If you use it, and hate it - please let us know that too. ## Supported Tools and Releases We provide support across certain releases of MATLAB. This does not mean older releases will not work but they are not maintained. Currently supported tools are: -- MATLAB R2019b +- MATLAB R2020a ## Support and Documentation diff --git a/info.xml b/info.xml index 6aa0aca..5f154db 100644 --- a/info.xml +++ b/info.xml @@ -8,7 +8,7 @@ - R2019b + R2020a Analog Devices, Inc. Sensor Toolbox From be94dfa86a6aa0bc34c8bcd3fadef10772a432e5 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Thu, 4 Feb 2021 12:16:51 -0800 Subject: [PATCH 2/3] CN0540 state cleanup and cal limiter Signed-off-by: Travis F. Collins --- +adi/CN0540Base.m | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/+adi/CN0540Base.m b/+adi/CN0540Base.m index 8455a8c..ef11059 100644 --- a/+adi/CN0540Base.m +++ b/+adi/CN0540Base.m @@ -2,7 +2,7 @@ & matlabshared.libiio.base & adi.common.Attribute ... & adi.common.Sensor %Base class for all CN0540 sensors classes - properties + properties (Nontunable) %SampleRate Sample Rate % Baseband sampling rate in Hz, specified as a scalar % in samples per second. Options are: @@ -11,7 +11,7 @@ SampleRate = '256000'; end - properties + properties (Nontunable) %ShiftVoltageMV Shift Voltage MV % DAC shift voltage use to bias ADC input. This can only be set % at startup and will become read-only @@ -26,10 +26,13 @@ FDAMode = 'FullPower'; end - properties (Logical) + properties (Logical, Nontunable) %EnableCalibration Enable Calibration % Calibrate sensor voltage DC bias at startup EnableCalibration = false; + end + + properties (Logical) %MonitorPowerup Monitor Powerup % Monitor ADC powerup status MonitorPowerup = true; @@ -178,10 +181,17 @@ function calibrate(obj) adc_scale = obj.getAttributeDouble('voltage0', 'scale', false); dac_scale = obj.getAttributeDouble('voltage0', 'scale', true, obj.ltc2606); + % Write low value first + dvoltage = 2000; + obj.setAttributeLongLong('voltage0', 'raw', int64(dvoltage), true, 0, obj.ltc2606); + for t = 1:20 araw = obj.getAttributeDouble('voltage0', 'raw', false); draw = obj.getAttributeDouble('voltage0', 'raw', true, obj.ltc2606); dvoltage = (draw * dac_scale - araw*adc_scale)/dac_scale; + if dvoltage > 65535 + dvoltage = 65535; + end disp(araw*adc_scale) obj.setAttributeLongLong('voltage0', 'raw', int64(dvoltage), true, 0, obj.ltc2606); pause(0.01) From 7ce8c68d91e0d7daf4809941c7c87f85b35afb25 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Thu, 4 Feb 2021 14:15:44 -0800 Subject: [PATCH 3/3] Enable FTP upload on master Signed-off-by: Travis F. Collins --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 703bc3e..9c16cf3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,7 +45,7 @@ node { if (env.BRANCH_NAME == 'master') { stage('Deploy Production') { unstash "builtSources" - //uploadFTP('SensorToolbox','*.mltbx') + uploadFTP('SensorToolbox','*.mltbx') } } }