Go to Post Do whatever you must to survive within the rules, but please stay within the rules. - Kevin Sevcik [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-12-2015, 11:25
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
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!

Last edited by fovea1959 : 31-12-2015 at 12:27.
  #2   Spotlight this post!  
Unread 31-12-2015, 13:41
Jaci's Avatar
Jaci Jaci is offline
Registered User
AKA: Jaci R Brunning
FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 266
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
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
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com

Last edited by Jaci : 31-12-2015 at 13:44.
  #3   Spotlight this post!  
Unread 01-01-2016, 13:57
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,600
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
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.
  #4   Spotlight this post!  
Unread 04-01-2016, 14:31
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: 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?
  #5   Spotlight this post!  
Unread 16-01-2016, 13:34
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,600
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Team 3620 2015 code release and white paper

Quote:
Originally Posted by fovea1959 View Post
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.
  #6   Spotlight this post!  
Unread 18-01-2016, 12:54
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: 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?
Closed Thread


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 03:18.

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