mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-27 02:01:40 +00:00
Add picam resolution type, remove k prefix (#365)
Changes "kUnknown" to "Picam" in resolution dropdown; similarly "kBGR" -> "BGR"
This commit is contained in:
@@ -60,9 +60,10 @@ public class ZeroCopyPicamSource extends VisionSource {
|
||||
* can do after processing. On the IMX219 these FPSes match pretty closely, except for the
|
||||
* 1280x720 mode. We use this to present a rated FPS to the user that's lower than the actual FPS
|
||||
* we request from the GPU. This is important for setting user expectations, and is also used by
|
||||
* the frontend to detect and explain FPS drops.
|
||||
* the frontend to detect and explain FPS drops. This class should ONLY be used by Picam video
|
||||
* modes! This is to make sure it shows up nice in the frontend
|
||||
*/
|
||||
private static class FPSRatedVideoMode extends VideoMode {
|
||||
public static class FPSRatedVideoMode extends VideoMode {
|
||||
public final int fpsActual;
|
||||
public final double fovMultiplier;
|
||||
|
||||
|
||||
@@ -457,7 +457,12 @@ public class VisionModule {
|
||||
internalMap.put("width", videoModes.get(k).width);
|
||||
internalMap.put("height", videoModes.get(k).height);
|
||||
internalMap.put("fps", videoModes.get(k).fps);
|
||||
internalMap.put("pixelFormat", videoModes.get(k).pixelFormat.toString());
|
||||
internalMap.put(
|
||||
"pixelFormat",
|
||||
((videoModes.get(k) instanceof ZeroCopyPicamSource.FPSRatedVideoMode)
|
||||
? "kPicam"
|
||||
: videoModes.get(k).pixelFormat.toString())
|
||||
.substring(1)); // Remove the k prefix
|
||||
|
||||
temp.put(k, internalMap);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user