log names instead of ids for improved transparency

This commit is contained in:
Jakob Ketterl 2022-12-11 20:41:35 +01:00
parent a309af40e9
commit bbc9d9e7a8

View File

@ -230,8 +230,9 @@ class SdrSource(ABC):
return [self.getCommandMapper().map(self.getCommandValues())] return [self.getCommandMapper().map(self.getCommandValues())]
def activateProfile(self, profile_id): def activateProfile(self, profile_id):
self.logger.debug("activating profile {0} for {1}".format(profile_id, self.getId()))
try: try:
profile_name = self.getProfiles()[profile_id]["name"]
self.logger.debug("activating profile \"%s\" for \"%s\"", profile_name, self.getName())
self.profileCarousel.switch(profile_id) self.profileCarousel.switch(profile_id)
except KeyError: except KeyError:
self.logger.warning("invalid profile %s for sdr %s. ignoring", profile_id, self.getId()) self.logger.warning("invalid profile %s for sdr %s. ignoring", profile_id, self.getId())