From 39e574dba7acf6bd24dde13d23410e9cfb0fea38 Mon Sep 17 00:00:00 2001 From: Ken Roberts Date: Mon, 13 Oct 2014 13:58:39 -0700 Subject: [PATCH] Change timer setting based on initial connect/poll --- openlp/core/lib/projector/pjlink1.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openlp/core/lib/projector/pjlink1.py b/openlp/core/lib/projector/pjlink1.py index 8a126a80a..32e07093a 100644 --- a/openlp/core/lib/projector/pjlink1.py +++ b/openlp/core/lib/projector/pjlink1.py @@ -194,6 +194,9 @@ class PJLink1(QTcpSocket): return log.debug('(%s) Updating projector status' % self.ip) # Reset timer in case we were called from a set command + if self.timer.interval() < 5000: + # Reset timer to 5 seconds + self.timer.setInterval(5000) self.timer.start() for command in ['POWR', 'ERST', 'LAMP', 'AVMT', 'INPT']: # Changeable information @@ -324,6 +327,7 @@ class PJLink1(QTcpSocket): self.send_command(cmd='CLSS', salt=salt) self.waitForReadyRead() if not self.new_wizard and self.state() == self.ConnectedState: + self.timer.setInterval(1000) # Set 1 second for initial information self.timer.start() def get_data(self):