Ignore:
Timestamp:
Jun 3, 2016, 9:14:33 PM (8 years ago)
Author:
sommeria
Message:

fix modified in civ series

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/extract_rdvision.m

    r939 r949  
    494494uid_Dtk=find(t,'ImaDoc/Camera/BurstTiming/Dtk');
    495495if ~isempty(uid_Dtk)
    496 uid_content_Dtk=get(t,uid_Dtk,'contents');
    497 Dtk=str2num(get(t,uid_content_Dtk,'value'));
    498 uid_content_NbDtk=get(t,uid_NbDtk,'contents');
    499 NbDtk=str2num(get(t,uid_content_NbDtk,'value'));
    500 Dtk_stamp=(timestamp(end-NbDti,1)-timestamp(1,1))/NbDtk;
    501 if abs(Dtk_stamp-Dtk)>Dtk/1000
    502     disp([msg 'Dtk from xml file corrected by ' num2str(Dtk_stamp-Dtk)]);
    503 else
    504     disp('Dtk OK')
    505 end
    506 t=set(t,uid_content_Dtk,'value',num2str(Dtk_stamp));
     496    uid_content_Dtk=get(t,uid_Dtk,'contents');
     497    Dtk=str2num(get(t,uid_content_Dtk,'value'));
     498    uid_content_NbDtk=get(t,uid_NbDtk,'contents');
     499    NbDtk=str2num(get(t,uid_content_NbDtk,'value'));
     500    Dtk_stamp=(timestamp(end-NbDti,1)-timestamp(1,1))/NbDtk;
     501    if abs(Dtk_stamp-Dtk)>Dtk/1000
     502        disp(['Dtk from xml file corrected by ' num2str(Dtk_stamp-Dtk)]);
     503    else
     504        disp('Dtk OK')
     505    end
     506    t=set(t,uid_content_Dtk,'value',num2str(Dtk_stamp));
    507507end
    508508
    509509save(t,newxml)
    510        [success,msg] = fileattrib(newxml,'+w','g');% allow writing access for the group of users 
    511         if success==0
    512             disp({['warning: unable to set group write access to ' newxml ':']; msg});%error message for directory creation
    513         end
    514 
    515 
    516 
     510[success,errormsg] = fileattrib(newxml,'+w','g');% allow writing access for the group of users
     511if success==0
     512    disp({['warning: unable to set group write access to ' newxml ':']; errormsg});%error message for directory creation
     513    msg=erromsg;
     514end
     515
     516
     517
Note: See TracChangeset for help on using the changeset viewer.