Remove has_updated functionality

This commit is contained in:
CPD 2025-03-17 09:28:24 +01:00
parent b3915bad02
commit 51dd329bfc

View File

@ -85,20 +85,6 @@ class LedScript:
self.start_updating()
self.current_dt = 0
assert(self.script.shape[0] > 0)
self.is_updated = False
def has_updated(self) -> True:
"""
This is a workaround for when the update needs to be propagated to a QT thread for cpdctrl-gui
Returns
-------
True if the script was updated since the last call to this method
"""
if self.is_updated:
self.is_updated = False
return True
return False
def __del__(self):
self.stop_updating()
@ -269,7 +255,6 @@ class LedScript:
if idx != newidx:
raise ValueError(f"The duration of the current step {idx+1} in line {newscript['line'][idx]} in the new script is too short TODO")
self.script = newscript
self.is_updated = True
@staticmethod
def parse_script(filepath: str, ignore_errors:bool=False) -> np.ndarray|tuple[np.ndarray, list[InvalidScript]]: