#!/usr/bin/python
from __future__ import division
import struct
import serdecode
import math

outfile = open("softscope.fifo", "w")

serdecode.resync()

while True:
    s = serdecode.read_frame()
    
    (pos, power, maximum,minimum) = struct.unpack("=hhhh", s)
    outfile.write(struct.pack("=ffff", pos, power, maximum, minimum))
    outfile.flush()

outfile.close()

9929a34838b9409cd3517a063bf0af709ece50c0
<mask token>

<mask token>
serdecode.resync()
while True:
    s = serdecode.read_frame()
    pos, power, maximum, minimum = struct.unpack('=hhhh', s)
    outfile.write(struct.pack('=ffff', pos, power, maximum, minimum))
    outfile.flush()
outfile.close()

<mask token>
outfile = open('softscope.fifo', 'w')
serdecode.resync()
while True:
    s = serdecode.read_frame()
    pos, power, maximum, minimum = struct.unpack('=hhhh', s)
    outfile.write(struct.pack('=ffff', pos, power, maximum, minimum))
    outfile.flush()
outfile.close()

from __future__ import division
import struct
import serdecode
import math
outfile = open('softscope.fifo', 'w')
serdecode.resync()
while True:
    s = serdecode.read_frame()
    pos, power, maximum, minimum = struct.unpack('=hhhh', s)
    outfile.write(struct.pack('=ffff', pos, power, maximum, minimum))
    outfile.flush()
outfile.close()

#!/usr/bin/python
from __future__ import division
import struct
import serdecode
import math

outfile = open("softscope.fifo", "w")

serdecode.resync()

while True:
    s = serdecode.read_frame()
    
    (pos, power, maximum,minimum) = struct.unpack("=hhhh", s)
    outfile.write(struct.pack("=ffff", pos, power, maximum, minimum))
    outfile.flush()

outfile.close()
