Skip to content

Commit 1273ad8

Browse files
committed
Space the encoder reading to 50 ms samples.
1 parent 6b6ecd4 commit 1273ad8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ shadowJar {
5454
mainClassName = 'edu.wpi.rbe.rbe2001.fieldsimulator.gui.Main'
5555
baseName = 'FieldControl'
5656
classifier = null
57-
version = '0.2.0'
57+
version = '0.2.1'
5858
mergeServiceFiles()
5959
}

src/main/java/edu/wpi/rbe/rbe2001/fieldsimulator/gui/CSVManager.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66
import java.io.PrintWriter;
77
import java.text.DateFormat;
88
import java.text.SimpleDateFormat;
9-
import java.util.HashMap;
109
import java.util.ArrayList;
1110
import java.util.Date;
1211
public class CSVManager {
13-
long timestampLast;
12+
long timestampLast=0;
1413
ArrayList<double[]> hashMap= new ArrayList<double[]>();
1514

1615
public void addLine(long timestamp, double pos0, double pos1, double pos2, double vel0, double vel1, double vel2,
1716
double hw0, double hw1, double hw2, double velsetpoint0, double velsetpoint1, double velsetpoint2,
1817
double setpoint0, double setpoint1, double setpoint2, double Azimuth) {
1918
if(timestampLast+50>timestamp)
2019
return;
20+
timestampLast=timestamp;
2121
double[] line = new double[] { timestamp,pos0, pos1, pos2, vel0, vel1, vel2, hw0, hw1, hw2, velsetpoint0, velsetpoint1,
2222
velsetpoint2, setpoint0, setpoint1, setpoint2,Azimuth };
2323
hashMap.add( line);

0 commit comments

Comments
 (0)