diff --git a/src/devices/mpl.c b/src/devices/mpl.c index 3758eb9..d9a7c54 100644 --- a/src/devices/mpl.c +++ b/src/devices/mpl.c @@ -10,7 +10,7 @@ void mpl_raw_in(unsigned char *buffer, unsigned int len, unsigned char* timestam .timestamp={(uint8_t)timestamp[0], (uint8_t)timestamp[1], (uint8_t)timestamp[2], (uint8_t)timestamp[3], (uint8_t)timestamp[4], (uint8_t)timestamp[5]}, - .data_length=htonl(len) + .data_length=htons(len) }; memcpy(&packet.data, buffer, len); diff --git a/src/logger.c b/src/logger.c index 12e67b5..1cba6cd 100644 --- a/src/logger.c +++ b/src/logger.c @@ -241,10 +241,10 @@ void log_receive_rnh_version(uint8_t * message, unsigned int length){ struct VERSMessage vers = { .header = { .ID = {"VERS"}, - .timestamp = {0}, .data_length = length } }; + get_psas_time(vers.header.timestamp); memcpy(vers.data, message, length); logg(&vers, sizeof(message_header) + length); }