mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
Begin network rewrite
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user