oh, yeah, I guess we both concur then
I agree with your statement.
What the heck was all that about then? You guys agreed to agree
haha I agree!
I am just going to keep them the same speeds and be done with it because I am only transferring about ~200 bytes once on every powerup and thats it.
PS everyone check out @Mr_John_Smith new dSpin stepper driver its pretty lit
Yes, I agree that we agreed to agree.
It would be interesting to see if everything is OK at 300KHZ, the minimum maximum speed of the devices.
While I have all of your attentions, how can I display 00.00 to my screen… been using double.ToString(“F”) which works great until the number being printed is a 0 because then it is printed as 0.00 which looks weird. The user needs to know that the 4th digit is still there to move the cursor over
I’ll run it at 300 just to appease your curiosity.
Would not 3.0 also give same problem?
double x = 0.00;
string ts = x.ToString(“F”);
if (ts.Length == 4) ts = “0” + ts;
I tried all these different format specifiers but none of them were supported. Also I would love to see all of the format specifiers that are supported if anyone knows where they are.
This works though:
double zero = 0.0; string intermediate = zero.ToString("F2"); string result = "0" + intermediate; Debug.Print(result);
So if you like this workaround you may want to consider StringBuilder if it’s an option. I never work with strings but apparently they can slow down performance when not concatenating with StringBuilder.
You would have to decide how to handle negatives and what the range of possible values is.
I’m imaging it could be -9.99 through 99.99 and if a value is > 0. AND < 10.0 then you tack on a leading 0.
EDIT: or test for length… Mike’s got the better idea.
Thanks guys, I was thinking the same thing but wasn’t sure if maybe someone new of a format specifier that would account for this. And yes Mike you are right, 3.0 and such gives the same problem I don’t know why I said it was just 0