def newShutters(self, shutters_filename): new_shutters = False try: for module in self.modules: module.newShutters(shutters_filename) new_shutters = True except: print traceback.format_exc() hdebug.logText("failed to parse shutter file.") for module in self.modules: module.newShutters(self.old_shutters_file) self.parameters.shutters = self.old_shutters_file if new_shutters: self.parameters.shutters = shutters_filename self.old_shutters_file = shutters_filename self.ui.shuttersText.setText(getFileName(self.parameters.shutters)) #self.camera.setSyncMax(self.shutter_control.getCycleLength()) params.setDefaultShutter(shutters_filename)
def newShutters(self, shutters_filename): if self.filming: return new_shutters = False try: for module in self.modules: module.newShutters(shutters_filename) new_shutters = True except: QtGui.QMessageBox.information(self, "Shutter file parsing error", traceback.format_exc()) hdebug.logText("failed to parse shutter file " + shutters_filename) for module in self.modules: module.newShutters(self.old_shutters_file) self.parameters.set("illumination.shutters", self.old_shutters_file) if new_shutters: self.parameters.set("illumination.shutters", shutters_filename) self.old_shutters_file = shutters_filename self.ui.shuttersText.setText(getFileName(self.parameters.get("illumination.shutters"))) params.setDefaultShutter(shutters_filename)
def newShutters(self, shutters_filename): if self.filming: return new_shutters = False try: for module in self.modules: module.newShutters(shutters_filename) new_shutters = True except: QtGui.QMessageBox.information(self, "Shutter file parsing error", traceback.format_exc()) hdebug.logText("failed to parse shutter file " + shutters_filename) for module in self.modules: module.newShutters(self.old_shutters_file) self.parameters.set("shutters", self.old_shutters_file) if new_shutters: self.parameters.set("shutters", shutters_filename) self.old_shutters_file = shutters_filename self.ui.shuttersText.setText(getFileName(self.parameters.get("shutters"))) params.setDefaultShutter(shutters_filename)