Strtok with different delimiters

yes - you use it when you have positioned the strtokIndx pointer at the right location of course.

if you use a uint16_t (keep the absolute value) then use

message.RSSI = -strtol(strtokIndx, nullptr, 10);

(depending on the maths you do, if memory is limited, store as a uint8_t and then just be careful to do the maths in larger containers if needed)

1 Like