diff --git a/tsg_io/readAsciiTsg.m b/tsg_io/readAsciiTsg.m index de117b7cbda5608a61c7797ab994e60ec3609def..bfe632183a188d54a52a561170219338221f2c95 100644 --- a/tsg_io/readAsciiTsg.m +++ b/tsg_io/readAsciiTsg.m @@ -166,6 +166,35 @@ automaticQC( hMainFig ); tsg.file.type = 'ASCII'; +% check if .ini file exist in data +% -------------------------------- +file_ini = fullfile(tsg.file.pathstr, strcat(tsg.file.name, '.ini')); + +% check if filename exist and should be open in read mode +% ------------------------------------------------------- +file_ini_id = fopen(file_ini, 'r'); + +if (file_ini_id ~= -1) + + % display information on command window + % -------------------------------------- + fprintf('\n...reading %s : ', file_ini); + + % Save the data in the application GUI + % ------------------------------------ + setappdata( hMainFig, 'tsg_data', tsg ); + + % read .ini file + % -------------- + readTsgIniLabview(hMainFig, file_ini_id); + + % Get the tsg struct from the application GUI + % ------------------------------------------- + tsg = getappdata( hMainFig, 'tsg_data'); + +end + + % Save the data in the application GUI % ------------------------------------ setappdata( hMainFig, 'tsg_data', tsg );