From: yomguy Date: Tue, 15 Apr 2008 15:23:41 +0000 (+0000) Subject: * Fix wrong channel detect X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=6deb497512d970f985300c2a79d2d43ab6f0d0e5;p=cnaq.git * Fix wrong channel detect git-svn-id: http://svn.parisson.org/svn/CNAQ/trunk@186 5fc3e0e6-29bc-4d03-b52b-c088cb822bde --- diff --git a/tools/get_channels_out.m b/tools/get_channels_out.m index de735ce..fa07726 100644 --- a/tools/get_channels_out.m +++ b/tools/get_channels_out.m @@ -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 diff --git a/tools/save_mes.m b/tools/save_mes.m index 3ae896e..5923c59 100644 --- a/tools/save_mes.m +++ b/tools/save_mes.m @@ -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