Your debugging will go much better if you print out the key values so you can see when they leave the tracks and deduce what is driving it.
It looks like there is an awful lot of integer arithmetic going on inside that big expression calculating pos1. You might find it works better if you make all the constants and variables participating in that calculation floating point. Put ".0" after the integer-looking constants, at least.
This would be a good place to use an "array of structs".
A struct is a collection of variables that you can treat as a unit. You could use a struct to represent a channel, with a byte for the channel id, a char* for the name, a float for the value, and so on.
You could then set up a (constant) array of these structs to represent your list of channels. A particular channel would be specified by the index into the array, a small integer to select the channel.
Then you can simplify your code by replacing all the lengthy per-channel setups with a call to a single function, passing the struct index for the desired channel, that would set up the desired properties like the per-channel setups do now.
I don't see your bug yet, unless you send more than 10 characters between angle brackets.
But there is a bug in such a case: if you send more than 9 characters you'll overflow the inData buffer and overwrite index, which is the sort of thing that can lead to the weird behavior you're seeing.
It's best to check to see if there's room in a buffer before adding a character to it.