Browse Source

Fixed: unsuscessful hardware update.

master
Carlos Reding 1 year ago
parent
commit
a0adfb53b9
2 changed files with 9 additions and 9 deletions
  1. 7
    7
      puppeteer/__init__.py
  2. 2
    2
      pupuicon/translator/_core.py

+ 7
- 7
puppeteer/__init__.py View File

@@ -172,22 +172,22 @@ def ExportData(Protocol, ProcessData, QueueFile, Connection, Status,
# House keeping. Always. Test or not.
house_keeper(Protocol._dir_info, QueueFile, Connection, BUFFER_SIZE)

def CancelProtocol(Protocol, Routine=".cancel_protocol.sh"):
def CancelProtocol():
"""
Cancels a running protocol with IMMEDIATE effect. The use of flags with
multithreading cannot cancel a running protocol until the next iteration
be it within a minute or an hour. `CancelProtocol' soft-restarts the
light modulator and, therefore, protocols are cancelled immediately.
"""
# Stop hardware
Protocol._device._camera.close()
Protocol._device._heater.stop()
Protocol._device._servo.stop()
Protocol._device._light_panel.stop()
# Protocol._device._camera.close()
# Protocol._device._heater.stop()
# Protocol._device._servo.stop()
# Protocol._device._light_panel.stop()
# Restart it all...
LiMO_Path = "/home/client/.srv/"
subprocess.call([".", LiMO_Path + Routine])
Routine=".cancel_protocol.sh"
subprocess.call(["bash", "-c", LiMO_Path + Routine])

def CameraRepetitions():
"""

+ 2
- 2
pupuicon/translator/_core.py View File

@@ -2,11 +2,11 @@ import pickle, sys, os
import numpy as np
import datetime as dt
from .handlers import translateUIToHardware # TODO: Fix weird dependency (up to Rob).
# from .handlers import hardwareVariables # TODO: Fix weird dependency (up to Rob).
from .handlers import hardwareVariables # TODO: Fix weird dependency (up to Rob).

# HACK: handlers.modname is _NOT_ idenfified as modname
sys.modules['translateUIToHardware'] = translateUIToHardware
# sys.modules['hardwareVariables'] = hardwareVariables
sys.modules['hardwareVariables'] = hardwareVariables

class ProtocolHandler:
"""

Loading…
Cancel
Save