Go to Post It looks like you put a robot through a paper shredder. - Madwolvez [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-08-2010, 18:24
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
DS "User Message"

The "User Message" on the Driver Station is just a string indicator, right?
Does it word-wrap and scroll like a normal string indicator, or does it have some processing on it to make it act like a primitive LCD text display?
__________________
-- Marshal Horn
  #2   Spotlight this post!  
Unread 01-08-2010, 19:00
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: DS "User Message"

I assume you mean the one on the overview page of the DS

IIRC, that one has a limit on how far text can go on and will cut it off with a ... and not wrap
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
  #3   Spotlight this post!  
Unread 01-08-2010, 21:26
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: DS "User Message"

I tested and confirmed this with line 1.
Unfortunately, that makes it useless to me.
I guess I'll just have to use the error messages window.

I'm making a CAN startup test, and want to send the results back to the driver. However, I'd rather not make anyone who uses this startup test have to fit this into their dashboard. I only plan to send the message once at the start of Autonomous Enabled.
__________________
-- Marshal Horn
  #4   Spotlight this post!  
Unread 01-08-2010, 23:42
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: DS "User Message"

Quote:
Originally Posted by kamocat View Post
I'm making a CAN startup test, and want to send the results back to the driver. However, I'd rather not make anyone who uses this startup test have to fit this into their dashboard. I only plan to send the message once at the start of Autonomous Enabled.
If its your own message, then why can't you make it fit within the length of the box?
You could use multiple lines.

[edit]
Or, you could use this:
Code:
public class DriverStationLCDwWrap  {

    private static DriverStationLCD lcd = null;
    private static DriverStationLCDwWrap LCDw = null;//keep the singleton pattern going

    private DriverStationLCD.Line[] lcdLines =
    {DriverStationLCD.Line.kMain6, DriverStationLCD.Line.kUser2,
     DriverStationLCD.Line.kUser3, DriverStationLCD.Line.kUser4,
     DriverStationLCD.Line.kUser5, DriverStationLCD.Line.kUser6};

    private DriverStationLCDwWrap()
    {
        lcd = DriverStationLCD.getInstance();
    }

    public static DriverStationLCDwWrap getInstance()
    {
        if(LCDw == null)
            LCDw = new DriverStationLCDwWrap();
        return LCDw;
    }

    public void updateLCD()
    {
        lcd.updateLCD();
    }

    public void println(String text)
    {
        int length = text.length();
        int lines  = length / lcd.kLineLength;
        String blank = "                      "; // 21 spaces, clears the line.
        for(int i = 0; i < i < lcdLines.length; i++)
        {
            lcd.println(lcdLines[i], 1, blank); // Clear the all lines of previous text
        }

        for(int i = 0; i < (lines + 1) && i < lcdLines.length; i++)
        {
            int start = lcd.kLineLength*i;
            int end   = (start+lcd.kLineLength  >= length)? length : start+lcd.kLineLength;
            lcd.println(lcdLines[i], 1, text.substring(start, end));
        }
        updateLCD(); // call it since the the string has replaced the entire DS LCD buffer 
    }
}
(note, this is character wrapping. Your message can and will be chopped off to a new line)
For example: println("This is a very long message that will be split into several pieces");
becomes:
This is a very long m
essage that will be s
plit into several pie
ces
[/edit]
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!

Last edited by biojae : 02-08-2010 at 02:11.
  #5   Spotlight this post!  
Unread 02-08-2010, 13:42
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: DS "User Message"

I can't because of the amount of information I'd like it to display. (If the startup test can't figure out the issue, then it will return all the configuration and status information it has on the Jaguar. That's a LONG message.)
However, I found a lovely subVI in "StartCommunication.vi" that is a functional global for the DS error messages, so I can write to that without having to evoke and error.
It's called StatusErrorCache.vi.
__________________
-- Marshal Horn
  #6   Spotlight this post!  
Unread 03-08-2010, 20:54
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,588
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: DS "User Message"

Another option is to write a status message to the LCD (CAN Status: Pass/Fail). Then use the error messages to print all your detailed status when it failed.

We used the LCD for a lot of status messages in that manner, and it was very convenient for that.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"Emergency Stopped" message won't go away Lakedaimon General Forum 25 13-08-2012 22:14
"Demo Stamp not found" error message Gatto Programming 1 07-02-2007 23:17
"The Power of a Positive Team" Message Joe Matt General Forum 2 04-04-2005 09:48
Why would I "subscribe" to a message thread or a forum? Joe Johnson CD Forum Support 4 07-06-2001 22:07


All times are GMT -5. The time now is 23:09.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi