Skip to content

Commit

Permalink
Add unpacking case for datagram
Browse files Browse the repository at this point in the history
  • Loading branch information
Leg3ndary committed Nov 2, 2024
1 parent 4515cb3 commit b42507f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions projects/bootloader/src/can_datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ BootloaderDatagram_t unpack_datagram(Boot_CanMessage *msg, uint16_t *target_node
*target_nodes = msg->data_u16[0];
break;
case CAN_ARBITRATION_PING:

ret_datagram.payload.jump_app.node_ids = msg->data_u16[0];
ret_datagram.payload.
break;
ret_datagram.payload.ping.node_ids = msg->data_u16[0];
*target_nodes = msg->data_u16[0];
ret_datagram.payload.ping.req = msg->data_u8[1];
ret_datagram.payload.ping.data_len = ((uint32_t)msg->data_u16[2] << 16) | (uint32_t)msg->data_u16[1]; // Combine the two 16 bit values into a 32 bit value
break;

default:
break;
Expand Down

0 comments on commit b42507f

Please sign in to comment.