code: def on_hid_pnp(self, hid_event = None):
          
          old_device = self.hid_device
  
          if hid_event:
              self.pnpChanged.emit(hid_event)
  
          if hid_event == "connected":
              # test if our device is available
              if self.hid_device:
                  # see, at this point we could detect multiple devices!
                  # but... we only want just one
                  pass
              else:
                  self.test_for_connection()
          elif hid_event == "disconnected":
              # the hid object is automatically closed on disconnection we just
              # test if still is plugged (important as the object might be
              # closing)
              if self.hid_device and not self.hid_device.is_plugged():
                  self.hid_device = None
          else:
              # poll for devices
              self.test_for_connection()
          # update ui
          if old_device != self.hid_device:
              if hid_event == "disconnected":
                  self.hidConnected.emit(old_device, hid_event)
              else:
                  self.hidConnected.emit(self.hid_device, hid_event)
docs: This function will be called on per class event changes, so we need
          to test if our device has being connected or is just gone