From c9aafaada2130fd50506c08464ae1d34ddb1ced2 Mon Sep 17 00:00:00 2001
From: galperti <cristian.galperti@epfl.ch>
Date: Mon, 22 Feb 2021 15:27:10 +0100
Subject: [PATCH] node 07 adc from crpprt07 ok in sim

---
 code/classes/SCDclass_taskmdsloadprevADC.m | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/code/classes/SCDclass_taskmdsloadprevADC.m b/code/classes/SCDclass_taskmdsloadprevADC.m
index 8faff58..0341a36 100644
--- a/code/classes/SCDclass_taskmdsloadprevADC.m
+++ b/code/classes/SCDclass_taskmdsloadprevADC.m
@@ -238,7 +238,7 @@ classdef SCDclass_taskmdsloadprevADC < SCDclass_task
             d_time = double(mdsvalueraw(['\top.' mdsnodename '.params:d_time']))*1.0e-6;
             timebase = timebase(1:samppck:end); % TODO: is this safe against lost cycles ?
             %timebase = round(timebase.*1/d_time)*d_time-d_time/2;
-            %timebase = round(timebase.*1/d_time)*d_time-d_time/100;
+            timebase = round(timebase.*1/d_time)*d_time-d_time/100;
             %timebase = timebase + d_time; % this fits perfectly sim/rt data on 68072
             %T.Time=timebase;
             %T.Data=zeros(numel(timebase),nch);
@@ -255,9 +255,11 @@ classdef SCDclass_taskmdsloadprevADC < SCDclass_task
                 
                 data=mdsvalueraw(channelstr);
                 if isnumeric(data)
-                  datamatrix=reshape(int16(data),[numel(timebase),samppck]);
+                  datamatrix=reshape(int16(data),[samppck,numel(timebase)])';
+                  %datamatrix=reshape(int16(data),[samppck,numel(timebase)]);                
                 else
                   datamatrix=int16(zeros(numel(timebase),samppck));
+                  %datamatrix=int16(zeros(samppck,numel(timebase)));
                 end
                 T.Data=datamatrix;
                 
-- 
GitLab