Commit 311024ad authored by Jenda's avatar Jenda

remove display artifacts when more spectrum measurements are sent in one frame

parent c9d1aa3a
......@@ -196,17 +196,18 @@ def fft_cb(d, frameno, timestamp):
wfofs = (wfofs+1)%da_height
d = d[conf.fftw:]
pygame.draw.line(screen, BLACK,
[0, wfofs],
[conf.borderleft + conf.fftw, wfofs])
pygame.draw.line(screen, WHITE,
[0, (wfofs+1)%da_height],
[conf.borderleft + conf.fftw, (wfofs+1)%da_height])
if not lastfft:
lastfft = data
on_fftscale(None) # use the first measurement to at least coarsely adjust the color scheme
lastfft = data
pygame.draw.line(screen, BLACK,
[0, wfofs],
[conf.borderleft + conf.fftw, wfofs])
pygame.draw.line(screen, WHITE,
[0, (wfofs+1)%da_height],
[conf.borderleft + conf.fftw, (wfofs+1)%da_height])
pygame.display.update()
def sql_cb(rotation, decimation):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment