![]() |
Putdata(&txdata)
Do I need to call Putdata(&txdata); everytime I want a PWM value (1-7) to move the motor? and can I call it anytime it changes or are there specific times i can only call it?
I have various loops inside the autonomous loop Here is a small one Code:
while (movefoward = 1) |
Re: Putdata(&txdata)
Quote:
|
Re: Putdata(&txdata)
I dont know really, I thought I would just put it there to keep the same value just incase.
|
Re: Putdata(&txdata)
while (movefoward = 1)
this is an infinite loop! you want while(moveforward == 1). "==" checks for equality. "=" assigns a variable. I belive you have to call PutData all the time, it lets the master processor know the user processor is still alive. Someone who knows more about the IFI stuff can tell you for sure. I would call it every loop. Edit: Call the PutData function once per loop. So, you have Code:
void User_Autonomous_Code(void) |
Re: Putdata(&txdata)
Oh, alright... that is going to require a lot of code editing then -_- thanks for finding that error on the assignment I forgot about that.
|
| All times are GMT -5. The time now is 04:38. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi