Compare commits
18 Commits
old_master
...
c33ad367f3
| Author | SHA1 | Date | |
|---|---|---|---|
| c33ad367f3 | |||
| f0f8e4e6e6 | |||
| 6b2beafc86 | |||
| 196c872093 | |||
| e4194a8afa | |||
| a1e3b7c2eb | |||
| ea4cc6d28d | |||
| 32cbb041b8 | |||
| aff8a37a74 | |||
| f47ecb1014 | |||
| 6c47f30990 | |||
| dda7ed6db8 | |||
| 4678ff1690 | |||
| fc3fdb92ee | |||
| 04015fb4cb | |||
| f978759ae0 | |||
| b6cb8aae5e | |||
| c1396542ab |
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +0,0 @@
|
||||
*.csv
|
||||
*.tmp
|
||||
build
|
||||
BF_companion
|
||||
BIN
BF_companion
Executable file
BIN
BF_companion
Executable file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/devs/e502/e502api.o
Normal file
BIN
build/lib/x502api-1.1.34/devs/e502/e502api.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/devs/e502/e502api_dnssd.o
Normal file
BIN
build/lib/x502api-1.1.34/devs/e502/e502api_dnssd.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/devs/e502/e502api_eth_config.o
Normal file
BIN
build/lib/x502api-1.1.34/devs/e502/e502api_eth_config.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/devs/e502/e502api_tcp.o
Normal file
BIN
build/lib/x502api-1.1.34/devs/e502/e502api_tcp.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/devs/e502/e502api_usb.o
Normal file
BIN
build/lib/x502api-1.1.34/devs/e502/e502api_usb.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/devs/l502/l502api.o
Normal file
BIN
build/lib/x502api-1.1.34/devs/l502/l502api.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/devs/l502/l502api_bf.o
Normal file
BIN
build/lib/x502api-1.1.34/devs/l502/l502api_bf.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/devs/l502/l502api_compat.o
Normal file
BIN
build/lib/x502api-1.1.34/devs/l502/l502api_compat.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/devs/l502/l502api_eeprom.o
Normal file
BIN
build/lib/x502api-1.1.34/devs/l502/l502api_eeprom.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/devs/l502/linux/l502_spec.o
Normal file
BIN
build/lib/x502api-1.1.34/devs/l502/linux/l502_spec.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/lib/crc/fast_crc.o
Normal file
BIN
build/lib/x502api-1.1.34/lib/crc/fast_crc.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/lib/ltimer/ports/linux/lclock.o
Normal file
BIN
build/lib/x502api-1.1.34/lib/ltimer/ports/linux/lclock.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/lib/osspec/osspec.o
Normal file
BIN
build/lib/x502api-1.1.34/lib/osspec/osspec.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/src/x502api.o
Normal file
BIN
build/lib/x502api-1.1.34/src/x502api.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/src/x502api_async.o
Normal file
BIN
build/lib/x502api-1.1.34/src/x502api_async.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/src/x502api_bf.o
Normal file
BIN
build/lib/x502api-1.1.34/src/x502api_bf.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/src/x502api_config.o
Normal file
BIN
build/lib/x502api-1.1.34/src/x502api_config.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/src/x502api_eeprom.o
Normal file
BIN
build/lib/x502api-1.1.34/src/x502api_eeprom.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/src/x502api_errs.o
Normal file
BIN
build/lib/x502api-1.1.34/src/x502api_errs.o
Normal file
Binary file not shown.
BIN
build/lib/x502api-1.1.34/src/x502api_streams.o
Normal file
BIN
build/lib/x502api-1.1.34/src/x502api_streams.o
Normal file
Binary file not shown.
BIN
build/main.o
Normal file
BIN
build/main.o
Normal file
Binary file not shown.
Binary file not shown.
1
l502-BFfirmware0.ldr
Symbolic link
1
l502-BFfirmware0.ldr
Symbolic link
@ -0,0 +1 @@
|
||||
../BFfirmware_0/build/release/bin/l502-BFfirmware0.ldr
|
||||
@ -1,10 +0,0 @@
|
||||
// Default configuration for BF_companion main_state
|
||||
// Format: field value // optional comment
|
||||
|
||||
run_mode INF_RUN // TEST | FINITE_RUN | INF_RUN
|
||||
BF_mode FFT // TRANSPARENT | AVG | FFT
|
||||
run_length 50 // milliseconds
|
||||
runs_N 1000 // total runs (used in FINITE_RUN)
|
||||
run_I 0 // starting run index
|
||||
//data_path /home/feda/MIPT/RadioPhotonic_Subserface_radar/Receiver_GUI/data // base directory for output files
|
||||
data_path tmp
|
||||
3
main.c
3
main.c
@ -705,7 +705,7 @@ void receive_to_file(t_x502_hnd hnd, char* logfilename, uint32_t* inp_buff, uint
|
||||
// fprintf(logfile_ptr, "0xFF00000 \n");
|
||||
|
||||
// uint32_t timeout = 100;
|
||||
int32_t recv_Err_code = X502_Recv(hnd, inp_buff, max_total_words, timeout);
|
||||
uint32_t recv_Err_code = X502_Recv(hnd, inp_buff, max_total_words, timeout);
|
||||
printf("receive code: %d\n", recv_Err_code);
|
||||
|
||||
if (recv_Err_code > 0){
|
||||
@ -726,7 +726,6 @@ void receive_to_file(t_x502_hnd hnd, char* logfilename, uint32_t* inp_buff, uint
|
||||
}else if (recv_Err_code == 0){
|
||||
printf("no data received. timeout\n");
|
||||
}else{
|
||||
sleep(1);
|
||||
printf("receive error: %d\n======================\n", recv_Err_code);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Test script to read radar data from named pipe (FIFO)
|
||||
|
||||
This script demonstrates how to read binary data from the named pipe
|
||||
created by the radar acquisition program.
|
||||
"""
|
||||
|
||||
import struct
|
||||
import sys
|
||||
import os
|
||||
|
||||
def read_from_pipe(pipe_path="/tmp/radar_data_pipe"):
|
||||
"""
|
||||
Read uint32_t data from named pipe
|
||||
|
||||
Args:
|
||||
pipe_path: Path to the named pipe (FIFO)
|
||||
"""
|
||||
print(f"Opening pipe: {pipe_path}")
|
||||
print("Waiting for radar data...")
|
||||
|
||||
try:
|
||||
# Open pipe for reading (this will block until writer connects)
|
||||
with open(pipe_path, 'rb') as pipe:
|
||||
print("Connected to pipe! Reading data...")
|
||||
|
||||
word_count = 0
|
||||
while True:
|
||||
# Read 4 bytes (one uint32_t)
|
||||
data = pipe.read(4)
|
||||
|
||||
if not data:
|
||||
print("\nEnd of stream or pipe closed")
|
||||
break
|
||||
|
||||
if len(data) < 4:
|
||||
print(f"\nWarning: incomplete data read ({len(data)} bytes)")
|
||||
break
|
||||
|
||||
# Unpack as uint32_t (little-endian)
|
||||
value = struct.unpack('<I', data)[0]
|
||||
|
||||
# Print first 10 values and then every 1000th value
|
||||
if word_count < 10 or word_count % 1000 == 0:
|
||||
print(f"Word {word_count}: 0x{value:08X} ({value})")
|
||||
|
||||
word_count += 1
|
||||
|
||||
# Optional: process the data here
|
||||
# For example, convert to voltage, apply filters, etc.
|
||||
|
||||
print(f"\nTotal words received: {word_count}")
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("\n\nInterrupted by user")
|
||||
print(f"Total words received: {word_count}")
|
||||
except FileNotFoundError:
|
||||
print(f"Error: Pipe {pipe_path} does not exist")
|
||||
print("Make sure the radar acquisition program is running first")
|
||||
except Exception as e:
|
||||
print(f"Error reading from pipe: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
pipe_path = sys.argv[1] if len(sys.argv) > 1 else "/tmp/radar_data_pipe"
|
||||
read_from_pipe(pipe_path)
|
||||
@ -1,3 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
# sudo mount -t tmpfs -o size=1G tmpfs tmp
|
||||
./BF_companion long_trace_AVG_RPI.cmd
|
||||
sudo mount -t tmpfs -o size=1G tmpfs tmp
|
||||
./BF_companion 100 #should generate approx 500 MB of data by running 10 secs
|
||||
rm tmp/*
|
||||
|
||||
Reference in New Issue
Block a user