|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Our team is using the .NET (2.0) Composite Dashboard Viewer to get servo and PWM data from the robot while it is running. It is supposed to let you view the camera centroid and bounding box too, but that isn't working. According to the page on the Composite Dashboard Viewer, the camera data needs to be mapped to the dashboard packet as follows:
user_byte1 = x user_byte2 = y user_byte3 = x1 user_byte4 = y1 user_byte5 = x2 user_byte6 = y2 I could probably figure out how to set these values, but then I noticed this in ifi_aliases.h: Quote:
|
|
#2
|
|||||
|
|||||
|
Re: User_Bytes taken over by breakers?
I'm not an expert at the data packets, so I might attach to this question the following one:
If you have an unused PWM (that has no servo cable attached to it) could you not use that value as an additional byte to send back to the OI? Typically we use fewer than half of our PWMs, but the data structure of the packet seems to show that they are all returned to the OI. Experts? Jason |
|
#3
|
|||||
|
|||||
|
Re: User_Bytes taken over by breakers?
The breaker panel feedback isn't hardwired. It was a short bit of code (in Default_Routine(), I believe) in prior years. It is only useful if you're a) using the IFI breaker panel, and b) connecting the IFI breaker to the program port on the RC.
You're not doing either of those this year, because the IFI breaker panel isn't a permitted component. If the default code still refers to it, ignore it. |
|
#4
|
||||
|
||||
|
Re: User_Bytes taken over by breakers?
What made me think it might be hardwired is that it isn't referenced anywhere in the default code. Did they just forget to take the comments out? If that's the case, will I need to add ".allbits" to bytes 3 through 6 like bytes 1 and 2 have?
|
|
#5
|
|||
|
|||
|
Re: User_Bytes taken over by breakers?
I haven't looked at the code, but it might be an artifact from last year. The breaker panel sends updates over the serial port, so the code that handled that updated the user bytes. If you're not using the breaker panel code then you should be able to set the user bytes yourself.
|
|
#6
|
|||||
|
|||||
|
Re: User_Bytes taken over by breakers?
The reference to "allbits" is only on the first two user bytes. I think it's that way because the Dashboard Viewer program can show each individual bit of those two user bytes, and there is an associated bit array in the user byte structure that you can use to set those bytes' bits one at a time if you want to.
Don't worry about it. Just set User_Byte1 through User_Byte6 the way you want, make sure nothing else in Default_Routine() is setting them to something you don't want, and everything should work fine. |
|
#7
|
||||
|
||||
|
Re: User_Bytes taken over by breakers?
Thanks! It works great.
Code:
//Send camera data to the Dashboard. User_Byte1 = CENTROID_X; User_Byte2 = CENTROID_Y; User_Byte3 = UPPER_X; User_Byte4 = UPPER_Y; User_Byte5 = LOWER_X; User_Byte6 = LOWER_Y; |
|
#8
|
|||||
|
|||||
|
Re: User_Bytes taken over by breakers?
Quote:
P.S. Alan caught my oversight. 255 isn't allowed over the radio link since a pair of them back to back is reserved as a special flag indicating a new packet is starting. You can set your PWMs to 255, but the Master will change them to 254 before radioing the packet back to the OI and your dashboard. Last edited by Mark McLeod : 21-01-2007 at 12:11. |
|
#9
|
|||||
|
|||||
|
Re: User_Bytes taken over by breakers?
Not any value. You can't use 255; it will get changed to 254 on the way through the radio link.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Looking for Picture taken at LA Regional | Phil_Lutz | Regional Competitions | 2 | 14-04-2004 18:54 |
| pic: this picture was taken on 2/19/04 | CD47-Bot | Robot Showcase | 5 | 24-02-2004 10:40 |
| Autodesk hath taken pity on us... | RachelOfMars | 3D Animation and Competition | 2 | 05-04-2003 11:12 |
| firstrobotics.org taken by spammers | SlamminSammy | General Forum | 6 | 06-10-2002 20:23 |
| Picture taken at nats | David Kelly | Championship Event | 1 | 22-06-2001 12:25 |