The first Serial.print with the ternary condition is what I can't understand.
If the value being printed is < 10 print a '0' before printing the value.
Since the first operation prints a space every iteration regardless of data,
No it doesn't, see previous paragraph. Only ABCDEF hex values will print a space.
Strike that, I just noticed the space in front of the 0.
On the surface that looks like a bug, I think it should print nothing if the value is > 9. But I don't know the context of this function.
EDIT: It seems that all bytes should have a space inserted, as this is an ID being printed maybe the author is relying on knowledge of the constituent byte values to insert spaces to make it more readable, IE he knows that every 4th value is > 10 and all the others are < 10. What are some typical values?
Bugger, I just noticed it's < 0x10 not < 10, don't pay me no mind