|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
[FTC]: NXT Display Code
I was working on an autonomous program chooser to work locally on the NXT. the problem lies when you use the #included "JoystickDrive.c" command (which we have to use...) there is a included file in this drive to display information about battery voltage and important information like that. The problem is that it covers the screen when I want to display information over it for my program selecter.
Here's the code: (BTW, I removed user specific code to make the post not too long, all it did was use the strings and user functions to compile the wanted autonomous). Quote:
Thanks in advance guys! ~GDO, Team Unlimited (FTC #1) This routine does work 100% without the template right now, so if any one has any questions about it or wants to use it, I will explain it and show you the complete code. Inside the "JoystickDriver.c" file, the problem source is here: Quote:
Last edited by gdo : 02-02-2009 at 18:15. |
|
#2
|
||||
|
||||
|
Re: [FTC]: NXT Display Code
I just figured it out...
I case anyone is interested in using this code in competition add this to your code: Quote:
Quote:
![]() |
|
#3
|
||||
|
||||
|
Re: [FTC]: NXT Display Code
Issue #1
The software templates are mandatory for FTC competitions. Robots that don't display the diagnostics may fail software inspection. Issue #2 The Field Technical Advisor (FTA) at a competition is responsible for diagnosing problems when robots behave unexpectedly during competitions. Unexpected behavior can be caused by the robot or the Field Control System. The diagnostic information written to the NXT enables the FTA to quickly eliminate many of the common robot problems. Robots that don't display the diagnostics could be at a disadvantage when there is unexpected robot behavior during a match. For example, a robot doesn't start Autonomous or doesn't move in the Tele-op portion of a match. The robot is still in the starting position near the field wall and the FTA can see the NXT display. [This is a very common situation.] If the robot is using the ROBOTC template the FTA can check for the following on the NXT display: - Is the NXT enabled or disabled? - Does the NXT's internal battery have sufficient voltage? - Is the external battery pack powering the HiTechnic controllers turned on and have sufficient voltage? - Is the NXT receiving Bluetooth packets? - What is the name of the Tele-op program? If the NXT doesn't display the expected diagnostic information, the door is open for the FTA to declare that the unexpected robot behavior is likely a robot failure since it isn't programmed using the mandatory template. Or worse, the robot should not be allowed to participate in a match since it shouldn't have passed software inspection. Suggestion: Teams could write their own information to the NXT display during software development and testing. Once the software is competition ready, it is in the team's best interest to use the mandatory template. The template minimizes the risk of failing software inspection and provides the FTA with valuable information when diagnosing unexpected robot behavior during a match. Michael |
|
#4
|
|||
|
|||
|
Re: [FTC]: NXT Display Code
Currently we are using LabView rathar than RobotC.
But we write on the NXT screen to allow us to choose between red and blue and ramp and floor. We also write the Voltage form the battery using Phil's great program. All of this easily fits under the information that the template writes on the screen. We just use the two lines on the bottom of the screen. |
|
#5
|
||||
|
||||
|
Re: [FTC]: NXT Display Code
Jon is correct. The NXT-G and LabVIEW templates display less diagnostic information than the ROBOTC template. This leaves space at the bottom of the NXT display for team diagnostics.
Michael |
|
#6
|
||||
|
||||
|
Re: [FTC]: NXT Display Code
it disables the display for about 10 seconds before the match begins (before it should recieve a message from the FMS). then right after that it re-enables the diagnostic software. so for a total of 10 seconds before the round even begins the diagnostic software is running but not displaying.
|
|
#7
|
|||
|
|||
|
Re: [FTC]: NXT Display Code
Personally I think what you've done is fine. [I wrote the "joystickDriver.c" code so I have some knowledge of this.]
But as Michael Coleman has commented, it's up to the local competititon "Field Adminstrator" to make the call. If your chooser code only displays to the screen before you get to the field, then I think you'd probably be OK. Another alternative that you might want to consider is having a separate program to select which of the four choices. It could write this to a file on the NXT -- perhaps only containing a single character. Then your autonomous program could read this file and make the appropriate decision. If you want help with this, email me directly (dickswan@sbcglobal.net) and I'll send you more details. NOTE: the diagnostic information on the NXT screen for the Field Management system is somewhat of a pain. This is information that the Field Management System could interrogate from the NXT (via Bluetooth) and display on the FMS. However, this was too big a change to make late in the season and instead this information was added to the LCD display. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [FTC]: How to play sound from NXT | gregsanCHEVY121 | FIRST Tech Challenge | 5 | 07-04-2009 10:10 |
| [FTC]: RobotC and NXT-G (The two programming languages) | craig_yates | FIRST Tech Challenge | 1 | 30-01-2009 21:47 |
| [FTC]: Help requested, the NXT is not showing the battery as being connected. | crazilyrandom1 | FIRST Tech Challenge | 2 | 17-01-2009 11:24 |
| [FTC]: Bluetooth/NXT issues | jbbjjbt | FIRST Tech Challenge | 5 | 23-10-2008 16:56 |
| [FTC]: [FTC]: Ontario Provincial FTC Start/End Times | cbhl | FIRST Tech Challenge | 8 | 16-12-2007 13:37 |