Commit 81b2cde5 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev
Browse files

minor changes

parent aa3192c4
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -141,16 +141,18 @@ print("TRIG PERIOD = "+str(trig_period)+" us")
#subprocess.call(cmd,shell=True)
#subprocess.call(cmd,shell=True)


#
#
# First set the buffer size and mmap
# First set the buffer size and mmap once
#
#
for i in sensors:
for i in sensors:
  size = BUF_SIZE
  size = BUF_SIZE
  set_sbuf_size(i,size)
  set_sbuf_size(i,size)
  if MMAP_DATA:
  if MMAP_DATA:
    print("mmap buffer "+str(i))
    mmap_data.append(mmap_pixel_array(i,BUF_SIZE*PAGE_SIZE))
    mmap_data.append(mmap_pixel_array(i,BUF_SIZE*PAGE_SIZE))


#
#
# Get pixel data to from fpga(=video) memory to system memory
# Get pixel data to from fpga(=video) memory to system memory
# repeat if needed
#
#
for i in sensors:
for i in sensors:


@@ -170,6 +172,11 @@ for i in sensors:
  #ts = get_timestamp_from_meta(i,0)
  #ts = get_timestamp_from_meta(i,0)
  #print("    timestamp: "+ts)
  #print("    timestamp: "+ts)



#
# Save/print after all needed ports are done
#
for i in sensors:
  if MMAP_DATA:
  if MMAP_DATA:
    # print the first 16 bytes for test purposes
    # print the first 16 bytes for test purposes
    print("test output: " +" ".join("{:02x}".format(get_byte(mmap_data[i],c)) for c in range(16)))
    print("test output: " +" ".join("{:02x}".format(get_byte(mmap_data[i],c)) for c in range(16)))
@@ -177,7 +184,6 @@ for i in sensors:
  else:
  else:
    save_pixel_array(i,"/tmp/port"+str(i)+".raw")
    save_pixel_array(i,"/tmp/port"+str(i)+".raw")



# Restore trigger
# Restore trigger
#print("Restore trigger")
#print("Restore trigger")
#cmd = "wget -qO- 'http://127.0.0.1/parsedit.php?sensor_port="+str(trig_master)+"&immediate&TRIG_PERIOD="+str(trig_period)+"*1' &> /dev/null"
#cmd = "wget -qO- 'http://127.0.0.1/parsedit.php?sensor_port="+str(trig_master)+"&immediate&TRIG_PERIOD="+str(trig_period)+"*1' &> /dev/null"