Tidied up todos
This commit is contained in:
parent
affd9718a0
commit
8b9ecbe2c7
5 changed files with 1 additions and 20 deletions
|
|
@ -95,7 +95,6 @@ def construct_blueprint(microscope_obj):
|
||||||
plugin_obj.api_form, dict
|
plugin_obj.api_form, dict
|
||||||
):
|
):
|
||||||
api_form_info = plugin_obj.api_form
|
api_form_info = plugin_obj.api_form
|
||||||
# TODO: Validate form? We need to make sure no single plugin can break all plugins.
|
|
||||||
api_form_info["id"] = plugin_name
|
api_form_info["id"] = plugin_name
|
||||||
if "forms" in api_form_info and isinstance(
|
if "forms" in api_form_info and isinstance(
|
||||||
api_form_info["forms"], list
|
api_form_info["forms"], list
|
||||||
|
|
|
||||||
|
|
@ -42,11 +42,6 @@ def generate_numbered_basename(obj_list: list) -> str:
|
||||||
return basename
|
return basename
|
||||||
|
|
||||||
|
|
||||||
def shunt_captures(target_list: list):
|
|
||||||
for obj in target_list: # For each older capture
|
|
||||||
obj.shunt() # Shunt capture from memory to storage
|
|
||||||
|
|
||||||
|
|
||||||
class CameraEvent(object):
|
class CameraEvent(object):
|
||||||
"""
|
"""
|
||||||
A frame-signaller object used by any instances or subclasses of BaseCamera.
|
A frame-signaller object used by any instances or subclasses of BaseCamera.
|
||||||
|
|
@ -295,7 +290,6 @@ class BaseCamera(metaclass=ABCMeta):
|
||||||
output = CaptureObject(filepath=filepath)
|
output = CaptureObject(filepath=filepath)
|
||||||
|
|
||||||
# Update capture list
|
# Update capture list
|
||||||
shunt_captures(self.images)
|
|
||||||
self.images.append(output)
|
self.images.append(output)
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
@ -336,7 +330,6 @@ class BaseCamera(metaclass=ABCMeta):
|
||||||
output = CaptureObject(filepath=filepath)
|
output = CaptureObject(filepath=filepath)
|
||||||
|
|
||||||
# Update capture list
|
# Update capture list
|
||||||
shunt_captures(self.videos)
|
|
||||||
self.videos.append(output)
|
self.videos.append(output)
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ def capture_from_exif(path, exif_dict):
|
||||||
class CaptureObject(object):
|
class CaptureObject(object):
|
||||||
"""
|
"""
|
||||||
StreamObject used to store and process on-disk capture data, and metadata.
|
StreamObject used to store and process on-disk capture data, and metadata.
|
||||||
|
Serves to simplify modifying properties of on-disk capture data.
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
timestring (str): Timestring of capture creation time
|
timestring (str): Timestring of capture creation time
|
||||||
|
|
@ -314,10 +315,5 @@ class CaptureObject(object):
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def shunt(self):
|
|
||||||
# TODO: Remove
|
|
||||||
pass
|
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
# TODO: Remove
|
|
||||||
pass
|
pass
|
||||||
|
|
@ -131,7 +131,6 @@ class PiCameraStreamer(BaseCamera):
|
||||||
Args:
|
Args:
|
||||||
config (dict): Dictionary of config parameters.
|
config (dict): Dictionary of config parameters.
|
||||||
"""
|
"""
|
||||||
# TODO: Include timing and batching logic when applying PiCamera settings
|
|
||||||
|
|
||||||
paused_stream = False
|
paused_stream = False
|
||||||
logging.debug("PiCameraStreamer: Applying config:")
|
logging.debug("PiCameraStreamer: Applying config:")
|
||||||
|
|
@ -260,9 +259,6 @@ class PiCameraStreamer(BaseCamera):
|
||||||
"""Start the on board GPU camera preview."""
|
"""Start the on board GPU camera preview."""
|
||||||
logging.info("Starting the GPU preview")
|
logging.info("Starting the GPU preview")
|
||||||
|
|
||||||
# TODO: Commented out as I honestly can't remember why this was here. May need to put back?
|
|
||||||
# self.start_stream_recording()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not self.camera.preview:
|
if not self.camera.preview:
|
||||||
logging.debug("Starting preview")
|
logging.debug("Starting preview")
|
||||||
|
|
|
||||||
|
|
@ -90,9 +90,6 @@ class Microscope:
|
||||||
|
|
||||||
settings_full = self.read_config()
|
settings_full = self.read_config()
|
||||||
|
|
||||||
# TODO: Actually attach dummy hardware!
|
|
||||||
# Maybe even attach dummy hardware at __init__, and replace with real hardware if it exists
|
|
||||||
|
|
||||||
logging.debug("Attaching camera...")
|
logging.debug("Attaching camera...")
|
||||||
self.camera = (
|
self.camera = (
|
||||||
camera
|
camera
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue