mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
changed stream resolution list from ratio
- changed the resolution list to be the actual resolution instead of ratio - changed development port to be 5800
This commit is contained in:
@@ -9,6 +9,7 @@ import edu.wpi.first.networktables.NetworkTable;
|
||||
import edu.wpi.first.networktables.NetworkTableInstance;
|
||||
import org.opencv.core.Mat;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
@@ -304,9 +305,14 @@ public class Camera {
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> getResolutionList() {
|
||||
public List<HashMap> getResolutionList() {
|
||||
return Arrays.stream(availableVideoModes)
|
||||
.map(res -> String.format("%sx%s@%sFPS, %s", res.width, res.height, res.fps, res.pixelFormat.toString()))
|
||||
.map(res -> new HashMap<String,Object>(){{
|
||||
put("width", res.width);
|
||||
put("height", res.height);
|
||||
put("fps", res.fps);
|
||||
put("pixelFormat", res.pixelFormat);
|
||||
}})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ public enum StreamDivisor {
|
||||
none(1),
|
||||
half(2),
|
||||
quarter(4),
|
||||
sixth(6);
|
||||
eighth(8);
|
||||
|
||||
public final Integer value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user