Skip to content

Commit

Permalink
Changes Joystick Report Error to use reporting line numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse committed Jan 13, 2016
1 parent 03e0b97 commit 109495f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions WPILib/DriverStation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,13 @@ public double GetBatteryVoltage()
/// Reports errors related to unplugged joysticks.
/// </summary>
/// <param name="message">The message to send.</param>
private void ReportJoystickUnpluggedError(string message)
private void ReportJoystickUnpluggedError(string message, [CallerMemberName] string memberName = "",
[CallerFilePath] string filePath = "", [CallerLineNumber] int lineNumber = 0)
{
double currentTime = GetFPGATimestamp();
if (currentTime > m_nextMessageTime)
{
ReportError(message, false);
ReportError(message, false, memberName, filePath, lineNumber);
m_nextMessageTime = currentTime + JoystickUnpluggedMessageInterval;
}
}
Expand Down

0 comments on commit 109495f

Please sign in to comment.