Skip to content

Commit

Permalink
Merge pull request #6 from analogdevicesinc/R2020a
Browse files Browse the repository at this point in the history
R2020a
  • Loading branch information
tfcollins authored Feb 4, 2021
2 parents d962a6b + 7ce8c68 commit 93f28e5
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 13 deletions.
16 changes: 13 additions & 3 deletions +adi/CN0540Base.m
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion +adi/Contents.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% Analog Devices, Inc. Sensor Toolbox
% Version 19.2.1 (R2019b)
% Version 20.1.1 (R2020a)
%
% ==== Table of Contents (TOC) ====
%
Expand Down
2 changes: 1 addition & 1 deletion CI/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SHELL := /bin/bash
MLFLAGS := -nodisplay -nodesktop -nosplash

ifeq ($(MLRELEASE),)
MLRELEASE := R2019a
MLRELEASE := R2020a
endif

ifeq ($(OS),Windows_NT)
Expand Down
2 changes: 1 addition & 1 deletion CI/scripts/genTlbx.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ node {
if (env.BRANCH_NAME == 'master') {
stage('Deploy Production') {
unstash "builtSources"
//uploadFTP('SensorToolbox','*.mltbx')
uploadFTP('SensorToolbox','*.mltbx')
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | <a href="https://gitlab.com/tfcollins/SensorToolbox/-/jobs/artifacts/master/download?job=deploy"><img src="https://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png" data-canonical-src="https://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png" height="40" /></a>|
| MATLAB Release | Installer Package |
|:--------------:|:-------------------:|
| R2020a | <a href="http://swdownloads.analog.com/cse/toolboxes/sensor/master/AnalogDevicesSensorToolbox_v20.1.1.mltbx"><img src="https://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png" data-canonical-src="https://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png" height="40" /></a>|

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

Expand Down
2 changes: 1 addition & 1 deletion info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- Supply the following six elements in the order specified -->
<!-- (Required) Release of MATLAB. Not currently used but required -->
<!-- to parse the file -->
<matlabrelease>R2019b</matlabrelease>
<matlabrelease>R2020a</matlabrelease>
<!-- (Required) Title of toolbox. Appears in the Contents pane -->
<name>Analog Devices, Inc. Sensor Toolbox</name>
<!-- (Required) Label for the toolbox. pick one: -->
Expand Down

0 comments on commit 93f28e5

Please sign in to comment.