mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-13 08:05:55 +01:00
2019-08-26 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in the 'pypad_inno713.py' PyPAD script that caused an infinite loop.
This commit is contained in:
@@ -18984,3 +18984,6 @@
|
|||||||
2019-08-26 Fred Gleason <fredg@paravelsystems.com>
|
2019-08-26 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a bug in the 'pypad_filewrite.py' PyPAD script that caused
|
* Fixed a bug in the 'pypad_filewrite.py' PyPAD script that caused
|
||||||
an infinite loop.
|
an infinite loop.
|
||||||
|
2019-08-26 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a bug in the 'pypad_inno713.py' PyPAD script that caused
|
||||||
|
an infinite loop.
|
||||||
|
|||||||
@@ -32,9 +32,8 @@ def eprint(*args,**kwargs):
|
|||||||
|
|
||||||
def ProcessPad(update):
|
def ProcessPad(update):
|
||||||
n=1
|
n=1
|
||||||
while(True):
|
|
||||||
section='Rds'+str(n)
|
section='Rds'+str(n)
|
||||||
try:
|
while(update.config().has_section(section)):
|
||||||
if update.shouldBeProcessed(section) and update.hasPadType(pypad.TYPE_NOW):
|
if update.shouldBeProcessed(section) and update.hasPadType(pypad.TYPE_NOW):
|
||||||
dps=''
|
dps=''
|
||||||
if(len(update.config().get(section,'DynamicPsString'))!=0):
|
if(len(update.config().get(section,'DynamicPsString'))!=0):
|
||||||
@@ -45,7 +44,7 @@ def ProcessPad(update):
|
|||||||
text=''
|
text=''
|
||||||
if(len(update.config().get(section,'RadiotextString'))!=0):
|
if(len(update.config().get(section,'RadiotextString'))!=0):
|
||||||
text='TEXT='+update.resolvePadFields(update.config().get(section,'RadiotextString'),pypad.ESCAPE_NONE)+'\r\n'
|
text='TEXT='+update.resolvePadFields(update.config().get(section,'RadiotextString'),pypad.ESCAPE_NONE)+'\r\n'
|
||||||
try:
|
if(update.config().has_option(section,'Device')):
|
||||||
#
|
#
|
||||||
# Use serial output
|
# Use serial output
|
||||||
#
|
#
|
||||||
@@ -65,8 +64,7 @@ def ProcessPad(update):
|
|||||||
if(len(text)!=0):
|
if(len(text)!=0):
|
||||||
dev.write(text.encode('utf-8'))
|
dev.write(text.encode('utf-8'))
|
||||||
dev.close()
|
dev.close()
|
||||||
|
else:
|
||||||
except configparser.NoOptionError:
|
|
||||||
#
|
#
|
||||||
# Use UDP output
|
# Use UDP output
|
||||||
#
|
#
|
||||||
@@ -79,8 +77,7 @@ def ProcessPad(update):
|
|||||||
if(len(text)!=0):
|
if(len(text)!=0):
|
||||||
send_sock.sendto(text.encode('utf-8'),(ipaddr,port))
|
send_sock.sendto(text.encode('utf-8'),(ipaddr,port))
|
||||||
n=n+1
|
n=n+1
|
||||||
except configparser.NoSectionError:
|
section='Rds'+str(n)
|
||||||
return
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# 'Main' function
|
# 'Main' function
|
||||||
|
|||||||
Reference in New Issue
Block a user