Ran it, getting an image now. However the Unflatten from String VI is giving an error code - 116.
According to the manual:
Quote:
|
Unflatten or byte stream read operation failed due to corrupt, unexpected, or truncated data.
|
EDIT: Not quite sure how to debug this one, really down to trial and error/Google.
EDIT 2: I forgot to use pack an array:
Code:
void RectangleTracker::SendVisionData() {
Dashboard &d = DriverStation::GetInstance()->GetHighPriorityDashboardPacker();
int n = (numCurrentMatches <= 10) ? numCurrentMatches : 10;
d.AddCluster(); {
d.AddArray(); {
for (int i = 0; i < n; i++) {
d.AddCluster(); {
d.AddI16((INT16)matches[i].corner[0].y);
d.AddI16((INT16)matches[i].corner[0].x);
d.AddI16((INT16)matches[i].corner[2].y);
d.AddI16((INT16)matches[i].corner[2].x);
}
d.FinalizeCluster();
}
}
d.FinalizeArray();
}
d.FinalizeCluster();
d.Finalize();
}