why must concrete and new line chars be so cold!

I just spent 2 hours debugging source code on why my motor controller wasn't responding to my source code.  My butt and other tidbits are a bit cold.

Here is something I find messed up.  I'm not sure if it is literally .Net's fault or the speed controllers.

com.WriteLine(temp + string.Format("{0:X2}", PowerRating));

Now that LOOKS like a new line SHOULD be appended on, right?  I mean, WriteLine, it to me implies, IT WILL write a line.  There is Write too.

Nope.  Doing this worked.

com.WriteLine(temp + string.Format("{0:X2}", PowerRating) + Environment.NewLine);

FYI:  the variable temp is a combination of ! and a "A" or "a", "B" or "b" depending on what direction and motor I want.

No comments posted yet.

Post a Comment

Please add 2 and 6 and type the answer here: