mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-13 02:08:50 +01:00
commit
1454e43bcb
@ -364,9 +364,10 @@ class MPDSpectrumPage(Page):
|
|||||||
step = int( round( len( spects ) / meterNum) )
|
step = int( round( len( spects ) / meterNum) )
|
||||||
# print(len(spects))
|
# print(len(spects))
|
||||||
self._bbs = []
|
self._bbs = []
|
||||||
|
a = numpy.logspace(0, 1, num=meterNum,endpoint=True)
|
||||||
|
|
||||||
for i in range(0,meterNum):
|
for i in range(0,meterNum):
|
||||||
index = int(i*step)
|
index = int(a[i] * step)
|
||||||
total = 0
|
total = 0
|
||||||
|
|
||||||
value = spects[index]
|
value = spects[index]
|
||||||
@ -386,7 +387,7 @@ class MPDSpectrumPage(Page):
|
|||||||
value = 0
|
value = 0
|
||||||
|
|
||||||
value = value/32768.0
|
value = value/32768.0
|
||||||
value = value * 100
|
value = value * 123
|
||||||
value = value % (self._Height-gap-margin_bottom)
|
value = value % (self._Height-gap-margin_bottom)
|
||||||
|
|
||||||
if len(self._vis_values) < len(self._bby):
|
if len(self._vis_values) < len(self._bby):
|
||||||
@ -396,7 +397,8 @@ class MPDSpectrumPage(Page):
|
|||||||
self._vis_values[i] = value
|
self._vis_values[i] = value
|
||||||
|
|
||||||
|
|
||||||
except Empty:
|
except Exception,e:
|
||||||
|
print(e)
|
||||||
return
|
return
|
||||||
else: # got line
|
else: # got line
|
||||||
if len(self._vis_values) == 0:
|
if len(self._vis_values) == 0:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user