Skip to content

Commit

Permalink
add json and network output like acarsdec + warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thierry Leconte committed Jan 26, 2018
1 parent d35eb57 commit 96685a1
Show file tree
Hide file tree
Showing 15 changed files with 3,736 additions and 81 deletions.
13 changes: 7 additions & 6 deletions Makefile.air
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
CFLAGS= -g -pthread -D WITH_AIR -I . `pkg-config --cflags libairspy`
CFLAGS= -Ofast -Wall -pthread -D WITH_AIR -I . `pkg-config --cflags libairspy`
LDLIBS= -lm -pthread `pkg-config --libs libairspy` -lusb-1.0

CC=gcc

all: vdlm2dec

vdlm2dec: main.o air.o d8psk.o vdlm2.o viterbi.o rs.o crc.o out.o outacars.o outxid.o
$(CC) main.o air.o d8psk.o vdlm2.o viterbi.o rs.o crc.o out.o outacars.o outxid.o -o $@ $(LDLIBS)
vdlm2dec: main.o air.o d8psk.o vdlm2.o viterbi.o rs.o crc.o out.o outacars.o label.o outxid.o cJSON.o
$(CC) main.o air.o d8psk.o vdlm2.o viterbi.o rs.o crc.o out.o outacars.o label.o outxid.o cJSON.o -o $@ $(LDLIBS)

outacars.o: outacars.c acars.h crc.h vdlm2.h
outxid.o: outxid.c acars.h vdlm2.h
outacars.o: outacars.c acars.h crc.h vdlm2.h cJSON.h
outxid.o: outxid.c acars.h vdlm2.h cJSON.h
out.o: out.c acars.h vdlm2.h
main.o: main.c vdlm2.h
d8psk.o: d8psk.c d8psk.h vdlm2.h
vdlm2.o: vdlm2.c vdlm2.h acars.h crc.h
viterbi.o: viterbi.c vdlm2.h
air.o: air.c vdlm2.h

cJSON.o: cJSON.c cJSON.h
label.o: label.c

clean:
@rm -f *.o vdlm2dec
13 changes: 7 additions & 6 deletions Makefile.rtl
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
CFLAGS= -Ofast -pthread -D WITH_RTL -I /usr/local/include/librtlsdr
CFLAGS= -Ofast -Wall -pthread -D WITH_RTL -I /usr/local/include/librtlsdr
LDLIBS= -lm -pthread -lusb-1.0 -L/usr/local/lib -lrtlsdr -lrt

CC=gcc

all: vdlm2dec

vdlm2dec: main.o rtl.o d8psk.o vdlm2.o viterbi.o rs.o crc.o out.o outacars.o outxid.o
$(CC) main.o rtl.o d8psk.o vdlm2.o viterbi.o rs.o crc.o out.o outacars.o outxid.o -o $@ $(LDLIBS)
vdlm2dec: main.o rtl.o d8psk.o vdlm2.o viterbi.o rs.o crc.o out.o outacars.o label.o outxid.o cJSON.o
$(CC) main.o rtl.o d8psk.o vdlm2.o viterbi.o rs.o crc.o out.o outacars.o label.o outxid.o cJSON.o -o $@ $(LDLIBS)

outacars.o: outacars.c acars.h crc.h vdlm2.h
outxid.o: outxid.c acars.h vdlm2.h
outacars.o: outacars.c acars.h crc.h vdlm2.h cJSON.h
outxid.o: outxid.c acars.h vdlm2.h cJSON.h
out.o: out.c acars.h vdlm2.h
main.o: main.c vdlm2.h
d8psk.o: d8psk.c d8psk.h vdlm2.h
vdlm2.o: vdlm2.c vdlm2.h acars.h crc.h
viterbi.o: viterbi.c vdlm2.h
rtl.o: rtl.c vdlm2.h

cJSON.o: cJSON.c cJSON.h
label.o: label.c

clean:
@rm -f *.o vdlm2dec
4 changes: 2 additions & 2 deletions acars.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
typedef struct {
char mode;
char reg[8];
char addr[8];
char ack;
char label[3];
char bid;
Expand All @@ -38,4 +38,4 @@ typedef struct {
char won[5];
} oooi_t;

extern void outacars(unsigned char *txt, int len);
extern void outacars(msgblk_t * blk,unsigned char *txt, int len);
2 changes: 1 addition & 1 deletion air.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static unsigned int chooseFc(unsigned int *Fd, const unsigned int nbch)

int initAirspy(char **argv, int optind, thread_param_t * param)
{
int r, n;
int n;
char *argF;
unsigned int F0;
unsigned int Fd[MAXNBCHANNELS];
Expand Down
Loading

0 comments on commit 96685a1

Please sign in to comment.