Déplacement de la commande fin() dans les scripts

This commit is contained in:
Philippe Roy 2024-01-06 10:19:56 +01:00
parent 88d0ff2600
commit 32dc889fb8
17 changed files with 143 additions and 322 deletions

View File

@ -55,15 +55,17 @@ def commandes():
voy_1(True)
tempo(0.5)
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()

View File

@ -95,14 +95,17 @@ def commandes():
tempo(0.1) # Donne du temps à communication avec le jumeau réel
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()

View File

@ -102,14 +102,17 @@ def commandes():
" rad - cabine_vitesse : " +str(round(cabine_vitesse, 3))+" mm/s - moteur_vitesse : " +str(round(mot_vitesse, 3))+
" rad/s - cabine_pas : " +str(round(cabine_pas, 3))+" mm/impulsion - moteur_pas : " +str(round(mot_pas, 3))+" rad/impulsion")
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()

View File

@ -95,14 +95,17 @@ def commandes():
tempo(0.1)
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()

View File

@ -45,15 +45,17 @@ def commandes():
while True:
pass
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
thread_cmd_start(commandes)
start(cycle)
if __name__=='stop':
thread_cmd_stop()
stop()

View File

@ -1,198 +1,66 @@
t;mot_angle;mot_vitesse;portail_x;portail_vitesse
0,168;-4,187;-12,44;-0,732;-2,176
0,337;-6,28;-12,44;-1,098;-2,176
0,505;-8,373;-12,44;-1,465;-2,176
0,673;-10,467;-12,44;-1,831;-2,176
0,841;-12,56;-12,44;-2,197;-2,176
0,858;-12,56;0,0;-2,197;0,0
0,875;-12,56;0,0;-2,197;0,0
0,891;-12,56;0,0;-2,197;0,0
0,908;-12,56;0,0;-2,197;0,0
0,925;-12,56;0,0;-2,197;0,0
0,941;-12,56;0,0;-2,197;0,0
0,958;-12,56;0,0;-2,197;0,0
0,975;-12,56;0,0;-2,197;0,0
0,991;-12,56;0,0;-2,197;0,0
1,008;-12,56;0,0;-2,197;0,0
1,025;-12,56;0,0;-2,197;0,0
1,041;-12,56;0,0;-2,197;0,0
1,058;-12,56;0,0;-2,197;0,0
1,075;-12,56;0,0;-2,197;0,0
1,091;-12,56;0,0;-2,197;0,0
1,108;-12,56;0,0;-2,197;0,0
1,125;-12,56;0,0;-2,197;0,0
1,141;-12,56;0,0;-2,197;0,0
1,158;-12,56;0,0;-2,197;0,0
1,175;-12,56;0,0;-2,197;0,0
1,191;-12,56;0,0;-2,197;0,0
1,208;-12,56;0,0;-2,197;0,0
1,225;-12,56;0,0;-2,197;0,0
1,241;-12,56;0,0;-2,197;0,0
1,258;-12,56;0,0;-2,197;0,0
1,275;-12,56;0,0;-2,197;0,0
1,291;-12,56;0,0;-2,197;0,0
1,308;-12,56;0,0;-2,197;0,0
1,325;-12,56;0,0;-2,197;0,0
1,341;-12,56;0,0;-2,197;0,0
1,358;-12,56;0,0;-2,197;0,0
1,375;-12,56;0,0;-2,197;0,0
1,391;-12,56;0,0;-2,197;0,0
1,408;-12,56;0,0;-2,197;0,0
1,425;-12,56;0,0;-2,197;0,0
1,441;-12,56;0,0;-2,197;0,0
1,458;-12,56;0,0;-2,197;0,0
1,475;-12,56;0,0;-2,197;0,0
1,491;-12,56;0,0;-2,197;0,0
1,508;-12,56;0,0;-2,197;0,0
1,525;-12,56;0,0;-2,197;0,0
1,541;-12,56;0,0;-2,197;0,0
1,558;-12,56;0,0;-2,197;0,0
1,575;-12,56;0,0;-2,197;0,0
1,591;-12,56;0,0;-2,197;0,0
1,608;-12,56;0,0;-2,197;0,0
1,625;-12,56;0,0;-2,197;0,0
1,641;-12,56;0,0;-2,197;0,0
1,658;-12,56;0,0;-2,197;0,0
1,675;-12,56;0,0;-2,197;0,0
1,691;-12,56;0,0;-2,197;0,0
1,708;-12,56;0,0;-2,197;0,0
1,725;-12,56;0,0;-2,197;0,0
1,741;-12,56;0,0;-2,197;0,0
1,758;-12,56;0,0;-2,197;0,0
1,775;-12,56;0,0;-2,197;0,0
1,791;-12,56;0,0;-2,197;0,0
1,808;-12,56;0,0;-2,197;0,0
1,825;-12,56;0,0;-2,197;0,0
1,841;-12,56;0,0;-2,197;0,0
1,858;-12,56;0,0;-2,197;0,0
1,875;-12,56;0,0;-2,197;0,0
1,891;-12,56;0,0;-2,197;0,0
1,908;-12,56;0,0;-2,197;0,0
1,925;-12,56;0,0;-2,197;0,0
1,941;-12,56;0,0;-2,197;0,0
1,958;-12,56;0,0;-2,197;0,0
1,975;-12,56;0,0;-2,197;0,0
1,991;-12,56;0,0;-2,197;0,0
2,008;-12,56;0,0;-2,197;0,0
2,025;-12,56;0,0;-2,197;0,0
2,041;-12,56;0,0;-2,197;0,0
2,058;-12,56;0,0;-2,197;0,0
2,075;-12,56;0,0;-2,197;0,0
2,091;-12,56;0,0;-2,197;0,0
2,108;-12,56;0,0;-2,197;0,0
2,125;-12,56;0,0;-2,197;0,0
2,141;-12,56;0,0;-2,197;0,0
2,158;-12,56;0,0;-2,197;0,0
2,175;-12,56;0,0;-2,197;0,0
2,191;-12,56;0,0;-2,197;0,0
2,208;-12,56;0,0;-2,197;0,0
2,225;-12,56;0,0;-2,197;0,0
2,241;-12,56;0,0;-2,197;0,0
2,258;-12,56;0,0;-2,197;0,0
2,275;-12,56;0,0;-2,197;0,0
2,291;-12,56;0,0;-2,197;0,0
2,308;-12,56;0,0;-2,197;0,0
2,325;-12,56;0,0;-2,197;0,0
2,341;-12,56;0,0;-2,197;0,0
2,358;-12,56;0,0;-2,197;0,0
2,375;-12,56;0,0;-2,197;0,0
2,391;-12,56;0,0;-2,197;0,0
2,408;-12,56;0,0;-2,197;0,0
2,425;-12,56;0,0;-2,197;0,0
2,441;-12,56;0,0;-2,197;0,0
2,458;-12,56;0,0;-2,197;0,0
2,475;-12,56;0,0;-2,197;0,0
2,491;-12,56;0,0;-2,197;0,0
2,508;-12,56;0,0;-2,197;0,0
2,525;-12,56;0,0;-2,197;0,0
2,541;-12,56;0,0;-2,197;0,0
2,558;-12,56;0,0;-2,197;0,0
2,575;-12,56;0,0;-2,197;0,0
2,591;-12,56;0,0;-2,197;0,0
2,608;-12,56;0,0;-2,197;0,0
2,625;-12,56;0,0;-2,197;0,0
2,641;-12,56;0,0;-2,197;0,0
2,658;-12,56;0,0;-2,197;0,0
2,675;-12,56;0,0;-2,197;0,0
2,691;-12,56;0,0;-2,197;0,0
2,708;-12,56;0,0;-2,197;0,0
2,725;-12,56;0,0;-2,197;0,0
2,741;-12,56;0,0;-2,197;0,0
2,758;-12,56;0,0;-2,197;0,0
2,775;-12,56;0,0;-2,197;0,0
2,791;-12,56;0,0;-2,197;0,0
2,808;-12,56;0,0;-2,197;0,0
2,825;-12,56;0,0;-2,197;0,0
2,841;-12,56;0,0;-2,197;0,0
2,858;-12,56;0,0;-2,197;0,0
2,875;-12,56;0,0;-2,197;0,0
2,891;-12,56;0,0;-2,197;0,0
2,908;-12,56;0,0;-2,197;0,0
2,925;-12,56;0,0;-2,197;0,0
2,941;-12,56;0,0;-2,197;0,0
2,958;-12,56;0,0;-2,197;0,0
2,975;-12,56;0,0;-2,197;0,0
2,991;-12,56;0,0;-2,197;0,0
3,008;-12,56;0,0;-2,197;0,0
3,025;-12,56;0,0;-2,197;0,0
3,041;-12,56;0,0;-2,197;0,0
3,058;-12,56;0,0;-2,197;0,0
3,075;-12,56;0,0;-2,197;0,0
3,091;-12,56;0,0;-2,197;0,0
3,108;-12,56;0,0;-2,197;0,0
3,125;-12,56;0,0;-2,197;0,0
3,141;-12,56;0,0;-2,197;0,0
3,158;-12,56;0,0;-2,197;0,0
3,175;-12,56;0,0;-2,197;0,0
3,191;-12,56;0,0;-2,197;0,0
3,208;-12,56;0,0;-2,197;0,0
3,225;-12,56;0,0;-2,197;0,0
3,241;-12,56;0,0;-2,197;0,0
3,258;-12,56;0,0;-2,197;0,0
3,275;-12,56;0,0;-2,197;0,0
3,291;-12,56;0,0;-2,197;0,0
3,308;-12,56;0,0;-2,197;0,0
3,325;-12,56;0,0;-2,197;0,0
3,341;-12,56;0,0;-2,197;0,0
3,358;-12,56;0,0;-2,197;0,0
3,375;-12,56;0,0;-2,197;0,0
3,391;-12,56;0,0;-2,197;0,0
3,408;-12,56;0,0;-2,197;0,0
3,425;-12,56;0,0;-2,197;0,0
3,441;-12,56;0,0;-2,197;0,0
3,458;-12,56;0,0;-2,197;0,0
3,475;-12,56;0,0;-2,197;0,0
3,491;-12,56;0,0;-2,197;0,0
3,508;-12,56;0,0;-2,197;0,0
3,525;-12,56;0,0;-2,197;0,0
3,541;-12,56;0,0;-2,197;0,0
3,558;-12,56;0,0;-2,197;0,0
3,575;-12,56;0,0;-2,197;0,0
3,591;-12,56;0,0;-2,197;0,0
3,608;-12,56;0,0;-2,197;0,0
3,625;-12,56;0,0;-2,197;0,0
3,641;-12,56;0,0;-2,197;0,0
3,658;-12,56;0,0;-2,197;0,0
3,675;-12,56;0,0;-2,197;0,0
3,691;-12,56;0,0;-2,197;0,0
3,708;-12,56;0,0;-2,197;0,0
3,725;-12,56;0,0;-2,197;0,0
3,741;-12,56;0,0;-2,197;0,0
3,758;-12,56;0,0;-2,197;0,0
3,775;-12,56;0,0;-2,197;0,0
3,791;-12,56;0,0;-2,197;0,0
3,808;-12,56;0,0;-2,197;0,0
3,825;-12,56;0,0;-2,197;0,0
3,841;-12,56;0,0;-2,197;0,0
3,858;-12,56;0,0;-2,197;0,0
3,875;-12,56;0,0;-2,197;0,0
3,891;-12,56;0,0;-2,197;0,0
3,908;-12,56;0,0;-2,197;0,0
3,925;-12,56;0,0;-2,197;0,0
3,941;-12,56;0,0;-2,197;0,0
3,958;-12,56;0,0;-2,197;0,0
3,975;-12,56;0,0;-2,197;0,0
3,991;-12,56;0,0;-2,197;0,0
4,008;-12,56;0,0;-2,197;0,0
4,025;-12,56;0,0;-2,197;0,0
4,041;0,0;0,0;0,0;0,0
t;bp_ext;bp_ext_r;bp_int;bp_int_r;fdc_o;fdc_o_r;fdc_f;fdc_f_r;mot_o;mot_f;gyr;mot_angle;mot_vitesse;portail_x;portail_vitesse;ir_emet;ir_recep;ir_recep_r
0,017;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,033;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,05;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,067;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,083;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,1;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,117;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,133;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,15;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,167;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,183;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,2;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,217;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,233;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,25;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,267;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,283;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,3;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,317;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,333;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,35;0;0;0;0;1;0;0;0;0;0;0;-12,56;0,0;-2,197;0,0;0;0;1
0,367;0;0;0;0;1;0;0;0;0;0;0;-12,56;0,0;-2,197;0,0;0;0;1
0,383;0;0;0;0;1;0;0;0;0;0;0;-12,56;0,0;-2,197;0,0;0;0;1
0,4;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,417;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,433;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,45;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,467;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,483;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,5;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,517;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,533;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,55;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,567;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,583;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,6;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,617;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,633;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,65;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,667;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,683;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,7;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,717;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,733;0;0;0;0;1;0;0;0;0;0;0;-12,56;0,0;-2,197;0,0;0;0;1
0,75;0;0;0;0;1;0;0;0;0;0;0;-12,56;0,0;-2,197;0,0;0;0;1
0,767;0;0;0;0;1;0;0;0;0;0;0;-12,56;0,0;-2,197;0,0;0;0;1
0,783;0;0;0;0;1;0;0;0;0;0;0;-12,56;0,0;-2,197;0,0;0;0;1
0,8;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,817;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,833;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,85;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,867;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,883;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,9;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,917;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,933;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,95;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,967;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
0,983;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
1,0;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
1,017;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
1,033;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
1,05;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
1,067;0;0;0;0;1;0;0;0;0;0;1;-12,56;0,0;-2,197;0,0;0;0;1
1,083;0;0;0;0;0;0;0;0;0;0;0;0,0;0,0;0,0;0,0;0;0;1

