Skip to content

Commit

Permalink
Run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Dec 28, 2023
1 parent ecae647 commit db73bbb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const getCalibrationCoeffs = (resolution: Resolution): CameraCalibrationResult |
const getMeanFromView = (o: BoardObservation) => {
// Is this the right formula for RMS error? who knows! not me!
const perViewSumSquareReprojectionError = o.reprojectionErrors.flatMap((it2) => [it2.x, it2.y]);
// For each error, square it, sum the squares, and divide by total points N
return Math.sqrt(
perViewSumSquareReprojectionError.map((it) => Math.pow(it, 2)).reduce((a, b) => a + b, 0) /
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@

package org.photonvision.vision.pipeline;

import java.util.Map;

import org.opencv.core.Size;

public class UICalibrationData {
public int videoModeIndex;
public int count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import java.util.LinkedList;
import java.util.List;
import java.util.function.BiConsumer;

import org.opencv.core.Size;
import org.photonvision.common.configuration.CameraConfiguration;
import org.photonvision.common.configuration.ConfigManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

package org.photonvision.vision.processes;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Map;
import org.apache.commons.lang3.tuple.Pair;
Expand Down Expand Up @@ -107,7 +106,9 @@ public void onDataChangeEvent(DataChangeEvent<?> event) {
case "startCalibration":
// var data = UICalibrationData.fromMap((Map<String, Object>) newPropValue);
try {
var data = JacksonUtils.deserialize((Map<String, Object>)newPropValue, UICalibrationData.class);
var data =
JacksonUtils.deserialize(
(Map<String, Object>) newPropValue, UICalibrationData.class);
parentModule.startCalibration(data);
parentModule.saveAndBroadcastAll();
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public class PipelineManagerTest {
@Test
public void testUniqueName() {
TestUtils.loadLibraries();
PipelineManager manager = new PipelineManager(new DriverModePipelineSettings(), List.of(), "meme_name");
PipelineManager manager =
new PipelineManager(new DriverModePipelineSettings(), List.of(), "meme_name");
manager.addPipeline(PipelineType.Reflective, "Another");

// We now have ["New Pipeline", "Another"]
Expand Down

0 comments on commit db73bbb

Please sign in to comment.