mirror of
https://forge.apps.education.fr/blender-edutech/jumeaux-numeriques.git
synced 2024-01-27 06:56:18 +01:00
Changement de poste
This commit is contained in:
parent
b12c9a2663
commit
4a1f80568b
@ -35,8 +35,8 @@ card_description.update({"serial-card" : [card_serial_title, card_serial_text, c
|
||||
|
||||
# Ouvrir et fermer
|
||||
card_movement_title="Ouvrir et fermer"
|
||||
card_movement_text=""" mot_o (True|False) \n -> Ouvre le portail (moteur sens trigo) \n
|
||||
mot_f (True|False) \n -> Ferme le portail (moteur sens horaire) \n
|
||||
card_movement_text=""" mot_o (True | False) \n -> Ouvre le portail (moteur sens trigo) \n
|
||||
mot_f (True | False) \n -> Ferme le portail (moteur sens horaire) \n
|
||||
fdc_o() \n -> Capteur fin de course portail ouvert\n Retourne True si le portail est ouvert. \n
|
||||
fdc_f() \n -> Capteur fin de course portail fermé\n Retourne True si le portail est fermé."""
|
||||
card_movement_url=[]
|
||||
@ -44,14 +44,14 @@ card_description.update({"movement-card" : [card_movement_title, card_movement_t
|
||||
|
||||
# Capteurs
|
||||
card_sensor_title="Capteur Infrarouge"
|
||||
card_sensor_text=""" ir_emet(True|False) \n -> Active l\"émetteur infrarouge (IR) \n
|
||||
card_sensor_text=""" ir_emet(True | False) \n -> Active l\"émetteur infrarouge (IR) \n
|
||||
ir_recep() \n -> Récepteur barrage infrarouge (IR)\n Retourne True s\"il n\"y a pas d\"obstacle."""
|
||||
card_sensor_url=[]
|
||||
card_description.update({"sensor-card" : [card_sensor_title, card_sensor_text, card_sensor_url]})
|
||||
|
||||
# Gyrophare
|
||||
card_gyro_title="Gyrophare"
|
||||
card_gyro_text=""" gyr (True|False) \n -> Active le gyrophare"""
|
||||
card_gyro_text=""" gyr (True | False) \n -> Active le gyrophare"""
|
||||
card_gyro_url=[]
|
||||
card_description.update({"gyro-card" : [card_gyro_title, card_gyro_text, card_gyro_url]})
|
||||
|
||||
|
@ -10,7 +10,7 @@ from serial.tools.list_ports import comports # Détection du port automatique
|
||||
|
||||
###############################################################################
|
||||
# porcou_lib.py
|
||||
# @title: Bibliothèque utilisateur du portail coulissant (pc_*)
|
||||
# @title: Bibliothèque utilisateur du portail coulissant
|
||||
# @project: Blender-EduTech
|
||||
# @lang: fr
|
||||
# @authors: Philippe Roy <philippe.roy@ac-grenoble.fr>
|
||||
@ -226,7 +226,7 @@ def serial_autoget_port():
|
||||
for com in comports(): # Arduino Mega
|
||||
if com.vid == board_dict["mega"][0] and com.pid == board_dict["mega"][1]:
|
||||
return [com.device,"Arduino Mega"]
|
||||
return None
|
||||
return [None,""]
|
||||
|
||||
##
|
||||
# Création de l'objet carte (protocole Firmata)
|
||||
@ -283,10 +283,14 @@ def jumeau(pins):
|
||||
# Mise en place de la carte
|
||||
speed = 57600
|
||||
[device,board_name] =serial_autoget_port() # Recherche automatique du port
|
||||
if device is None:
|
||||
scene.objects['System']['twins'] = False
|
||||
scene.objects['Twins-text']['Text'] = "Aucune connection disponible : jumeau réel débranché."
|
||||
return False
|
||||
board = board_init(device)
|
||||
if board is None:
|
||||
scene.objects['System']['twins'] = False
|
||||
scene.objects['Twins-text']['Text'] = "Port "+device+" pas prêt"
|
||||
scene.objects['Twins-text']['Text'] = "Aucune connection disponible : port "+device+" pas prêt"
|
||||
return False
|
||||
scene.objects['System']['twins'] = True
|
||||
# scene.objects['System']['twins_close'] = False
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
/home/phroy/Documents/blender-edutech/git/digital_twin/twin.py
|
||||
/home/phroy/Bureau/seriousgames/blender-edutech/git/digital_twin/twin.py
|
@ -1 +1 @@
|
||||
/home/phroy/Documents/blender-edutech/git/digital_twin/twin_about.py
|
||||
/home/phroy/Bureau/seriousgames/blender-edutech/git/digital_twin/twin_about.py
|
@ -1 +1 @@
|
||||
/home/phroy/Documents/blender-edutech/git/digital_twin/twin_config.xml
|
||||
/home/phroy/Bureau/seriousgames/blender-edutech/git/digital_twin/twin_config.xml
|
@ -1 +1 @@
|
||||
/home/phroy/Documents/blender-edutech/git/digital_twin/twin_doc.py
|
||||
/home/phroy/Bureau/seriousgames/blender-edutech/git/digital_twin/twin_doc.py
|
@ -1,6 +1,6 @@
|
||||
<data>
|
||||
<screen>
|
||||
<width>1339</width>
|
||||
<height>753</height>
|
||||
<width>775</width>
|
||||
<height>435</height>
|
||||
</screen>
|
||||
</data>
|
Loading…
Reference in New Issue
Block a user