|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Odd math issues
Our current robot has the following function in it which adjusts the desired orientation of one of our joints based upon the joystick:
Code:
void Waist(void) {
long delta;
if(p1_wheel>147) {
delta=-1L;
}
if(p1_wheel<107) {
delta=1L;
}
waist_theta-= delta;
}
Despite this, somehow the value of waist_theta is sporadically jumping instantly to a large negative number. Any ideas? I'm suspecting some unusual type conversion issue. |
|
#2
|
||||||
|
||||||
|
Re: Odd math issues
I would tend to guess your problem is in an interrupt routine. Are you saving all the appropriate sections?
Read this post for more details: http://www.chiefdelphi.com/forums/sh...ad.php?t=44046 |
|
#3
|
||||
|
||||
|
Re: Odd math issues
Quote:
We simplified the routine and it seems to be working now, however. I'll dig into this more when we get back from the CT scrimmage. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Odd Reincarnation | Eugenia Gabrielov | Chit-Chat | 30 | 21-08-2004 00:21 |
| A really odd math problem.... | Adam Y. | Math and Science | 12 | 07-07-2004 10:04 |
| Odd Escape | ZZII 527 | Math and Science | 25 | 09-04-2004 22:14 |
| Odd occurrences | Adam Y. | General Forum | 23 | 27-04-2003 02:44 |
| Odd Email... | Tom Schindler | General Forum | 10 | 13-09-2001 00:47 |