Quote:
Originally Posted by Eric Finn
I recall something about only being able to set speed controllers every (5 or 10, not sure exactly how many) milliseconds. I'm not sure if the Set method will prevent you from setting a motor speed too often, or if that is handled in the FPGA. If this is handled in the Set method, then this should work where the code you showed us didn't.
|
I'm an idiot.
Obvious logic problem with the second logic block, which will stop the motor via the else clause because only one trigger was pushed, at a time. And you get the results I was seeing. One trigger works. As a side note, I had already changed to code to something similar to what you proposed, and it does indeed work because it removes the logic flaw, and has nothing to do with the frequency of the call to the set method. Although, now I'm curious about timing issues with the OperatorControl() function. Do you need to control update rates?
And to byteit101, I'm aware that there are several methods, no pun intended, for declaring and allocating variables. One is allocated on the stack, the other is a pointer and is allocated in memory. Either method works just fine.