diff --git a/dump1090.c b/dump1090.c index 60882fc..9e54e97 100644 --- a/dump1090.c +++ b/dump1090.c @@ -29,6 +29,7 @@ // #include "coaa.h" #include "dump1090.h" +struct stModes Modes; struct stDF tDF; // // ============================= Utility functions ========================== // diff --git a/dump1090.h b/dump1090.h index 9ad4de0..6fc5470 100644 --- a/dump1090.h +++ b/dump1090.h @@ -235,10 +235,10 @@ struct stDF { uint64_t llTimestamp; // Timestamp at which the this packet was received uint32_t addr; // Timestamp at which the this packet was received unsigned char msg[MODES_LONG_MSG_BYTES]; // the binary -} tDF; +}; // Program global state -struct { // Internal state +struct stModes { // Internal state pthread_t reader_thread; pthread_mutex_t data_mutex; // Mutex to synchronize buffer access @@ -370,7 +370,8 @@ struct { // Internal state unsigned int stat_blocks_processed; unsigned int stat_blocks_dropped; -} Modes; +}; +extern struct stModes Modes; extern struct stDF tDF; // The struct we use to store information about a decoded message. struct modesMessage { diff --git a/view1090.c b/view1090.c index 0b9b8b9..75e53e1 100644 --- a/view1090.c +++ b/view1090.c @@ -29,6 +29,7 @@ // #include "coaa.h" #include "view1090.h" +struct stModes Modes; struct stDF tDF; // // ============================= Utility functions ========================== //