Clean and add tests

This commit is contained in:
F5OEO 2018-11-01 16:45:08 +00:00
parent 8a7ba5546d
commit 35d04dcc62
23 changed files with 30 additions and 1703 deletions

BIN
BBC.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -1,6 +1,6 @@
raspistill -w 320 -h 256 -o picture.jpg -t 1
convert -depth 8 picture.jpg picture.rgb
sudo ./pisstv picture.rgb 144.5e6
sudo ./pisstv picture.rgb 434e6

View file

@ -1,4 +1,3 @@
#all: ../rpitx ../pissb ../pisstv ../pifsq ../pifm ../piam ../pidcf77
all: ../pisstv ../piopera ../pifsq ../pichirp ../sendiq ../tune ../freedv ../dvbrf ../pocsag ../spectrumpaint
CFLAGS = -Wall -g -O2 -Wno-unused-variable
@ -66,7 +65,8 @@ LDFLAGS_Pidcf77 = librpitx/src/librpitx.a -lm -lrt -lpthread
$(CC) $(CFLAGS_Piam) -o ../pidcf77 ../dcf77/pidcf77.c $(LDFLAGS_Piam)
clean:
rm -f ../dvbrf ../rpitx ../pissb ../pisstv ../pifsq ../pifm ../piam ../pidcf77 ../pichirp ../tune ../freedv RpiTx.o mailbox.o RpiGpio.o RpiDma.o
rm -f ../dvbrf ../sendiq ../pissb ../pisstv ../pifsq ../pifm ../piam ../pidcf77 ../pichirp ../tune ../freedv ../piopera ../spectrumpaint ../pocsag
install: all
install -m 0755 ../pisstv /usr/bin

File diff suppressed because it is too large Load diff

View file

@ -1,29 +0,0 @@
#ifndef RPITX_H
#define RPITX_H
#include <ctype.h>
int pitx_init(int SampleRate, double TuningFrequency, int* skipSignals,int SetDma);
int pitx_SetTuneFrequencyu(uint32_t Frequency);
#define MODE_IQ 0
#define MODE_RF 1
#define MODE_RFA 2
#define MODE_IQ_FLOAT 3
#define MODE_VFO 4
int pitx_run(
char Mode,
int SampleRate,
float SetFrequency,
float ppmpll,
char NoUsePwmFrequency,
// Wrapper around read to read wav file bytes
ssize_t (*readWrapper)(void *buffer, size_t count),
// Wrapper to reset file for looping
void (*reset)(void),
int* skipSignals,
int SetDma
);
#endif

View file

@ -88,7 +88,8 @@ int _tmain(int argc, _TCHAR* argv[])
{
#endif
int i = 0;
char s1 = 0x00, s2[7] = "";
//char s1 = 0x00;
char s2[7] = "";
switch (argc)
@ -103,7 +104,7 @@ int _tmain(int argc, _TCHAR* argv[])
}
case 4: // 3 arguments
{
s1 = (char)argv[1][0];
//s1 = (char)argv[1][0];
// range check
if (!((argv[1][0] >= '0' && argv[1][0] <= '9') || (argv[1][0] >= 'A' && argv[1][0] <= 'Z') ||
@ -211,7 +212,7 @@ void generate_call(char *call, char *call_coded)
code_sum = code_sum * 27 + chr_norm_opera(call[4]);
code_sum = code_sum * 27 + chr_norm_opera(call[5]);
if (DEBUG) printf("code_sum=%Lu\n", code_sum);
if (DEBUG) printf("code_sum=%lu\n", code_sum);
// merge coded callsign ino a string
call_coded[28] = 0x00;
@ -485,7 +486,7 @@ with the Opera frequency recommendation: */
void print_str(const char * caption, char * code)
//********************************************************************
{ // This is a service function for debugging
int i = 0;
size_t i = 0;
printf("%s\n", caption);
for (i = 0; i < strlen(code); i++)

2
ssb.sh
View file

@ -1,2 +0,0 @@
(while true; do cat sampleaudio.wav; done) | csdr convert_i16_f | csdr fir_interpolate_cc 2| csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo ./sendiq -i /dev/stdin -s 96000 -f 144.1e6 -t float

View file

@ -1,3 +1,5 @@
#COMMAND A BANDPATH FILTER FROM SV1AFN
#GPIO Declaration
if [ -f /sys/class/gpio/gpio26 ]; then

View file

@ -1,3 +1,3 @@
./piam sampleaudio.wav am.rfa
sudo ./rpitx -m RFA -i am.rfa -f 433900 -l
#TODO using the AM mode from librpitx
echo Need to implement

Binary file not shown.

2
testchirp.sh Executable file
View file

@ -0,0 +1,2 @@
sudo ./pichirp 433.8e6 400000 10

View file

@ -1,3 +1,5 @@
./pifm sampleaudio.wav fm.ft
sudo ./rpitx -m RF -i fm.ft -f 89000 -l -a 14 -c 1
#This is only a Narraw Band FM modulator, for FM broadcast modulation , use PiFMRDS
# Need to use a direct FM modulation with librpitx and not using IQ : TODO
echo "If you need to test broadcast FM , use PiFMRDS"
(while true; do cat sampleaudio.wav; done) | csdr convert_i16_f | csdr gain_ff 2500 | sudo ./sendiq -i /dev/stdin -s 24000 -f 434e6 -t float 1

2
testfreedv.sh Executable file
View file

@ -0,0 +1,2 @@
sudo ./freedv src/freedv/VCO800XA.rf 434e6 400

View file

@ -1,2 +1 @@
./pifsq Test testfsq.ft
sudo ./rpitx -m RF -i testfsq.ft -f 7050 -l
sudo ./pifsq "Test" 434e6

View file

@ -1,3 +1,3 @@
sudo ./piopera F5OEO 0.5 144.18e6
sudo ./piopera YOURCALL 0.5 434e6

View file

@ -1 +1 @@
echo -e "1:F5OEO\n2: Hello world" | sudo ./pocsag
echo -e "1:YOURCALL\n1: Hello world" | sudo ./pocsag

2
testspectrum.sh Executable file
View file

@ -0,0 +1,2 @@
convert BBC.jpg -flip -quantize YUV -dither FloydSteinberg -colors 4 -interlace partition picture.yuv
sudo ./spectrumpaint picture.Y 434.0e6 100000

View file

@ -1,3 +1,2 @@
./pissb ./sampleaudio.wav ./ssbIQ.wav
sudo ./rpitx -m IQ -i ./ssbIQ.wav -f 433900 -l
(while true; do cat sampleaudio.wav; done) | csdr convert_i16_f | csdr fir_interpolate_cc 2| csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo ./sendiq -i /dev/stdin -s 96000 -f 434.0e6 -t float

View file

@ -1 +1,2 @@
sudo ./pisstv testcard.rgb 144.5e6
convert -depth 8 BBC.jpg picture.rgb
sudo ./pisstv picture.rgb 434e6

View file

@ -1 +1 @@
sudo ./rpitx -m VFO -f 433900
sudo tune -f 434.0e6

View file

@ -1,2 +1,3 @@
#You need a rtl-sdr dongle in order to run this
rtl_sdr -s 250000 -g 40 -f 107700000 - | sudo ./sendiq -s 250000 -f 434.0e6 -t u8 -i -