View Single Post
  #7   Spotlight this post!  
Unread 10-03-2004, 21:57
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Dashboard Programming

Quote:
Originally Posted by Jeff_Rice
I was going to put this in a new thread, but is discussed a little here. Could someone explain how to use the 6 user bytes please(without messing up my pwm outputs)?
Here's an example from our user_routines.c
(make sure you have ifi_aliases.h included)

[edit]Each of these User_Byte1,2,3,4,5,6 are defined in ifi_aliases.h and are all "unsigned char"

Code:
User_Byte1 = LeftAmps; 
User_Byte2 = RightAmps;
/* Display the gyro heading byte3 if its negative, byte4 if its positive */
igyrovalue = Gyro_Degrees();
if (igyrovalue > 0)
{
User_Byte3 = 0; 
User_Byte4 = (char) igyrovalue;
}
else
{
User_Byte3 = (char) -igyrovalue; 
User_Byte4 = 0;
}
 
User_Byte5 = 99; // Displays "99" on the dashboard program
User_Byte6 = 254; // No particular reason

__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 11-03-2004 at 08:48.