Don't send DS errors if no DS.

Change-Id: I765d8c21371e772ec09bf696f6dd2fff43f8ed24
This commit is contained in:
Kevin O'Connor
2015-02-19 16:22:53 -05:00
committed by James Kuszmaul
parent d2edb80da2
commit 0e46592ad1

View File

@@ -530,5 +530,11 @@ double DriverStation::GetMatchTime()
void DriverStation::ReportError(std::string error)
{
std::cout << error << std::endl;
HALSetErrorData(error.c_str(), error.size(), 0);
HALControlWord controlWord;
HALGetControlWord(&controlWord);
if(controlWord.dsAttached)
{
HALSetErrorData(error.c_str(), error.size(), 0);
}
}