Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Team 3620 2015 code release and white paper (http://www.chiefdelphi.com/forums/showthread.php?t=140729)

fovea1959 31-12-2015 11:25

Team 3620 2015 code release and white paper
 
FRC Team 3620, "The Average Joes", from St. Joseph High School in St. Joseph, Michigan, is releasing their 2015 Java code. The code is available on github: https://github.com/FRC3620/FRC3620_2015_AverageJava.

Most of the code is pretty typical FRC code (complete with warts). There are a few unusual things in there, though, that other teams may find useful:
  • event logging.
  • data logging.
  • UDP transmission of JSON encoded data to an onboard co-processor.
  • UDP reception of JSON encoded data from an onboard co-processor.
  • adding third party jars to the build.

We have posted a CD white paper (http://www.chiefdelphi.com/media/papers/3189) going into a little detail on those 5 items.

We hope that the logging and UDP stuff is helpful to someone else. Let me know if it is!

Jaci 31-12-2015 13:41

Re: Team 3620 2015 code release and white paper
 
Nice code, it seems your team programmers are far from inexperienced.

Interesting choice with the "No Logging until we've received the correct time from the Driver Station". I've been having this problem myself in the development of Toast (since everything is formatted with a datetime). It's such a shame the RoboRIO doesn't have an internal clock.

Well, at least I can say I have a time machine. Everything else in my room is in 2016 and the RoboRIO is stuck in 1970

Joe Ross 01-01-2016 13:57

Re: Team 3620 2015 code release and white paper
 
For 2016, the wpilib ant files are being updated to allow inclusion of additional libraries, so you'll only need to define a variable in the project build.properties.

We logged all the time. When our code detected there was a jump in time, we would rename the log file, but not do anything about each individual timestamp in the file.

fovea1959 04-01-2016 14:31

Re: Team 3620 2015 code release and white paper
 
Joe: how were you timestamping? If the clock shifted, could you tell the amount of elapsed time between log entries on either side of the clock stutter?

Joe Ross 16-01-2016 13:34

Re: Team 3620 2015 code release and white paper
 
Quote:

Originally Posted by fovea1959 (Post 1516461)
Joe: how were you timestamping? If the clock shifted, could you tell the amount of elapsed time between log entries on either side of the clock stutter?

We did it really simplistically and converted System.getTimeinMillis to dates, and looked for a jump from before 2015 to 2015 or greater. This worked since the default was 1970.

fovea1959 18-01-2016 12:54

Re: Team 3620 2015 code release and white paper
 
...so you could tell that the time shifted, but you can't tell the elapsed time between events on either side of the timeshift?


All times are GMT -5. The time now is 05:26.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi