|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
How do you get a Long (signed or not) from the FRC to you?
I'm currently using printf() in a way so that, basically: Code:
void printl(long Num)
{
//Print Bytes
printf("Long %d %d %d %d\n", (int)(Num>>24)&0xFF, (int)(Num>>16)&0xFF,
(int)(Num>>8)&0xFF, (int)Num&0xFF);
//Print Words
printf("Long %d %d\n", (int)(Num>>16)&0xFFFF, (int)Num&0xFFFF);
}
Code:
... 0 0 0 8 0 0 1 9 ... 0 0 1 16 0 1 1 17 ... ![]() (or: Code:
... 0 8 1 9 ... ![]() The other option is to use 4 user bytes. but we only have 6. well, 4 User + 2 LED + 1 UserCmd. Can anyone offer suggestions? This little bug really affects results. (bland understatement) |
|
#2
|
||||
|
||||
|
Re: Getting Long Data
Quote:
|
|
#3
|
|||||
|
|||||
|
Re: Getting Long Data
Quote:
You can just call the one routine that prints decimals without changing any of your own printfs. Last edited by Mark McLeod : 10-03-2004 at 17:13. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Competition Scouting | pauluffel | Scouting | 31 | 09-01-2003 00:34 |
| Robot Scouting Database | archiver | 2001 | 10 | 24-06-2002 03:00 |
| Limiting PWM in pbasic | archiver | 2001 | 4 | 24-06-2002 00:38 |
| How long should production time be??? | archiver | 1999 | 4 | 23-06-2002 23:16 |
| Possible Configuration to keep things cheap | archiver | 1999 | 8 | 23-06-2002 23:03 |