mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-22 01:11: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);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ evaluationDependsOn(':photon-core')
|
||||
mainClassName = 'org.photonvision.Main'
|
||||
|
||||
group 'org.photonvision'
|
||||
version versionString
|
||||
version versionString + (project.hasProperty('pionly') ? "-raspi" : "")
|
||||
|
||||
apply from: "${rootDir}/shared/common.gradle"
|
||||
|
||||
@@ -25,7 +25,6 @@ dependencies {
|
||||
shadowJar {
|
||||
configurations = [project.configurations.runtimeClasspath]
|
||||
String name = "photonvision-${project.version}"
|
||||
if(project.hasProperty('pionly')) name += "-raspi"
|
||||
archiveFileName.set("${name}.jar")
|
||||
}
|
||||
|
||||
@@ -94,7 +93,7 @@ task findDeployTarget {
|
||||
boolean canContact = false;
|
||||
try {
|
||||
InetAddress testAddr = InetAddress.getByName(testRmt.host)
|
||||
canContact = testAddr.isReachable(5000)
|
||||
canContact = testAddr.isReachable(2000)
|
||||
} catch(UnknownHostException e) {
|
||||
canContact = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user