Skip to content

Commit

Permalink
Space the encoder reading to 50 ms samples.
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Nov 5, 2019
1 parent 6b6ecd4 commit 1273ad8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ shadowJar {
mainClassName = 'edu.wpi.rbe.rbe2001.fieldsimulator.gui.Main'
baseName = 'FieldControl'
classifier = null
version = '0.2.0'
version = '0.2.1'
mergeServiceFiles()
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
import java.io.PrintWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.Date;
public class CSVManager {
long timestampLast;
long timestampLast=0;
ArrayList<double[]> hashMap= new ArrayList<double[]>();

public void addLine(long timestamp, double pos0, double pos1, double pos2, double vel0, double vel1, double vel2,
double hw0, double hw1, double hw2, double velsetpoint0, double velsetpoint1, double velsetpoint2,
double setpoint0, double setpoint1, double setpoint2, double Azimuth) {
if(timestampLast+50>timestamp)
return;
timestampLast=timestamp;
double[] line = new double[] { timestamp,pos0, pos1, pos2, vel0, vel1, vel2, hw0, hw1, hw2, velsetpoint0, velsetpoint1,
velsetpoint2, setpoint0, setpoint1, setpoint2,Azimuth };
hashMap.add( line);
Expand Down

0 comments on commit 1273ad8

Please sign in to comment.