View Single Post
Old 09-25-2015, 05:03 PM   #2079 (permalink)
e*clipse
Permanent Apprentice
 
Join Date: Jul 2010
Location: norcal oosae
Posts: 523
Thanks: 351
Thanked 314 Times in 215 Posts
Thanks a bunch Paul!

With "VV" I was just trying to point down. Sorry for the confusion.

Quote:
That's exactly what it does. Isn't it neat that they thought of just such emergencies?

You got that stuff! For an unsigned int, 65535 + n = n - 1. It's modulo 65536 arithmetic. For example:
34059 + 59412 = 93471 MOD 65536 = 93471 - 65536 = 27935.
Ohhhh! That's very smart! Now I see the point of that.... d'Oh!

I'm also trying to focus on what's important (regarding angle, time, etc - not sanity LOL!) I think for this application neither are actually important. I mean, time's important if you need speed information, but you really don't. Also the specific angle isn't really important, just the relative angles ( previous position, next position, clocking of phases ) We don't really need specific angles because no one, even F1 drivers, cares about the exact rotary position of their tires. They should just be rotating, not dragging on the road. If we were controlling CNC lathes, that's a whole other can o' worms...

I like your use of global variables - that also make a lot of sense.

Thanks a bunch! I guess I'll go make some coffee!

E*clipse
  Reply With Quote
The Following User Says Thank You to e*clipse For This Useful Post:
thingstodo (09-26-2015)