GroupContoursPipe optimization

This commit is contained in:
Banks Troutman
2019-11-27 18:16:00 -05:00
parent c5f2a90f86
commit 221af540b2
2 changed files with 2 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ public class GroupContoursPipe implements Pipe<List<MatOfPoint>, List<RotatedRec
groupedContours.clear();
if (input.size() > 0) {
if (input.size() > (group.equals(TargetGroup.Single) ? 0 : 1)) {
List<MatOfPoint> sorted = new ArrayList<>(input);
sorted.sort(sortByMomentsX);

View File

@@ -18,6 +18,7 @@ public class RequestHandler {
ObjectMapper objectMapper = new ObjectMapper();
try {
Map map = objectMapper.readValue(ctx.body(), Map.class);
// TODO: change to function, to restart NetworkTables
ConfigManager.settings.teamNumber = (int) map.get("teamNumber");