View Single Post
  #3   Spotlight this post!  
Unread 03-02-2012, 10:18
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: View scheduler in SmartDashboard

Quote:
Originally Posted by grantf View Post
It seems that any interaction with the SmartDashboard results in a robot crash.
I only have the problem when trying to send the Scheduler to the SmartDashboard. I am having no problem putting other data including subsystem objects, PID controllers and just raw doubles. All of this works fine:

Code:
DriveSubsystem::DriveSubsystem() : Subsystem("DriveSubsystem") {
	SmartDashboard::GetInstance()->PutData("DriveSubsystem",this);
	SmartDashboard::GetInstance()->PutData("LeftSpeedCtl",pLeftSpeedControl);
	SmartDashboard::GetInstance()->PutData("RightSpeedCtl",pRightSpeedControl);
}
Code:
void DriveSubsystem::UpdateStatus()
{
	SmartDashboard::GetInstance()->PutDouble("Left Raw",pLeftEncoder->GetRaw());
	SmartDashboard::GetInstance()->PutDouble("Right Raw",pRightEncoder->GetRaw());
	SmartDashboard::GetInstance()->PutDouble("Left Speed",pLeftEncoder->GetRate());
	SmartDashboard::GetInstance()->PutDouble("Right Speed",pRightEncoder->GetRate());
	SmartDashboard::GetInstance()->PutDouble("Left Set Point",this->pLeftSpeedControl->GetSetpoint());
	SmartDashboard::GetInstance()->PutDouble("Right Set Point",this->pRightSpeedControl->GetSetpoint());
}
I'm not sure how your code works since you are not using the scheduler in TeleopPeriodic(). There is probably not much reason to use the Command Based architecture if you are not going to use the scheduler. And that may also be leading to the crashes you are seeing..
Reply With Quote