Skip to content
Snippets Groups Projects
Commit 84a83bff authored by dawehr's avatar dawehr
Browse files

Realized that uart_sendBytes won't work, because checksum isn't calcualted....

Realized that uart_sendBytes won't work, because checksum isn't calcualted. Reverted to sending single bytes
parent 98262966
No related branches found
No related tags found
No related merge requests found
......@@ -224,11 +224,11 @@ int send_data(u16 type_id, u16 subtype_id, u16 msg_id, char* data, size_t size)
// Compute checksum while sending
unsigned char packet_checksum = 0;
//int i;
int i;
// TODO: Look into uart0_sendBytes and see if it would be better to use
// Send header
uart0_sendBytes(formattedHeader, 7);
/*
//uart0_sendBytes(formattedHeader, 7);
for(i = 0; i < 7; i++) {
packet_checksum ^= formattedHeader[i];
uart0_sendByte(formattedHeader[i]);
......@@ -237,9 +237,8 @@ int send_data(u16 type_id, u16 subtype_id, u16 msg_id, char* data, size_t size)
for (i = 0; i < size; i++) {
packet_checksum ^= data[i];
uart0_sendByte(data[i]);
}*/
// Send data
uart0_sendBytes(data, size);
}
//uart0_sendBytes(data, size);
// Send checksum
uart0_sendByte(packet_checksum);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment