def check_connection(self):
    ' Check connection quality in term of lag and number of packets drop. Reinit connection if necessary. FIXME: parameters given to the board will be lost.'
    if (not self.streaming):
        return
    if (self.packets_dropped > self.max_packets_to_skip):
        self.warn('Too many packets dropped, attempt to reconnect')
        self.reconnect()
    elif ((self.timeout > 0) and ((timeit.default_timer() - self.time_last_packet) > self.timeout)):
        self.warn('Too long since got new data, attempt to reconnect')
        self.reconnect()
Check connection quality in term of lag and number of packets drop. Reinit connection if necessary. FIXME: parameters given to the board will be lost.
def check_connection(self):
    ' '
    if (not self.streaming):
        return
    if (self.packets_dropped > self.max_packets_to_skip):
        self.warn('Too many packets dropped, attempt to reconnect')
        self.reconnect()
    elif ((self.timeout > 0) and ((timeit.default_timer() - self.time_last_packet) > self.timeout)):
        self.warn('Too long since got new data, attempt to reconnect')
        self.reconnect()