Quote:
Originally Posted by grantf
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..