Skip to content

Commit e605895

Browse files
committed
changing java docs
1 parent 24edf56 commit e605895

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/main/java/WallEye/WallEye.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@ public class WallEye {
3737
HashMap<Integer, Integer> dioHashMap = new HashMap<>();
3838

3939
/**
40-
* Creates a WallEye object that can pull pose location and timestamp from Network Tables.
40+
* Creates a WallEye object that can pull pose location and timestamp data from Network Tables.
4141
*
4242
*
43-
* @param tableName a string that specifies the table name of the WallEye instance (Look at web interface)
43+
* @param tableName a string that specifies the table name of the WallEye instance (is set in the web interface)
4444
* @param numCameras a number that is equal to the number of cameras connected to the PI
45-
* @param gyro a DoubleSupplier that supplies the gyro yaw for the robot
46-
* @param dioPorts an array that holds all the Ids for the dio ports that the cameras are connected to *EACH CAMERA MUST HAVE A DIO PORT* (to not use DIO yaw reporting put in an empty array)
45+
* @param gyro a DoubleSupplier that supplies the gyro yaw for the robot (WILL CHANGE)
46+
* @param dioPorts an array that holds all the IDs for the dio ports that the cameras are connected to *EACH CAMERA MUST HAVE A DIO PORT* (to not use DIO yaw reporting put in an empty array)
47+
*
4748
*/
4849
public WallEye(String tableName, int numCameras, DoubleSupplier gyro, DigitalInput[] dioPorts)
4950
{
@@ -74,7 +75,7 @@ public WallEye(String tableName, int numCameras, DoubleSupplier gyro, DigitalInp
7475
}
7576

7677
/**
77-
* A method that checks the DIO ports for a input and upon input will grab gyro and timestamp
78+
* A method that checks the DIO ports for an input and upon input will grab gyro and timestamp
7879
*/
7980
private void grabGyro() {
8081
for (DigitalInput dio: dios)
@@ -104,8 +105,7 @@ public int getNumCameras() {
104105

105106
/**
106107
* Pulls most recent poses from Network Tables.
107-
* Array is structed as index 0, 1, 2 are position; 3, 4, 5 are rotation; 6 is a timestamp; 7 is n number of tags; 7 + n are tag ids; 7+n+1 is ambiguity
108-
*
108+
*
109109
* @return Returns an array of WallEyeResult, with each nth result being the nth camera as shown on the web interface
110110
* @see WallEyeResult
111111
*/
@@ -123,6 +123,7 @@ public WallEyeResult[] getResults() {
123123
tags[i] = (int) temp[j + 8];
124124

125125
//(long)temp[6]
126+
// Array is structed as index 0, 1, 2 are position; 3, 4, 5 are rotation; 6 is a timestamp; 7 is n number of tags; 7 + n are tag ids; 7+n+1 is ambiguity
126127
if(dios.size() == 0 || gyroResults[i][maxGyroResultSize - 1] == null || temp[6] > gyroResults[i][currentGyroIndex - 1 >= 0 ? currentGyroIndex - 1 : maxGyroResultSize - 1].getTimestamp())
127128
results.add(new WallEyeResult(new Pose3d(new Translation3d(temp[0], temp[1], temp[2]), new Rotation3d(temp[3], temp[4], temp[5])),
128129
(double)sub.getAtomic().timestamp + temp[6], i, curUpdateNum, (int) temp[7], tags, temp[8 + (int) temp[7]] ));
@@ -140,8 +141,8 @@ public WallEyeResult[] getResults() {
140141

141142

142143
/**
143-
* A method that will go back until it gets a timestamp from before the network tables reports
144-
* the time
144+
* A method that will go back until it gets a timestamp from before the time reported
145+
* by network tables *should return more accurate timestamp measurements*
145146
*
146147
* @param timestamp a long that is the timestamp of the camera that is being searched for
147148
* @param camIndex an index that corresponds to the camera index

0 commit comments

Comments
 (0)