From 557b5b65a9f568fe4bc7f541bbeffa99c498af5a Mon Sep 17 00:00:00 2001 From: Stanca Pop Date: Mon, 14 Oct 2024 13:56:57 +0300 Subject: [PATCH] Version: Use a constructor to set Vivado version dynamically --- +adi/Version.m | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/+adi/Version.m b/+adi/Version.m index 8f17224..34e97a8 100644 --- a/+adi/Version.m +++ b/+adi/Version.m @@ -3,7 +3,6 @@ % BSP Version information properties(Constant) HDL = 'hdl_2022_r2'; - Vivado = '2023.1'; MATLAB = 'R2023b'; Release = '23.2.1'; AppName = 'Analog Devices, Inc. High-Speed Converter Toolbox'; @@ -12,13 +11,27 @@ ExamplesDir = 'hsx_examples'; HasHDL = true; end - properties(Dependent) + + properties + Vivado + end + + properties(Dependent) VivadoShort end - - methods + +methods + % Set Vivado version dynamically + function obj = Version(vivado_version) + if nargin > 0 + obj.Vivado = vivado_version; % Set Vivado based on input + else + obj.Vivado = '2023.1'; % Default value + end + end + function value = get.VivadoShort(obj) - value = obj.Vivado(1:6); + value = obj.Vivado(1:6); end end end