Begin network rewrite

This commit is contained in:
Banks Troutman
2019-10-04 15:55:45 -04:00
parent 2d32fa21ce
commit 7699766091
20 changed files with 338 additions and 83 deletions

View File

@@ -110,14 +110,20 @@ public class VisionProcess implements Runnable {
}
private void updateNetworkTables(PipelineResult pipelineResult) {
ntValidEntry.setBoolean(pipelineResult.IsValid);
if (pipelineResult.IsValid) {
ntValidEntry.setBoolean(true);
ntYawEntry.setNumber(pipelineResult.Yaw);
ntPitchEntry.setNumber(pipelineResult.Pitch);
ntDistanceEntry.setNumber(pipelineResult.Area);
ntTimeStampEntry.setNumber(TimeStamp);
NetworkTableInstance.getDefault().flush();
} else {
ntYawEntry.setNumber(0.0);
ntPitchEntry.setNumber(0.0);
ntDistanceEntry.setNumber(0.0);
ntTimeStampEntry.setNumber(TimeStamp);
ntValidEntry.setBoolean(false);
}
ntTimeStampEntry.setNumber(TimeStamp);
}
private PipelineResult runVisionProcess(Mat inputImage, Mat outputImage) {