Code covered by the BSD License  

Highlights from
Logiciels temps réel

Logiciels temps réel

by

 

Real-time software concerning the domains of the signal processing, feedback and regulation

[MOG,DEF,P_PIR]=test_param_pir1(MOGi,DEFi,P_PIRi)
function [MOG,DEF,P_PIR]=test_param_pir1(MOGi,DEFi,P_PIRi)

MOG=MOGi;
DEF=DEFi;
P_PIR=P_PIRi;
synchro=get(MOG(1,15),'Value');
if synchro
    sniv='Niveau (V)';           
    MOG(2,16)=uicontrol(gcf,'style','text',...
        'unit','normalized',...
		'position',[0.6 0.27 0.25 0.05],...
        'backgroundcolor','y',...
	    'foregroundcolor','b','string',sniv,...
        'fontunits','normalized','fontsize',0.5,'fontweight','bold');
    if MOG(1,16)==0
        slevel='0.5';  
    else
        slevel=get(MOG(1,16),'string');
    end;
    MOG(1,16)=uicontrol(gcf,'style','edit',...
        'unit','normalized',...
		'position',[0.87 0.27 0.1 0.05],...
        'backgroundcolor','y',...
	    'foregroundcolor','b',...
		'string',slevel,'fontunits','normalized','fontsize',0.5,...
        'fontweight','bold',...
		'callback','slevel=get(MOG(1,16),''string'');niveau=str2num(slevel);DEF(5)=niveau;');
    ss='sens (+1 ; -1 )';           
    MOG(2,17)=uicontrol(gcf,'style','text',...
        'unit','normalized',...
		'position',[0.6 0.2 0.25 0.05],...
        'backgroundcolor','y',...
	    'foregroundcolor','b','string',ss,...
        'fontunits','normalized','fontsize',0.5,'fontweight','bold');
    if MOG(1,17)==0
        ssens='+1'; 
    else
        ssens=get(MOG(1,17),'string');
    end;
    MOG(1,17)=uicontrol(gcf,'style','edit',...
        'unit','normalized',...
		'position',[0.87 0.2 0.1 0.05],...
        'backgroundcolor','y',...
	    'foregroundcolor','b',...
		'string',ssens,'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
		'callback','ssens=get(MOG(1,17),''string'');sens=str2num(ssens);DEF(6)=sens;');    
    boutonok2=uicontrol(gcf,'style','push','unit','normalized',...
		'position',[0.8 0.15 0.15 0.05],...
	    'string','OK Synchro','foregroundcolor','r',...
        'fontunits','normalized','fontsize',0.5,'fontweight','bold',...
        'callback','[DEF,P_PIR,fe]=lecture_param_pir1(MOG,DEF,P_PIR);lance_correcteur_pir1');

else
    if MOG(1,16)~=0
        MOG=on_nettoie(MOG);
    end;
    [DEF,P_PIR,fe]=lecture_param_pir1(MOG,DEF,P_PIR);
    if P_PIR(6)<=5000
        lance_correcteur_pir1;
    else
        h_ret=text(0.8,0.12,'T < 5000*T_E !!!',...
            'color','r','fontunits','normalized','fontsize',18,...
            'fontweight','bold',...
            'horizontalalignment','left',...
            'verticalalignment','middle','interpreter','Tex');
        pause(1)
        delete(h_ret)
    end;
end;


Contact us