def _dynamically_add_properties(self): '''Add all properties available on driver as Feats''' # What about units? props = self.properties.keys() if self.level == 'expert' else beginner_controls for p in props: feat = Feat(fget=create_getter(p), fset=create_setter(p), doc=self.cam.properties.get_description(p), units=property_units.get(p, None), ) feat.name = p attach_dyn_propr(self, p, feat)
def _dynamically_add_properties(self): """Add all properties available on driver as Feats""" props = self.getFeatureNames( ) if self.level == 'expert' else beginner_controls for p in props: info = self.cam.getFeatureInfo(p) range_ = self.cam.getFeatureRange(p) limits = range_ if isinstance(tuple, range_) else None values = range_ if isinstance(list, range_) else None feat = Feat( fget=create_getter(p), fset=create_setter(p), doc=info.description, units=info.unit, limits=limits, values=values, ) feat.name = p attach_dyn_propr(self, p, feat)