Put ais_charset in its own file to make building commb tests a little easier
This commit is contained in:
parent
74d7ead41b
commit
1b5b0dfa03
6
Makefile
6
Makefile
|
@ -44,13 +44,13 @@ all: dump1090 view1090
|
||||||
%.o: %.c *.h
|
%.o: %.c *.h
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o demod_2400.o stats.o cpr.o icao_filter.o track.o util.o convert.o sdr_ifile.o sdr.o $(SDR_OBJ) $(COMPAT)
|
dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o demod_2400.o stats.o cpr.o icao_filter.o track.o util.o convert.o sdr_ifile.o sdr.o ais_charset.o $(SDR_OBJ) $(COMPAT)
|
||||||
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_SDR) -lncurses
|
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_SDR) -lncurses
|
||||||
|
|
||||||
view1090: view1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o $(COMPAT)
|
view1090: view1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o ais_charset.o $(COMPAT)
|
||||||
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS) -lncurses
|
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS) -lncurses
|
||||||
|
|
||||||
faup1090: faup1090.o anet.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o $(COMPAT)
|
faup1090: faup1090.o anet.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o ais_charset.o $(COMPAT)
|
||||||
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS)
|
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
3
ais_charset.c
Normal file
3
ais_charset.c
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#include "ais_charset.h"
|
||||||
|
|
||||||
|
char ais_charset[64] = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ !\"#$%&'()*+,-./0123456789:;<=>?";
|
6
ais_charset.h
Normal file
6
ais_charset.h
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef AIS_CHARSET_H
|
||||||
|
#define AIS_CHARSET_H
|
||||||
|
|
||||||
|
extern char ais_charset[64];
|
||||||
|
|
||||||
|
#endif
|
1
comm_b.c
1
comm_b.c
|
@ -19,6 +19,7 @@
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include "dump1090.h"
|
#include "dump1090.h"
|
||||||
|
#include "ais_charset.h"
|
||||||
|
|
||||||
typedef int (*CommBDecoderFn)(struct modesMessage *,bool);
|
typedef int (*CommBDecoderFn)(struct modesMessage *,bool);
|
||||||
|
|
||||||
|
|
3
mode_s.c
3
mode_s.c
|
@ -49,6 +49,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include "dump1090.h"
|
#include "dump1090.h"
|
||||||
|
#include "ais_charset.h"
|
||||||
|
|
||||||
/* for PRIX64 */
|
/* for PRIX64 */
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
@ -382,8 +383,6 @@ int scoreModesMessage(unsigned char *msg, int validbits)
|
||||||
|
|
||||||
static void decodeExtendedSquitter(struct modesMessage *mm);
|
static void decodeExtendedSquitter(struct modesMessage *mm);
|
||||||
|
|
||||||
char ais_charset[64] = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ !\"#$%&'()*+,-./0123456789:;<=>?";
|
|
||||||
|
|
||||||
// return 0 if all OK
|
// return 0 if all OK
|
||||||
// -1: message might be valid, but we couldn't validate the CRC against a known ICAO
|
// -1: message might be valid, but we couldn't validate the CRC against a known ICAO
|
||||||
// -2: bad message or unrepairable CRC error
|
// -2: bad message or unrepairable CRC error
|
||||||
|
|
Loading…
Reference in a new issue