Go to Post "It's not child labor if they wear a team shirt!" - Vermeulen [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
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 10-04-2013, 17:31
MikeE's Avatar
MikeE MikeE is offline
Wrecking nice beaches since 1990
no team (Volunteer)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: New England -> Alaska
Posts: 381
MikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond repute
Re: Loss of DS control authority while motors still operate

We found and fixed this problem but I thought I should reply to this thread for posterity in case it appears in anyone's future search results.

We typically see two types of error from the CAN system
  • something serious usually caused by wiring problems (power or CAN) and detected in the CANJaguar constructor, or
  • transitory errors from an occasional packet.
When we see a transitory error we set an indicator light for the appropriate subsystem on the SmartDashboard and recently we have also been logging the error message.
The error message was logged from the exception using the getMessage() method, but we discovered that getMessage() can return NULL so we were sometimes sending NULL to the SmartDashboard hence getting a runtime exception and user code crash.

To solve the problem we made two changes:
  • wrap the top level code in a try {} catch {}
  • using the toString() method for the exception to safely pass a string to SmartDashboard
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 21:17.

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