]> git.parisson.com Git - cnaq.git/commitdiff
* Fix wrong channel detect
authoryomguy <yomguy@5fc3e0e6-29bc-4d03-b52b-c088cb822bde>
Tue, 15 Apr 2008 15:23:41 +0000 (15:23 +0000)
committeryomguy <yomguy@5fc3e0e6-29bc-4d03-b52b-c088cb822bde>
Tue, 15 Apr 2008 15:23:41 +0000 (15:23 +0000)
git-svn-id: http://svn.parisson.org/svn/CNAQ/trunk@186 5fc3e0e6-29bc-4d03-b52b-c088cb822bde

tools/get_channels_out.m
tools/save_mes.m

index de735ce32330324063a600c9c525f6028cfe938c..fa077261fd88cd5932a588c15bb407b1fb6682a1 100644 (file)
@@ -1,14 +1,14 @@
 function channels_out = get_channels_out(ch_id)
 
-    if ch_ind == 1
+    if ch_id == 1
        channels_out  = [1];
-    elseif ch_ind == 2
+    elseif ch_id == 2
        channels_out = [1 2];
-    elseif ch_ind == 3
+    elseif ch_id == 3
        channels_out = [1 2 3];
-    elseif ch_ind == 4
+    elseif ch_id == 4
        channels_out = [1 2 3 4];
-    elseif ch_ind == 5
+    elseif ch_id == 5
        channels_out = [1 2 3 4 5 6 7 8];
     end
 
index 3ae896ec67efa2da5d75f39b2b096230b6c64af0..5923c59289a2f3966a202d5e01a6e24dfff168fa 100644 (file)
@@ -18,9 +18,11 @@ function save_mes(handles)
     f_min = str2double(get(handles.f_gen_min,'String'));
     f_max = str2double(get(handles.f_gen_max,'String'));
     time = get(handles.time_gen,'Value');
-    channels_in = get_channels_in(handles);
+    ch_in_id = get(handles.channels_in,'Value');
+    channels_in = get_channels_in(ch_in_id);
+    ch_out_id = get(handles.channels_out,'Value');
+    channels_out = get_channels_out(ch_out_id);
     gain_in = get(handles.gain_in,'Value');
-    channels_out = get_channels_out(handles);
     gain_out = get(handles.gain_out,'Value');
     
     % Save it