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]=synchro(MOGi,DEFi)
function [MOG,DEF]=synchro(MOGi,DEFi)


MOG=MOGi;
DEF=DEFi;
n=get(MOG(1,3),'value');
if n==3
    DEF(5)=1;
    txt_niveau=uicontrol(MOG(1,6),'style','text','unit','normalized',...
		            'position',[0.55,0.6,0.1,0.05],'backgroundcolor','w',...
	                'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold','string','Niveau (V)');
    if MOG(1,4)~=0
        s=get(MOG(1,4),'string');
    else
        s='0';
    end;
    MOG(1,4)=uicontrol(MOG(1,6),'style','edit','unit','normalized',...
                    'position',[0.7,0.6,0.05,0.05],...
                    'backgroundcolor','y','string',s,'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold'); 
     txt_sens=uicontrol(MOG(1,6),'style','text','unit','normalized',...
		            'position',[0.55,0.5,0.1,0.05],'backgroundcolor','w',...
	                'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold','string','Sens (+1 ou -1)');
    if MOG(1,5)~=0
        s=get(MOG(1,5),'string');
    else
        s='+1';
    end;
    MOG(1,5)=uicontrol(MOG(1,6),'style','edit','unit','normalized',...
                    'position',[0.7,0.5,0.05,0.05],...
                    'backgroundcolor','y','string',s,'foregroundcolor','b','fontunits','normalized','fontsize',0.5,'fontweight','bold'); 
else
    DEF(5)=0;
    if MOG(1,4)~=0
        txt_niveau=uicontrol(MOG(1,6),'style','text','unit','normalized',...
		            'position',[0.55,0.6,0.1,0.05],'backgroundcolor','w',...
	                'foregroundcolor','w','fontunits','normalized','fontsize',0.5,'fontweight','bold','string','Niveau (V)');
        delete(MOG(1,4))
        txt_sens=uicontrol(MOG(1,6),'style','text','unit','normalized',...
		            'position',[0.55,0.5,0.1,0.05],'backgroundcolor','w',...
	                'foregroundcolor','w','fontunits','normalized','fontsize',0.5,'fontweight','bold','string','Sens (+1 ou -1)');
        delete(MOG(1,5))
        MOG(1,4)=0;
        MOG(1,5)=0;
    end;
end;

Contact us