1 t bp_ext bp_ext_r bp_int bp_int_r fdc_o fdc_o_r fdc_f fdc_f_r mot_o mot_f gyr mot_angle mot_vitesse portail_x portail_vitesse ir_emet ir_recep ir_recep_r
2 0,168 0,017 0 0 0 0 1 0 0 0 0 0 1 -4,187 -12,56 -12,44 0,0 -0,732 -2,197 -2,176 0,0 0 0 1
3 0,337 0,033 0 0 0 0 1 0 0 0 0 0 1 -6,28 -12,56 -12,44 0,0 -1,098 -2,197 -2,176 0,0 0 0 1
4 0,505 0,05 0 0 0 0 1 0 0 0 0 0 1 -8,373 -12,56 -12,44 0,0 -1,465 -2,197 -2,176 0,0 0 0 1
5 0,673 0,067 0 0 0 0 1 0 0 0 0 0 1 -10,467 -12,56 -12,44 0,0 -1,831 -2,197 -2,176 0,0 0 0 1
6 0,841 0,083 0 0 0 0 1 0 0 0 0 0 1 -12,56 -12,44 0,0 -2,197 -2,176 0,0 0 0 1
7 0,858 0,1 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
8 0,875 0,117 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
9 0,891 0,133 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
10 0,908 0,15 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
11 0,925 0,167 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
12 0,941 0,183 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
13 0,958 0,2 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
14 0,975 0,217 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
15 0,991 0,233 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
16 1,008 0,25 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
17 1,025 0,267 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
18 1,041 0,283 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
19 1,058 0,3 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
20 1,075 0,317 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
21 1,091 0,333 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
22 1,108 0,35 0 0 0 0 1 0 0 0 0 0 0 -12,56 0,0 -2,197 0,0 0 0 1
23 1,125 0,367 0 0 0 0 1 0 0 0 0 0 0 -12,56 0,0 -2,197 0,0 0 0 1
24 1,141 0,383 0 0 0 0 1 0 0 0 0 0 0 -12,56 0,0 -2,197 0,0 0 0 1
25 1,158 0,4 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
26 1,175 0,417 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
27 1,191 0,433 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
28 1,208 0,45 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
29 1,225 0,467 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
30 1,241 0,483 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
31 1,258 0,5 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
32 1,275 0,517 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
33 1,291 0,533 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
34 1,308 0,55 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
35 1,325 0,567 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
36 1,341 0,583 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
37 1,358 0,6 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
38 1,375 0,617 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
39 1,391 0,633 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
40 1,408 0,65 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
41 1,425 0,667 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
42 1,441 0,683 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
43 1,458 0,7 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
44 1,475 0,717 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
45 1,491 0,733 0 0 0 0 1 0 0 0 0 0 0 -12,56 0,0 -2,197 0,0 0 0 1
46 1,508 0,75 0 0 0 0 1 0 0 0 0 0 0 -12,56 0,0 -2,197 0,0 0 0 1
47 1,525 0,767 0 0 0 0 1 0 0 0 0 0 0 -12,56 0,0 -2,197 0,0 0 0 1
48 1,541 0,783 0 0 0 0 1 0 0 0 0 0 0 -12,56 0,0 -2,197 0,0 0 0 1
49 1,558 0,8 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
50 1,575 0,817 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
51 1,591 0,833 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
52 1,608 0,85 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
53 1,625 0,867 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
54 1,641 0,883 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
55 1,658 0,9 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
56 1,675 0,917 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
57 1,691 0,933 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
58 1,708 0,95 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
59 1,725 0,967 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
60 1,741 0,983 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
61 1,758 1,0 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
62 1,775 1,017 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
63 1,791 1,033 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
64 1,808 1,05 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
65 1,825 1,067 0 0 0 0 1 0 0 0 0 0 1 -12,56 0,0 -2,197 0,0 0 0 1
66 1,841 1,083 0 0 0 0 0 0 0 0 0 0 0 -12,56 0,0 0,0 -2,197 0,0 0,0 0 0 1
1,858 -12,56 0,0 -2,197 0,0
1,875 -12,56 0,0 -2,197 0,0
1,891 -12,56 0,0 -2,197 0,0
1,908 -12,56 0,0 -2,197 0,0
1,925 -12,56 0,0 -2,197 0,0
1,941 -12,56 0,0 -2,197 0,0
1,958 -12,56 0,0 -2,197 0,0
1,975 -12,56 0,0 -2,197 0,0
1,991 -12,56 0,0 -2,197 0,0
2,008 -12,56 0,0 -2,197 0,0
2,025 -12,56 0,0 -2,197 0,0
2,041 -12,56 0,0 -2,197 0,0
2,058 -12,56 0,0 -2,197 0,0
2,075 -12,56 0,0 -2,197 0,0
2,091 -12,56 0,0 -2,197 0,0
2,108 -12,56 0,0 -2,197 0,0
2,125 -12,56 0,0 -2,197 0,0
2,141 -12,56 0,0 -2,197 0,0
2,158 -12,56 0,0 -2,197 0,0
2,175 -12,56 0,0 -2,197 0,0
2,191 -12,56 0,0 -2,197 0,0
2,208 -12,56 0,0 -2,197 0,0
2,225 -12,56 0,0 -2,197 0,0
2,241 -12,56 0,0 -2,197 0,0
2,258 -12,56 0,0 -2,197 0,0
2,275 -12,56 0,0 -2,197 0,0
2,291 -12,56 0,0 -2,197 0,0
2,308 -12,56 0,0 -2,197 0,0
2,325 -12,56 0,0 -2,197 0,0
2,341 -12,56 0,0 -2,197 0,0
2,358 -12,56 0,0 -2,197 0,0
2,375 -12,56 0,0 -2,197 0,0
2,391 -12,56 0,0 -2,197 0,0
2,408 -12,56 0,0 -2,197 0,0
2,425 -12,56 0,0 -2,197 0,0
2,441 -12,56 0,0 -2,197 0,0
2,458 -12,56 0,0 -2,197 0,0
2,475 -12,56 0,0 -2,197 0,0
2,491 -12,56 0,0 -2,197 0,0
2,508 -12,56 0,0 -2,197 0,0
2,525 -12,56 0,0 -2,197 0,0
2,541 -12,56 0,0 -2,197 0,0
2,558 -12,56 0,0 -2,197 0,0
2,575 -12,56 0,0 -2,197 0,0
2,591 -12,56 0,0 -2,197 0,0
2,608 -12,56 0,0 -2,197 0,0
2,625 -12,56 0,0 -2,197 0,0
2,641 -12,56 0,0 -2,197 0,0
2,658 -12,56 0,0 -2,197 0,0
2,675 -12,56 0,0 -2,197 0,0
2,691 -12,56 0,0 -2,197 0,0
2,708 -12,56 0,0 -2,197 0,0
2,725 -12,56 0,0 -2,197 0,0
2,741 -12,56 0,0 -2,197 0,0
2,758 -12,56 0,0 -2,197 0,0
2,775 -12,56 0,0 -2,197 0,0
2,791 -12,56 0,0 -2,197 0,0
2,808 -12,56 0,0 -2,197 0,0
2,825 -12,56 0,0 -2,197 0,0
2,841 -12,56 0,0 -2,197 0,0
2,858 -12,56 0,0 -2,197 0,0
2,875 -12,56 0,0 -2,197 0,0
2,891 -12,56 0,0 -2,197 0,0
2,908 -12,56 0,0 -2,197 0,0
2,925 -12,56 0,0 -2,197 0,0
2,941 -12,56 0,0 -2,197 0,0
2,958 -12,56 0,0 -2,197 0,0
2,975 -12,56 0,0 -2,197 0,0
2,991 -12,56 0,0 -2,197 0,0
3,008 -12,56 0,0 -2,197 0,0
3,025 -12,56 0,0 -2,197 0,0
3,041 -12,56 0,0 -2,197 0,0
3,058 -12,56 0,0 -2,197 0,0
3,075 -12,56 0,0 -2,197 0,0
3,091 -12,56 0,0 -2,197 0,0
3,108 -12,56 0,0 -2,197 0,0
3,125 -12,56 0,0 -2,197 0,0
3,141 -12,56 0,0 -2,197 0,0
3,158 -12,56 0,0 -2,197 0,0
3,175 -12,56 0,0 -2,197 0,0
3,191 -12,56 0,0 -2,197 0,0
3,208 -12,56 0,0 -2,197 0,0
3,225 -12,56 0,0 -2,197 0,0
3,241 -12,56 0,0 -2,197 0,0
3,258 -12,56 0,0 -2,197 0,0
3,275 -12,56 0,0 -2,197 0,0
3,291 -12,56 0,0 -2,197 0,0
3,308 -12,56 0,0 -2,197 0,0
3,325 -12,56 0,0 -2,197 0,0
3,341 -12,56 0,0 -2,197 0,0
3,358 -12,56 0,0 -2,197 0,0
3,375 -12,56 0,0 -2,197 0,0
3,391 -12,56 0,0 -2,197 0,0
3,408 -12,56 0,0 -2,197 0,0
3,425 -12,56 0,0 -2,197 0,0
3,441 -12,56 0,0 -2,197 0,0
3,458 -12,56 0,0 -2,197 0,0
3,475 -12,56 0,0 -2,197 0,0
3,491 -12,56 0,0 -2,197 0,0
3,508 -12,56 0,0 -2,197 0,0
3,525 -12,56 0,0 -2,197 0,0
3,541 -12,56 0,0 -2,197 0,0
3,558 -12,56 0,0 -2,197 0,0
3,575 -12,56 0,0 -2,197 0,0
3,591 -12,56 0,0 -2,197 0,0
3,608 -12,56 0,0 -2,197 0,0
3,625 -12,56 0,0 -2,197 0,0
3,641 -12,56 0,0 -2,197 0,0
3,658 -12,56 0,0 -2,197 0,0
3,675 -12,56 0,0 -2,197 0,0
3,691 -12,56 0,0 -2,197 0,0
3,708 -12,56 0,0 -2,197 0,0
3,725 -12,56 0,0 -2,197 0,0
3,741 -12,56 0,0 -2,197 0,0
3,758 -12,56 0,0 -2,197 0,0
3,775 -12,56 0,0 -2,197 0,0
3,791 -12,56 0,0 -2,197 0,0
3,808 -12,56 0,0 -2,197 0,0
3,825 -12,56 0,0 -2,197 0,0
3,841 -12,56 0,0 -2,197 0,0
3,858 -12,56 0,0 -2,197 0,0
3,875 -12,56 0,0 -2,197 0,0
3,891 -12,56 0,0 -2,197 0,0
3,908 -12,56 0,0 -2,197 0,0
3,925 -12,56 0,0 -2,197 0,0
3,941 -12,56 0,0 -2,197 0,0
3,958 -12,56 0,0 -2,197 0,0
3,975 -12,56 0,0 -2,197 0,0
3,991 -12,56 0,0 -2,197 0,0
4,008 -12,56 0,0 -2,197 0,0
4,025 -12,56 0,0 -2,197 0,0
4,041 0,0 0,0 0,0 0,0

