Skip to content

Commit 24edf56

Browse files
committed
removed unused things
1 parent 7870faf commit 24edf56

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/main/java/WallEye/WallEye.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package WallEye;
22

3-
import java.lang.reflect.Array;
43
import java.util.ArrayList;
54
import java.util.HashMap;
65
import java.util.function.DoubleSupplier;
76

8-
import edu.wpi.first.math.Pair;
97
import edu.wpi.first.math.geometry.Pose3d;
108
import edu.wpi.first.math.geometry.Rotation3d;
119
import edu.wpi.first.math.geometry.Transform3d;
@@ -14,12 +12,9 @@
1412
import edu.wpi.first.networktables.IntegerSubscriber;
1513
import edu.wpi.first.networktables.NetworkTable;
1614
import edu.wpi.first.networktables.NetworkTableInstance;
17-
import edu.wpi.first.util.CircularBuffer;
1815
import edu.wpi.first.wpilibj.DigitalInput;
1916
import edu.wpi.first.wpilibj.Notifier;
2017
import edu.wpi.first.wpilibj.RobotController;
21-
import edu.wpi.first.wpilibj2.command.CommandBase;
22-
import WallEye.WallEyeResult;
2318

2419
/**
2520
* A robot side code interface to interact and pull data from an Orange Pi running WallEye
@@ -134,8 +129,6 @@ public WallEyeResult[] getResults() {
134129
else {
135130
DIOGyroResult savedStrobe = findGyro((sub.getAtomic().timestamp + (long)temp[6]), i, temp[5]);
136131

137-
//System.out.println(savedStrobe.getTimestamp() - ((double)sub.getAtomic().timestamp) + temp[6]);
138-
139132
results.add(new WallEyeResult(new Pose3d(new Translation3d(temp[0], temp[1], temp[2]), new Rotation3d(0, 0, savedStrobe.getGyro())),
140133
savedStrobe.getTimestamp(), i, curUpdateNum, (int) temp[7], tags, temp[8 + (int) temp[7]] ));
141134
}
@@ -161,7 +154,6 @@ public DIOGyroResult findGyro(long timestamp, int camIndex, double yaw) {
161154
if (index < 0)
162155
index += maxGyroResultSize;
163156
while((long)gyroResults[camIndex][index].getTimestamp() > timestamp) {
164-
//System.out.println(index);
165157
index--;
166158
if (index < 0)
167159
index += maxGyroResultSize;
@@ -170,27 +162,6 @@ public DIOGyroResult findGyro(long timestamp, int camIndex, double yaw) {
170162
}
171163
return gyroResults[camIndex][index];
172164
}
173-
// public DIOGyroResult findGyro(long timestamp, int camIndex) {
174-
// int max = currentGyroIndex - 1 >= 0 ? currentGyroIndex - 1 : maxGyroResultSize - 1;
175-
// int min = currentGyroIndex;
176-
// int loops = 0;
177-
// int mid = max > min ? (max - min) / 2 : (maxGyroResultSize - min + max) / 2 + min;
178-
// mid %= maxGyroResultSize;
179-
180-
// if (gyroResults[camIndex][maxGyroResultSize-1] == null)
181-
// return new DIOGyroResult(0.0, 0);
182-
183-
// while ((timestamp - gyroResults[camIndex][mid].getTimestamp() > 1.0/camFPS * 1000000 || timestamp - gyroResults[camIndex][mid].getTimestamp() < 0)&& min != mid && loops < 10) {
184-
// loops++;
185-
// if (gyroResults[camIndex][mid].getTimestamp() > timestamp)
186-
// max = mid;
187-
// else
188-
// min = mid;
189-
// mid = max > min ? (max - min) / 2 + min: (maxGyroResultSize - min + max) / 2 + min;
190-
// mid %= maxGyroResultSize;
191-
// }
192-
// return gyroResults[camIndex][mid];
193-
// }
194165

195166
/**
196167
* Getter for the current update number

0 commit comments

Comments
 (0)