Publish V1.08.2302.14
Final tidy up and publish
This commit is contained in:
parent
260b955f47
commit
97c7f69c83
BIN
coaa1090.obj
BIN
coaa1090.obj
Binary file not shown.
|
@ -254,8 +254,6 @@ void rtlsdrCallback(unsigned char *buf, uint32_t len, void *ctx) {
|
||||||
// Lock the data buffer variables before accessing them
|
// Lock the data buffer variables before accessing them
|
||||||
pthread_mutex_lock(&Modes.data_mutex);
|
pthread_mutex_lock(&Modes.data_mutex);
|
||||||
|
|
||||||
rtlsdrStats(buf);
|
|
||||||
|
|
||||||
Modes.iDataIn &= (MODES_ASYNC_BUF_NUMBER-1); // Just incase!!!
|
Modes.iDataIn &= (MODES_ASYNC_BUF_NUMBER-1); // Just incase!!!
|
||||||
|
|
||||||
// Get the system time for this block
|
// Get the system time for this block
|
||||||
|
@ -642,7 +640,6 @@ int main(int argc, char **argv) {
|
||||||
// If we lost some blocks, correct the timestamp
|
// If we lost some blocks, correct the timestamp
|
||||||
if (Modes.iDataLost) {
|
if (Modes.iDataLost) {
|
||||||
Modes.timestampBlk += (MODES_ASYNC_BUF_SAMPLES * 6 * Modes.iDataLost);
|
Modes.timestampBlk += (MODES_ASYNC_BUF_SAMPLES * 6 * Modes.iDataLost);
|
||||||
uRtlLost+= Modes.iDataLost;
|
|
||||||
Modes.iDataLost = 0;
|
Modes.iDataLost = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
dump1090.h
10
dump1090.h
|
@ -37,7 +37,7 @@
|
||||||
// MinorVer changes when additional features are added, but not for bug fixes (range 00-99)
|
// MinorVer changes when additional features are added, but not for bug fixes (range 00-99)
|
||||||
// DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update
|
// DayDate & Year changes for all changes, including for bug fixes. It represent the release date of the update
|
||||||
//
|
//
|
||||||
#define MODES_DUMP1090_VERSION "1.07.2202.14"
|
#define MODES_DUMP1090_VERSION "1.08.2302.14"
|
||||||
|
|
||||||
// ============================= Include files ==========================
|
// ============================= Include files ==========================
|
||||||
|
|
||||||
|
@ -230,10 +230,10 @@ struct { // Internal state
|
||||||
pthread_cond_t data_cond; // Conditional variable associated
|
pthread_cond_t data_cond; // Conditional variable associated
|
||||||
uint16_t *pData [MODES_ASYNC_BUF_NUMBER]; // Raw IQ sample buffers from RTL
|
uint16_t *pData [MODES_ASYNC_BUF_NUMBER]; // Raw IQ sample buffers from RTL
|
||||||
struct timeb stSystemTimeRTL[MODES_ASYNC_BUF_NUMBER]; // System time when RTL passed us this block
|
struct timeb stSystemTimeRTL[MODES_ASYNC_BUF_NUMBER]; // System time when RTL passed us this block
|
||||||
int iDataIn; // Fifo input pointer
|
int iDataIn; // Fifo input pointer
|
||||||
int iDataOut; // Fifo output pointer
|
int iDataOut; // Fifo output pointer
|
||||||
int iDataReady; // Fifo content count
|
int iDataReady; // Fifo content count
|
||||||
int iDataLost; // Count of missed buffers
|
int iDataLost; // Count of missed buffers
|
||||||
|
|
||||||
uint16_t *pFileData; // Raw IQ samples buffer (from a File)
|
uint16_t *pFileData; // Raw IQ samples buffer (from a File)
|
||||||
uint16_t *magnitude; // Magnitude vector
|
uint16_t *magnitude; // Magnitude vector
|
||||||
|
|
|
@ -21,7 +21,7 @@ all: dump1090
|
||||||
$(CC) $(CFLAGS) $(EXTRACFLAGS) -c $<
|
$(CC) $(CFLAGS) $(EXTRACFLAGS) -c $<
|
||||||
|
|
||||||
dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o
|
dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o
|
||||||
$(CC) -g -o dump1090 dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o $(LIBS)
|
$(CC) -g -o dump1090 dump1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o $(LIBS) $(LDFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o dump1090
|
rm -f *.o dump1090
|
||||||
|
|
|
@ -21,7 +21,7 @@ all: ppup1090
|
||||||
$(CC) $(CFLAGS) $(EXTRACFLAGS) -c $<
|
$(CC) $(CFLAGS) $(EXTRACFLAGS) -c $<
|
||||||
|
|
||||||
ppup1090: ppup1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o
|
ppup1090: ppup1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o
|
||||||
$(CC) -g -o ppup1090 ppup1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o coaa1090.obj $(LIBS)
|
$(CC) -g -o ppup1090 ppup1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o coaa1090.obj $(LIBS) $(LDFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o ppup1090
|
rm -f *.o ppup1090
|
||||||
|
|
|
@ -21,7 +21,7 @@ all: view1090
|
||||||
$(CC) $(CFLAGS) $(EXTRACFLAGS) -c $<
|
$(CC) $(CFLAGS) $(EXTRACFLAGS) -c $<
|
||||||
|
|
||||||
view1090: view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o
|
view1090: view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o
|
||||||
$(CC) -g -o view1090 view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o $(LIBS)
|
$(CC) -g -o view1090 view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o $(LIBS) $(LDFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o view1090
|
rm -f *.o view1090
|
||||||
|
|
21
net_io.c
21
net_io.c
|
@ -146,7 +146,7 @@ void modesFreeClient(int fd) {
|
||||||
if (Modes.debug & MODES_DEBUG_NET)
|
if (Modes.debug & MODES_DEBUG_NET)
|
||||||
printf("Closing client %d\n", fd);
|
printf("Closing client %d\n", fd);
|
||||||
|
|
||||||
// If this was our maxfd, scan the clients array to find the new max.
|
// If this was our maxfd, scan the clients array to find trhe new max.
|
||||||
// Note that we are sure there is no active fd greater than the closed
|
// Note that we are sure there is no active fd greater than the closed
|
||||||
// fd, so we scan from fd-1 to 0.
|
// fd, so we scan from fd-1 to 0.
|
||||||
if (Modes.maxfd == fd) {
|
if (Modes.maxfd == fd) {
|
||||||
|
@ -155,8 +155,8 @@ void modesFreeClient(int fd) {
|
||||||
Modes.maxfd = -1;
|
Modes.maxfd = -1;
|
||||||
for (j = fd-1; j >= 0; j--) {
|
for (j = fd-1; j >= 0; j--) {
|
||||||
if (Modes.clients[j]) {
|
if (Modes.clients[j]) {
|
||||||
Modes.maxfd = j;
|
Modes.maxfd = j;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,7 @@ void modesSendBeastOutput(struct modesMessage *mm) {
|
||||||
char * pTimeStamp;
|
char * pTimeStamp;
|
||||||
char ch;
|
char ch;
|
||||||
int j;
|
int j;
|
||||||
int iOutLen = msgLen + 9; // Escape, message type, timestamp, sigLevel and msg
|
int iOutLen = msgLen + 9; // Escape, msgtype, timestamp, sigLevel, msg
|
||||||
|
|
||||||
*p++ = 0x1a;
|
*p++ = 0x1a;
|
||||||
if (msgLen == MODES_SHORT_MSG_BYTES)
|
if (msgLen == MODES_SHORT_MSG_BYTES)
|
||||||
|
@ -434,7 +434,7 @@ void modesQueueOutput(struct modesMessage *mm) {
|
||||||
// case where we want broken messages here to close the client connection.
|
// case where we want broken messages here to close the client connection.
|
||||||
//
|
//
|
||||||
int decodeBinMessage(struct client *c, char *p) {
|
int decodeBinMessage(struct client *c, char *p) {
|
||||||
int msgLen = 0;
|
int msgLen = 0;
|
||||||
int j;
|
int j;
|
||||||
char ch;
|
char ch;
|
||||||
unsigned char msg[MODES_LONG_MSG_BYTES];
|
unsigned char msg[MODES_LONG_MSG_BYTES];
|
||||||
|
@ -455,16 +455,17 @@ int decodeBinMessage(struct client *c, char *p) {
|
||||||
// pass them off as being received by this instance when forwarding them
|
// pass them off as being received by this instance when forwarding them
|
||||||
mm.remote = 1;
|
mm.remote = 1;
|
||||||
for (j = 0; j < 7; j++) { // Skip the message type and timestamp
|
for (j = 0; j < 7; j++) { // Skip the message type and timestamp
|
||||||
ch = *p++;
|
ch = *p++;
|
||||||
if (0x1A == ch) {p++;}
|
if (0x1A == ch) {p++;}
|
||||||
}
|
}
|
||||||
|
|
||||||
mm.signalLevel = ch = *p++; // Grab the signal level
|
mm.signalLevel = ch = *p++; // Grab the signal level
|
||||||
if (0x1A == ch) {p++;}
|
if (0x1A == ch) {p++;}
|
||||||
|
|
||||||
for (j = 0; j < msgLen; j++) { // and the data
|
for (j = 0; j < msgLen; j++) { // and the data
|
||||||
msg[j] = ch = *p++;
|
msg[j] = ch = *p++;
|
||||||
if (0x1A == ch) {p++;}
|
if (0x1A == ch) {p++;}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msgLen == MODEAC_MSG_BYTES) { // ModeA or ModeC
|
if (msgLen == MODEAC_MSG_BYTES) { // ModeA or ModeC
|
||||||
decodeModeAMessage(&mm, ((msg[0] << 8) | msg[1]));
|
decodeModeAMessage(&mm, ((msg[0] << 8) | msg[1]));
|
||||||
|
|
Loading…
Reference in a new issue