View File

@ -132,14 +132,17 @@ def commandes():
gyr(False)
tempo(1)
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()

View File

@ -51,15 +51,17 @@ def commandes():
while True:
pass
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()

View File

@ -100,14 +100,17 @@ def commandes():
mot_f(False)
print ("Attente")
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()

View File

@ -73,8 +73,9 @@ from porcou_lib import * # Bibliothèque utilisateur du portail coulissant
def commandes():
daq(['mot_angle', 'mot_vitesse', 'portail_x', 'portail_vitesse'])
reset_t()
# daq(['mot_angle', 'mot_vitesse', 'portail_x', 'portail_vitesse'])
# plot(['mot_angle', 'mot_vitesse', 'portail_x', 'portail_vitesse'])
# reset_t()
# Init -> Ouverture
while fdc_o() ==False :
@ -91,9 +92,6 @@ def commandes():
# daq(['bp_ext', 'bp_ext_r', 'bp_int', 'bp_int_r', 'fdc_o', 'fdc_o_r', 'fdc_f', 'fdc_f_r', 'mot_o', 'mot_f', 'gyr', 'mot_angle', 'mot_vitesse', 'portail_x', 'portail_vitesse', 'ir_emet', 'ir_recep', 'ir_recep_r'])
# daq(['bp_ext', 'bp_ext_r', 'bp_int', 'bp_int_r', 'fdc_o', 'fdc_o_r', 'fdc_f', 'fdc_f_r', 'mot_o', 'mot_f', 'gyr'])
plot(['mot_angle', 'mot_vitesse', 'portail_x', 'portail_vitesse'])
# plot([['bp_ext', 'bp_ext_r'], ['bp_int', 'bp_int_r'], ['fdc_o', 'fdc_o_r'], ['fdc_f', 'fdc_f_r'], 'mot_o', 'mot_f', 'gyr', ['mot_angle', 'mot_vitesse', 'portail_x', 'portail_vitesse']])
# Jumelage
@ -151,14 +149,17 @@ def commandes():
gyr(False)
tempo(1)
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()

