void Packet::calcOverhead(uint8_t arr[], const uint8_t &len) Description: ------------ * Calculates the COBS (Consistent Overhead Stuffing) Overhead byte and stores it in the class's overheadByte variable. This variable holds the byte position (within the payload) of the first payload byte equal to that of START_BYTE Inputs: ------- * uint8_t arr[] - Array of values the over
| 319 | * void |
| 320 | */ |
| 321 | void Packet::calcOverhead(uint8_t arr[], const uint8_t& len) |
| 322 | { |
| 323 | overheadByte = 0xFF; |
| 324 | |
| 325 | for (uint8_t i = 0; i < len; i++) |
| 326 | { |
| 327 | if (arr[i] == START_BYTE) |
| 328 | { |
| 329 | overheadByte = i; |
| 330 | break; |
| 331 | } |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | |
| 336 | /* |
nothing calls this directly
no outgoing calls
no test coverage detected