Skip to content

Commit

Permalink
fx n_pci.st parsing in FC
Browse files Browse the repository at this point in the history
  • Loading branch information
devcoons committed Nov 25, 2024
1 parent 0722da9 commit 5bc0614
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib_iso15765.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ inline static n_rslt n_pci_unpack(addr_md mode, n_pdu_t* n_pdu, uint8_t dlc, uin
// Sequential assignments based on protocol, clearly used
n_pdu->n_pci.fs = (uint8_t)(dt[offs] & 0x0FU);
n_pdu->n_pci.bs = dt[1U + offs];
n_pdu->n_pci.st = dt[2U + offs];
n_pdu->n_pci.st = dt[2U + offs] <= 0x7F ? dt[2U + offs] :
((dt[2U + offs]>= 0xF1 && dt[2U + offs]<=0xF9) ? 1 : 100);
n_pdu->sz = dlc - (3U + offs); // Adjust for correct data length calculation
result = N_OK;
break;
Expand Down

0 comments on commit 5bc0614

Please sign in to comment.