View File

@ -100,14 +100,17 @@ def commandes():
mot_f(False)
print ("Attente")
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()

View File

@ -5,8 +5,8 @@ from PyQt6 import QtCore, QtGui, QtWidgets # GUI Qt6
import matplotlib # Grapheur Matplotlib
import matplotlib.pyplot as plts
matplotlib.use('Qt5Agg')
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg, NavigationToolbar2QT as NavigationToolbar
matplotlib.use('QtAgg')
from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg, NavigationToolbar2QT as NavigationToolbar
###############################################################################
# twin_plot_qt.py

View File

@ -1,73 +0,0 @@
from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets
import plotly.express as px
import numpy as np
# import plotly.graph_objects as go
import random
import time
class Widget(QtWidgets.QWidget):
def __init__(self, parent=None):
super().__init__(parent)
self.browser = QtWebEngineWidgets.QWebEngineView(self)
vlayout = QtWidgets.QVBoxLayout(self)
vlayout.addWidget(self.browser)
self.show_graph()
# self.resize(1000,800)
self.resize(500,400)
def show_graph(self):
# fig = go.Figure()
# xdata = [0]
# ydata = [0]
# df = px.data.tips()
# fig = px.box(df, x="day", y="total_bill", color="smoker")
# fig.update_traces(quartilemethod="exclusive") # or "inclusive", or "linear" by default
# fig = px.bar(x=["a", "b", "c"], y=[1, 3, 2])
# fig.add_trace(go.Scatter(x=xdata, y=ydata, name='essai',line=dict(color='firebrick', width=4)))
# for i in range (100):
# xdata.append(i)
# ydata.append(random.randint(0, 10))
# # fig.update_traces()
# # self.browser.setHtml(fig.to_html(include_plotlyjs='cdn'))
# # fig.add_trace(go.Scatter(x=xdata, y=ydata, name='essai',line=dict(color='firebrick', width=4)))
# ydata.append(random.randint(0, 10))
# fig.update_traces()
# self.browser.setHtml(fig.to_html(include_plotlyjs='cdn'))
# initialize and display plot
# fig = go.FigureWidget()
# fig.add_scatter(y=np.random.randint(0,10, 5), fill='tozeroy')
# display(fig)
xdata=[0]
ydata=[0]
fig = px.scatter(x=xdata, y=ydata)
# fig = px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16])
# print (fig.data[0].x)
# print (fig.data[0].y)
# fig.show()
self.browser.setHtml(fig.to_html(include_plotlyjs='cdn'))
# modify plot using new data
for i in range(10):
time.sleep(0.5)
xdata.append(i+1)
ydata.append(random.randint(0, 10))
fig.update_traces()
# np.append(fig.data[0].x, i+2)
# np.append(fig.data[0].y, np.random.randint(0,10, 5))
# fig.update_traces()
# fig.data[0].y.append(np.random.randint(0,10, 5))
# fig.data[0].y = np.random.randint(0,10, 5)
# fig.data[0].y = np.random.randint(0,10, 5)
if __name__ == "__main__":
app = QtWidgets.QApplication([])
widget = Widget()
widget.show()
app.exec()

View File

@ -54,18 +54,17 @@ def commandes():
while True:
pass
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()
if __name__=='init':
variant(1) # Variante 1 de la maquette 3D du volet roulant

View File

@ -136,16 +136,17 @@ def commandes():
mot_d(False)
presence_lum_tempo=0
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()
if __name__=='init':
variant(2) # Variante 1 de la maquette 3D du volet roulant

View File

@ -99,17 +99,17 @@ def commandes():
" rad/s - moteur_pas : " +str(round(mot_pas, 3))+" rad/impulsion")
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()
if __name__=='init':
variant(2) # Variante 2 de la maquette 3D du volet roulant

View File

@ -136,16 +136,17 @@ def commandes():
mot_d(False)
presence_lum_tempo=0
fin() # A garder
###############################################################################
# En: External call << DONT CHANGE THIS SECTION >>
# Fr: Appel externe << NE PAS MODIFIER CETTE SECTION >>
###############################################################################
def cycle():
commandes()
fin()
if __name__=='start':
start(commandes)
start(cycle)
if __name__=='stop':
stop()
if __name__=='init':
variant(2) # Variante 1 de la maquette 3D du volet roulant