Go to Post I'm impressed and incredibly amused that you found so many of Dave's evildoings, though granted, they aren't that hard to search out. - DCA Fan [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-01-2015, 20:57
jtrv's Avatar
jtrv jtrv is offline
github.com/jhtervay
AKA: Justin
FRC #2791 (Shaker Robotics)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Latham, NY
Posts: 147
jtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to all
Re: SmartDashboard not connecting to robot.

Might as well highjack this instead of making a new thread for a tiny question and its related to SmartDashboard.

If I have a display() method that just puts values on the Dashboard, ex:

Code:
public void display(){
		SmartDashboard.putNumber("FrontLeft  PWM:", Robot.eboard.frontLeftSlot);
		SmartDashboard.putNumber("BackLeft   PWM:", Robot.eboard.backLeftSlot);
		SmartDashboard.putNumber("FrontRight PWM:", Robot.eboard.frontRightSlot);
		SmartDashboard.putNumber("BackRight  PWM:", Robot.eboard.backLeftSlot);
	}
Do I need to constantly call that method throughout teleopPeriodic()? Or do I only need to call it once during teleopInit()? In other words, do I have to update Dashboard manually, or will it update automatically as time goes on?

ps i understand the pwm slots sure well aren't going to change its just an example of a display method that is only temporary...
__________________
2791 (2012-2017)
Reply With Quote
  #2   Spotlight this post!  
Unread 09-01-2015, 21:12
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Redmond
Posts: 146
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
Re: SmartDashboard not connecting to robot.

Based on your code there, where you're putting a number, you'll need to call that regularly. If you put smarter things to the dashboard such as Commands, they update their status on their own.
Reply With Quote
  #3   Spotlight this post!  
Unread 09-01-2015, 21:19
jtrv's Avatar
jtrv jtrv is offline
github.com/jhtervay
AKA: Justin
FRC #2791 (Shaker Robotics)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Latham, NY
Posts: 147
jtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to all
Re: SmartDashboard not connecting to robot.

what would an example of a command be?

if i put SmartDashboard.putNumber(encoder1.get()); will it auto update or is that a command?
__________________
2791 (2012-2017)
Reply With Quote
  #4   Spotlight this post!  
Unread 09-01-2015, 21:21
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Redmond
Posts: 146
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
Re: SmartDashboard not connecting to robot.

Commands are part of command-based programming, which is one of the WPILib-supported programming paradigms. See in the ScreenSteps here: http://wpilib.screenstepslive.com/s/...ed-programming.
Reply With Quote
  #5   Spotlight this post!  
Unread 09-01-2015, 21:23
jtrv's Avatar
jtrv jtrv is offline
github.com/jhtervay
AKA: Justin
FRC #2791 (Shaker Robotics)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Latham, NY
Posts: 147
jtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to all
Re: SmartDashboard not connecting to robot.

Oh, right. I always forget about Command based

thanks for your help ^^
__________________
2791 (2012-2017)
Reply With Quote
Reply


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 09:55.

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