mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Fix driver mode settings, sort resolutions (#115)
* Fix DriverMode settings * Update FileVisionSource.java * Sort modes by resolution * Filter duplicated modes * run spotless * Fix calibration bug * run format * aaaaa * Add hardware and platform support * decrease timing sensitivity * Better handle jvm exitg * Make reboot happen immediately * Cleanup restart * Remove debug print * Fix Jackson exploding when deserializing old versions of configs * Add unit test for old config versions * Run format * Add a comment * remove isvendorcam from pipeline manager * oops
This commit is contained in:
@@ -20,7 +20,6 @@ package org.photonvision;
|
||||
import edu.wpi.cscore.CameraServerCvJNI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import org.apache.commons.cli.*;
|
||||
import org.photonvision.common.configuration.CameraConfiguration;
|
||||
import org.photonvision.common.configuration.ConfigManager;
|
||||
@@ -84,7 +83,7 @@ public class Main {
|
||||
}
|
||||
|
||||
private static void addTestModeSources() {
|
||||
var collectedSources = new HashMap<VisionSource, List<CVPipelineSettings>>();
|
||||
var collectedSources = new HashMap<VisionSource, CameraConfiguration>();
|
||||
|
||||
var camConf2019 =
|
||||
new CameraConfiguration("WPI2019", TestUtils.getTestMode2019ImagePath().toString());
|
||||
@@ -115,8 +114,12 @@ public class Main {
|
||||
|
||||
var fvs2020 = new FileVisionSource(camConf2020);
|
||||
|
||||
collectedSources.put(fvs2019, psList2019);
|
||||
collectedSources.put(fvs2020, psList2020);
|
||||
var cfg2019 = new CameraConfiguration("2019", "2019");
|
||||
cfg2019.pipelineSettings = psList2019;
|
||||
var cfg2020 = new CameraConfiguration("2019", "2019");
|
||||
cfg2020.pipelineSettings = psList2020;
|
||||
collectedSources.put(fvs2019, cfg2019);
|
||||
collectedSources.put(fvs2020, cfg2020);
|
||||
|
||||
// logger.info("Adding " + allSources.size() + " configs to VMM.");
|
||||
VisionModuleManager.getInstance().addSources(collectedSources).forEach(VisionModule::start);
|
||||
|
||||
Reference in New Issue
Block a user