diff --git a/portail_coulissant/porcou_doc.py b/portail_coulissant/porcou_doc.py index 12780c4..5e15091 100644 --- a/portail_coulissant/porcou_doc.py +++ b/portail_coulissant/porcou_doc.py @@ -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]}) diff --git a/portail_coulissant/porcou_lib.py b/portail_coulissant/porcou_lib.py index 9c4a541..d46f2fb 100644 --- a/portail_coulissant/porcou_lib.py +++ b/portail_coulissant/porcou_lib.py @@ -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 @@ -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 diff --git a/portail_coulissant/portail_coulissant-14.blend b/portail_coulissant/portail_coulissant-14.blend index 3665980..60d1155 100644 Binary files a/portail_coulissant/portail_coulissant-14.blend and b/portail_coulissant/portail_coulissant-14.blend differ diff --git a/portail_coulissant/twin.py b/portail_coulissant/twin.py index 5b5e1d9..f8f5c2f 120000 --- a/portail_coulissant/twin.py +++ b/portail_coulissant/twin.py @@ -1 +1 @@ -/home/phroy/Documents/blender-edutech/git/digital_twin/twin.py \ No newline at end of file +/home/phroy/Bureau/seriousgames/blender-edutech/git/digital_twin/twin.py \ No newline at end of file diff --git a/portail_coulissant/twin_about.py b/portail_coulissant/twin_about.py index b9dbd40..5a76f30 120000 --- a/portail_coulissant/twin_about.py +++ b/portail_coulissant/twin_about.py @@ -1 +1 @@ -/home/phroy/Documents/blender-edutech/git/digital_twin/twin_about.py \ No newline at end of file +/home/phroy/Bureau/seriousgames/blender-edutech/git/digital_twin/twin_about.py \ No newline at end of file diff --git a/portail_coulissant/twin_config.xml b/portail_coulissant/twin_config.xml index 7c35fba..e44857d 120000 --- a/portail_coulissant/twin_config.xml +++ b/portail_coulissant/twin_config.xml @@ -1 +1 @@ -/home/phroy/Documents/blender-edutech/git/digital_twin/twin_config.xml \ No newline at end of file +/home/phroy/Bureau/seriousgames/blender-edutech/git/digital_twin/twin_config.xml \ No newline at end of file diff --git a/portail_coulissant/twin_doc.py b/portail_coulissant/twin_doc.py index 4f0b2e1..64dc410 120000 --- a/portail_coulissant/twin_doc.py +++ b/portail_coulissant/twin_doc.py @@ -1 +1 @@ -/home/phroy/Documents/blender-edutech/git/digital_twin/twin_doc.py \ No newline at end of file +/home/phroy/Bureau/seriousgames/blender-edutech/git/digital_twin/twin_doc.py \ No newline at end of file diff --git a/twin_config.xml b/twin_config.xml index 2f742d8..24790e2 100644 --- a/twin_config.xml +++ b/twin_config.xml @@ -1,6 +1,6 @@ - 1339 - 753 + 775 + 435 \ No newline at end of file