Fix --mlat --raw stdout formatting on big-endian systems.
This commit is contained in:
parent
4d697ac61d
commit
0bd897cad1
11
mode_s.c
11
mode_s.c
|
@ -49,6 +49,10 @@
|
|||
|
||||
|
||||
#include "dump1090.h"
|
||||
|
||||
/* for PRIX64 */
|
||||
#include <inttypes.h>
|
||||
|
||||
//
|
||||
// ===================== Mode S detection and decoding ===================
|
||||
//
|
||||
|
@ -1058,7 +1062,6 @@ static void displayCommB(struct modesMessage *mm)
|
|||
|
||||
void displayModesMessage(struct modesMessage *mm) {
|
||||
int j;
|
||||
unsigned char * pTimeStamp;
|
||||
|
||||
// Handle only addresses mode first.
|
||||
if (Modes.onlyaddr) {
|
||||
|
@ -1068,11 +1071,7 @@ void displayModesMessage(struct modesMessage *mm) {
|
|||
|
||||
// Show the raw message.
|
||||
if (Modes.mlat && mm->timestampMsg) {
|
||||
printf("@");
|
||||
pTimeStamp = (unsigned char *) &mm->timestampMsg;
|
||||
for (j=5; j>=0;j--) {
|
||||
printf("%02X",pTimeStamp[j]);
|
||||
}
|
||||
printf("@%012" PRIX64, mm->timestampMsg);
|
||||
} else
|
||||
printf("*");
|
||||
|
||||
|
|
Loading…
Reference in a new issue