code: def master(self):
          '''return the currently chosen mavlink master object'''
          if len(self.mav_master) == 0:
                return None
          if self.settings.link > len(self.mav_master):
              self.settings.link = 1
          # try to use one with no link error
          if not self.mav_master[self.settings.link-1].linkerror:
              return self.mav_master[self.settings.link-1]
          for m in self.mav_master:
              if not m.linkerror:
                  return m
          return self.mav_master[self.settings.link-1f master(self):
          '''return the currently chosen mavlink master object'''
          if len(self.mav_master) == 0:
                return None
          if self.settings.link > len(self.mav_master):
              self.settings.link = 1
          # try to use one with no link error
          if not self.mav_master[self.settings.link-1].linkerror:
              return self.mav_master[self.settings.link-1]
          for m in self.mav_master:
              if not m.linkerror:
                  return m
          return self.mav_master[self.settings.link-1]
docs: return the currently chosen mavlink master object