code: def idle_task(self):
          '''handle mavlink packets'''
          if not self.started:
              return
          now = time.time()
          if now - self.last_packet < 1:
              timeout = 0.05
          else:
              timeout = 0.2
          if now - self.last_check > timeout:
              self.last_check = now
              mav = self.master.mav
              flags = mavutil.mavlink.SERIAL_CONTROL_FLAG_RESPOND
              flags |= mavutil.mavlink.SERIAL_CONTROL_FLAG_MULTI
              flags |= mavutil.mavlink.SERIAL_CONTROL_FLAG_EXCLUSIVE
              mav.serial_control_send(self.serial_settings.port,
                                      flags,
                                      0, self.serial_settings.baudrate,
                                      0, [0]*70f idle_task(self):
          '''handle mavlink packets'''
          if not self.started:
              return
          now = time.time()
          if now - self.last_packet < 1:
              timeout = 0.05
          else:
              timeout = 0.2
          if now - self.last_check > timeout:
              self.last_check = now
              mav = self.master.mav
              flags = mavutil.mavlink.SERIAL_CONTROL_FLAG_RESPOND
              flags |= mavutil.mavlink.SERIAL_CONTROL_FLAG_MULTI
              flags |= mavutil.mavlink.SERIAL_CONTROL_FLAG_EXCLUSIVE
              mav.serial_control_send(self.serial_settings.port,
                                      flags,
                                      0, self.serial_settings.baudrate,
                                      0, [0]*70)
docs: handle mavlink packets