Skip to content

Commit

Permalink
Small fixes as a result of code review with Jamey
Browse files Browse the repository at this point in the history
MPL: Fixed data length in packet being the wrong size
logger: Added timestamp to VERS logging
  • Loading branch information
ThirteenFish committed Jul 20, 2014
1 parent 569f009 commit ae5cb5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/devices/mpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ae5cb5a

Please sign in to comment.