OCCRA
Go to Post FIRST is like Starbucks coffee, it's addicting and you just can't seem to get away from it... - Beth Sweet [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Events   CD-Media   CD-Spy   FRC-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 04-21-2012, 10:58 AM
kobitate94's Avatar
kobitate94 kobitate94 is offline
Webmaster
FRC #1683 (Techno Titans)
Team Role: Webmaster
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Johns Creek, Georgia
Posts: 7
kobitate94 is on a distinguished road
SmartDashboard Window size not saving

Hey everybody!

We recently switched Driver Station computers due to the fact that our old classmate kept causing SmartDashboard to crash. We are now using a plastic MacBook running Windows 7 through BootCamp.

The SmartDashboard launches fine, but the window size is too small on launch (1024x400 to be exact). We are able to change the window size just fine through File > Preferences but, when we reopen the dashboard, the window size resets to 1024x400. We know that the layout was saved because we added a second camera feed when we set up the new Driver Station, and it was still showing when we relaunched.

How can we fix this? Thanks in advance!
  #2   Spotlight this post!  
Unread 04-21-2012, 02:02 PM
Sunstroke Sunstroke is offline
Programmer
AKA: Joe Grinstead
FRC #3504 (Girls of Steel)
Team Role: Mentor
 
Join Date: Apr 2009
Rookie Year: 2009
Location: New England
Posts: 49
Sunstroke is an unknown quantity at this point
Re: SmartDashboard Window size not saving

Quote:
Originally Posted by kobitate94 View Post
Hey everybody!

We recently switched Driver Station computers due to the fact that our old classmate kept causing SmartDashboard to crash. We are now using a plastic MacBook running Windows 7 through BootCamp.

The SmartDashboard launches fine, but the window size is too small on launch (1024x400 to be exact). We are able to change the window size just fine through File > Preferences but, when we reopen the dashboard, the window size resets to 1024x400. We know that the layout was saved because we added a second camera feed when we set up the new Driver Station, and it was still showing when we relaunched.

How can we fix this? Thanks in advance!
There's currently no fix for that when you are running in "competition" mode (which means you don't see the frame around the window).

One option is to not run it in competition mode. To do that, go to Program Files\FRCDashboard\launcher.bat and remove the word competition (or "-competition", I don't remember if there is a hyphen).
  #3   Spotlight this post!  
Unread 04-21-2012, 02:26 PM
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: SmartDashboard Window size not saving

When your in "competition" mode, the size of the window is hard coded into the program. However, it's quite easy to change, all you have to do is change one line in the source (which is downloadable from firstforge.wpi.edu). I have successfully changed our dashboard to display at 1366x500. If you need any help, or just want me to compile you one with your resolution hard coded, PM me.
  #4   Spotlight this post!  
Unread 04-23-2012, 06:38 PM
kobitate94's Avatar
kobitate94 kobitate94 is offline
Webmaster
FRC #1683 (Techno Titans)
Team Role: Webmaster
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Johns Creek, Georgia
Posts: 7
kobitate94 is on a distinguished road
Re: SmartDashboard Window size not saving

Thanks for the help guys! I've passed this on to our lead programmer. Good luck for those going to worlds!
  #5   Spotlight this post!  
Unread 05-03-2012, 01:40 PM
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 537
BradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud of
Re: SmartDashboard Window size not saving

Sorry about the annoyance, we'll try to fix it for 2013.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #6   Spotlight this post!  
Unread 05-03-2012, 09:27 PM
Djur's Avatar
Djur Djur is offline
Vision tracking is fun!
AKA: Sam Carlberg
FRC #1687
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Massachusetts
Posts: 169
Djur will become famous soon enough
Re: SmartDashboard Window size not saving

The problem seems to be at DashboardFrame.java at line 119:
Code:
// Set the size / look
        if (competition) {
            setPreferredSize(NETBOOK_SIZE); //1024x400 - this is your problem
            setUndecorated(true);
            setLocation(0, 0);
            setResizable(false);
        } else {
            setMinimumSize(MINIMUM_SIZE); //300x200

            // Closing operation is handled manually
            setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

            DashboardPrefs prefs = DashboardPrefs.getInstance();
            setPreferredSize(new Dimension(prefs.width.getValue(), prefs.height.getValue())); //This is the dimension stored in the save file
            setLocation(prefs.x.getValue(), prefs.y.getValue());
        }
So the DashboardFrame will automatically be set to 1024x800 if you're in competition mode. The easiest (temporary) fix until the 2013 release would be to change
Code:
setPreferredSize(NETBOOK_SIZE);
to
Code:
setPreferredSize(new Dimension(width, height));
with (width, height) being based upon the size of your screen.
__________________
"Wow." - Dean Kamen on 2084's Rebound Rumble 'bot.
Finalists in the 2012 Boston Regional with 125 and 78
LiveWindow, RobotBuilder, and WPILibJ developer.

Last edited by Djur : 05-03-2012 at 09:48 PM. Reason: line 119
  #7   Spotlight this post!  
Unread 05-04-2012, 01:36 AM
Sunstroke Sunstroke is offline
Programmer
AKA: Joe Grinstead
FRC #3504 (Girls of Steel)
Team Role: Mentor
 
Join Date: Apr 2009
Rookie Year: 2009
Location: New England
Posts: 49
Sunstroke is an unknown quantity at this point
Re: SmartDashboard Window size not saving

Quote:
Originally Posted by Djur View Post
The easiest (temporary) fix until the 2013 release would be to change
Code:
setPreferredSize(NETBOOK_SIZE);
to

Code:
setPreferredSize(new Dimension(width, height));
with (width, height) being based upon the size of your screen.
A better stopgap would be:
Code:
setPreferredSize(new Dimension(prefs.width.getValue(), prefs.height.getValue()));
because that will now save your screen size, and use the saved screen size.
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


All times are GMT -5. The time now is 12:10 AM.

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


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