fix indents

This commit is contained in:
Jakob Ketterl 2018-09-25 15:32:30 +02:00
parent 7f90c0a67a
commit aa03def329

View File

@ -480,16 +480,16 @@ class WebRXHandler(BaseHTTPRequestHandler):
print "[openwebrx-httpd:ws] client closed by other thread" print "[openwebrx-httpd:ws] client closed by other thread"
break break
# ========= send audio ========= # ========= send audio =========
if dsp_initialized: if dsp_initialized:
myclient.loopstat=10 myclient.loopstat=10
temp_audio_data=dsp.read_async(256) temp_audio_data=dsp.read_async(256)
if (temp_audio_data is not None): if (temp_audio_data is not None):
myclient.loopstat=11 myclient.loopstat=11
rxws.send(self, temp_audio_data, "AUD ") rxws.send(self, temp_audio_data, "AUD ")
else: else:
#time.sleep((256.0 * 32) / 11025) #time.sleep((256.0 * 32) / 11025)
time.sleep(.01) time.sleep(.01)
# ========= send spectrum ========= # ========= send spectrum =========
while not myclient.spectrum_queue.empty(): while not myclient.spectrum_queue.empty():
@ -501,29 +501,29 @@ class WebRXHandler(BaseHTTPRequestHandler):
myclient.loopstat=21 myclient.loopstat=21
rxws.send(self, spectrum_data[0],"FFT ") rxws.send(self, spectrum_data[0],"FFT ")
# ========= send smeter_level ========= # ========= send smeter_level =========
smeter_level=None smeter_level=None
while True: while True:
try: try:
myclient.loopstat=30 myclient.loopstat=30
smeter_level=dsp.get_smeter_level() smeter_level=dsp.get_smeter_level()
if smeter_level == None: break if smeter_level == None: break
except: except:
break break
if smeter_level!=None: if smeter_level!=None:
myclient.loopstat=31 myclient.loopstat=31
rxws.send(self, "MSG s={0}".format(smeter_level)) rxws.send(self, "MSG s={0}".format(smeter_level))
# ========= send metadata ========= # ========= send metadata =========
metadata = None metadata = None
while True: while True:
try: try:
myclient.loopstat=35 myclient.loopstat=35
metadata = dsp.get_metadata(); metadata = dsp.get_metadata();
if metadata == None: break if metadata == None: break
rxws.send(self, "MET {0}".format(metadata.rstrip("\n"))) rxws.send(self, "MET {0}".format(metadata.rstrip("\n")))
except: except:
break break
# ========= send bcastmsg ========= # ========= send bcastmsg =========
if myclient.bcastmsg!="": if myclient.bcastmsg!="":