- # wait a short time so that in any case we don't flood the GUI
- # with new data (for example if the demo device is used)
- self.thread().msleep(100)
+ if not len(packet.payload.channels):
+ return
+
+ # TODO: find a device with multiple channels in one packet
+ channel = packet.payload.channels[0]
+
+ # the most recent value
+ value = packet.payload.data[0][-1]
+
+ self.measured.emit(device, channel,
+ (value, packet.payload.unit, packet.payload.mq_flags))