View Single Post
  #9   Spotlight this post!  
Unread 23-01-2016, 17:13
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: How to detect missing CAN devices from Java?

yes, I have stalling code; I'm trying to avoid it. Getting data from missing CAN devices seems to chew up time, which is why I was looking for a way to detect missing CAN devices so I can avoid trying to access them if they are missing.

Attached is a demo project that shows the issue. The code to fetch data from the CANTalon can take upwards of 100ms if the CANTalon is missing, which will definitely cause the watchdog to get grumpy.

Omar, while the code to fetch is non-blocking, is it possible that the error handling and reporting code does block (or is slow)?
Attached Files
File Type: java Robot.java (1.8 KB, 9 views)

Last edited by fovea1959 : 23-01-2016 at 17:52.