Pilotage moteur par le shield moteur

This commit is contained in:
Philippe Roy 2024-01-18 04:53:16 +01:00
parent 38accf8a44
commit fbc41a9d57
5 changed files with 9 additions and 6 deletions

View File

@ -332,6 +332,9 @@ def system_init ():
def system_reset ():
# Mise en place de la variante
runpy.run_path(scene.objects['System']['script'], run_name='init')
# Entrées à l'état initial
objs= ['Bp niveau 0', 'Bp niveau 1', 'Microrupteur niveau 0','Microrupteur niveau 1']
for obj in objs:

View File

@ -1,7 +1,7 @@
<data>
<screen>
<width>1341</width>
<height>754</height>
<width>1325</width>
<height>745</height>
<quality>4</quality>
</screen>
<plot>

Binary file not shown.

View File

@ -46,10 +46,10 @@ from volrou_lib import * # Bibliothèque volet roulant
# Brochage du volet roulant (Maquette Grove)
brochage={
'bp_m' : ['a',1,'i'], 'bp_a' : ['a',0,'i'], 'bp_d' : ['a',2,'i'],
'fdc_h' : ['d',8,'i'], 'fdc_b' : ['d',7,'i'],
'bp_m' : ['d',6,'i'], 'bp_a' : ['d',7,'i'], 'bp_d' : ['d',8,'i'],
'fdc_h' : ['a',0,'i'], 'fdc_b' : ['a',1,'i'],
'mot_v' : ['d',3,'p'], 'mot_s' : ['d',4,'o'],
'bg_auto' : ['d',2,'i'], 'voy_auto' : ['d',4,'o'], 'lum' : ['a',3,'i']}
'bg_auto' : ['d',5,'i'], 'voy_auto' : ['d',2,'o'], 'lum' : ['a',2,'i']}
###############################################################################
# Fonctions

View File

@ -179,7 +179,7 @@ def variant(variant_num):
scene.objects['System']['variant']=variant_num
# Affichage des éléments spécifiques de la variante
variant_dict = {'Bg auto':[1], 'Bg auto-on':[1], 'Bg auto':[2], 'Bg auto-on':[2], 'Bp auto':[3]}
variant_dict = {'Bg auto':[1,2], 'Bg auto-on':[1,2], 'Bp auto':[3]}
variant_list = list(variant_dict)
for name in variant_list:
if variant_num in variant_dict[name]: