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

[DEF,P_PIR,fe]=lecture_param_pir1(MOG,DEFi,P_PIRi);
function [DEF,P_PIR,fe]=lecture_param_pir1(MOG,DEFi,P_PIRi);

DEF=DEFi;
P_PIR=P_PIRi;
synchro=get(MOG(1,15),'Value');
DEF(4)=synchro;
sk=get(MOG(1,1),'string');
P_PIR(1)=str2num(sk);
sti=get(MOG(1,3),'string');
P_PIR(2)=str2num(sti);
std=get(MOG(1,5),'string');
P_PIR(3)=str2num(std);
skd=get(MOG(1,7),'string');
P_PIR(4)=str2num(skd);
sfe=get(MOG(1,9),'string');
fe=str2num(sfe);
te=1/fe;
DEF(1)=te;
pve=get(MOG(1,10),'Value');
pvs=get(MOG(1,11),'Value');
pe=get(MOG(1,12),'Value');
pec=get(MOG(1,13),'Value');
courbes=pve+2*pvs+2^2*pe+2^3*pec;
DEF(7)=courbes;
sd=get(MOG(1,14),'string');
duree=str2num(sd);
DEF(2)=duree;
N=round(duree/te);
DEF(3)=N;
if synchro
    slevel=get(MOG(1,16),'string');
    DEF(5)=str2num(slevel);
    ssens=get(MOG(1,17),'string');
    DEF(6)=str2num(ssens);
else
    DEF(5)=0;
    DEF(6)=0;
end;
if isinf(P_PIR(2))
    P_PIR(5)=0;
else
    P_PIR(5)=DEF(1)/P_PIR(2);
end;
n_ret=round(P_PIR(3)/DEF(1));
P_PIR(6)=n_ret;
P_PIR(7:end)=zeros(1,5000);
P_PIR(7)=1;
P_PIR(7+n_ret)=-1;

Contact us