Browse Source

Servo switch reimplemented

master
Carlos Reding 1 year ago
parent
commit
6900c3ebc2
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      puppeteer/_core.py

+ 9
- 1
puppeteer/_core.py View File

@@ -261,7 +261,7 @@ class SetupDevice:
if new_pwm != current_pwm:
self._servo.set_servo_pulsewidth(self._FILTER_PIN, new_pwm) # Adjust.
t.sleep(1) # Gives the servo time to move....
self._servo.set_PWM_dutycycle(self._FILTER_PIN, 0) # Turn back OFF.
self._servo.set_servo_pulsewidth(self._FILTER_PIN, 0) # Turn back OFF.
current_pwm = new_pwm
return current_pwm
elif selected_filter == "expose_filters":
@@ -697,6 +697,9 @@ class SetProtocol:
return col_labels, row_labels, img_limits, wells

def _update_queue(self, Queue, QueueInfo, QueueFile, Read):
"""
Keep progress record in `QueueFile' up-to-date.
"""
QueueInfo[Read].append(str(Queue[Read]))
fIn = open(QueueFile).read().split('\n')
fIn[Read+1] = ', '.join(QueueInfo[Read])
@@ -706,12 +709,17 @@ class SetProtocol:
print("QueueFile updated.")

def _check_temperature_file(self):
"""
Check whether file to store record with temperatures exists. If it
doesn't, then create it.
"""
path = self._dir_info.root_path + self._dir_info.protocol_path + "/"
filename = "temperature.csv"
if os.path.exists(path + filename):
os.remove(path + filename)

def _update_temperature(self, current_time):
""" Keep record with temperatures up-to-date. """
# Create file to store temperature record.
report_path = self._dir_info.root_path +\
self._dir_info.protocol_path + "/"

Loading…
Cancel
Save