mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-05 03:21:40 +00:00
Upgrade to Gradle 7.2 and WPILib 2022 (#316)
This commit is contained in:
2
photon-server/.gitignore
vendored
2
photon-server/.gitignore
vendored
@@ -8,4 +8,4 @@ bin/*
|
||||
build
|
||||
build/*
|
||||
photonvision/*
|
||||
photonvision_config/*
|
||||
photonvision_config/*
|
||||
|
||||
@@ -19,7 +19,7 @@ dependencies {
|
||||
implementation "org.msgpack:msgpack-core:0.8.20"
|
||||
implementation "org.msgpack:jackson-dataformat-msgpack:0.8.20"
|
||||
|
||||
compile "org.slf4j:slf4j-simple:1.8.0-beta4"
|
||||
implementation "org.slf4j:slf4j-simple:1.8.0-beta4"
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
@@ -75,8 +75,8 @@ remotes {
|
||||
}
|
||||
}
|
||||
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
import java.io.*;
|
||||
import java.net.*;
|
||||
|
||||
task findDeployTarget {
|
||||
doLast {
|
||||
@@ -138,4 +138,3 @@ task deploy {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"teamNumber":0,"connectionType":"DHCP","staticIp":"","hostname":"photonvision","runNTServer":false,"shouldManage":false}
|
||||
{"teamNumber":0,"connectionType":"DHCP","staticIp":"","hostname":"photonvision","runNTServer":false,"shouldManage":false}
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
rootProject.name = 'photon-server'
|
||||
|
||||
|
||||
@@ -14,10 +14,9 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.photonvision;
|
||||
|
||||
import edu.wpi.cscore.CameraServerCvJNI;
|
||||
import edu.wpi.first.cscore.CameraServerCvJNI;
|
||||
import java.util.ArrayList;
|
||||
import org.apache.commons.cli.*;
|
||||
import org.photonvision.common.configuration.CameraConfiguration;
|
||||
|
||||
@@ -14,12 +14,11 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.photonvision.server;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import edu.wpi.first.wpilibj.geometry.Rotation2d;
|
||||
import edu.wpi.first.math.geometry.Rotation2d;
|
||||
import io.javalin.http.Context;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@@ -49,7 +48,6 @@ public class RequestHandler {
|
||||
public static void onSettingUpload(Context ctx) {
|
||||
var file = ctx.uploadedFile("zipData");
|
||||
if (file != null) {
|
||||
|
||||
// Copy the file from the client to a temporary location
|
||||
var tempFilePath =
|
||||
new File(Path.of(System.getProperty("java.io.tmpdir"), file.getFilename()).toString());
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.photonvision.server;
|
||||
|
||||
import io.javalin.Javalin;
|
||||
@@ -25,7 +24,6 @@ public class Server {
|
||||
private static final Logger logger = new Logger(Server.class, LogGroup.WebServer);
|
||||
|
||||
public static void main(int port) {
|
||||
|
||||
Javalin app =
|
||||
Javalin.create(
|
||||
config -> {
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.photonvision.server;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
@@ -43,7 +42,6 @@ import org.photonvision.vision.pipeline.PipelineType;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class SocketHandler {
|
||||
|
||||
private final Logger logger = new Logger(SocketHandler.class, LogGroup.WebServer);
|
||||
private final List<WsContext> users = new CopyOnWriteArrayList<>();
|
||||
private final ObjectMapper objectMapper = new ObjectMapper(new MessagePackFactory());
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.photonvision.server;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.photonvision.server;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -29,7 +28,6 @@ import org.photonvision.common.dataflow.events.OutgoingUIEvent;
|
||||
import org.photonvision.common.logging.Logger;
|
||||
|
||||
public class UIInboundSubscriber extends DataChangeSubscriber {
|
||||
|
||||
public UIInboundSubscriber() {
|
||||
super(
|
||||
Collections.singletonList(DataChangeSource.DCS_WEBSOCKET),
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.photonvision.server;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.photonvision.server;
|
||||
|
||||
import org.photonvision.common.configuration.CameraConfiguration;
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
-1.462385758978924
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
1.9833437176538498
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"baseName":"aaaaaa","uniqueName":"aaaaaa","nickname":"aaaaaa","FOV":70.0,"path":"dev/vid","cameraType":"UsbCamera","currentPipelineIndex":0,"camPitch":{"radians":0.0},"calibrations":[], "cameraLEDs":[]}
|
||||
{"baseName":"aaaaaa","uniqueName":"aaaaaa","nickname":"aaaaaa","FOV":70.0,"path":"dev/vid","cameraType":"UsbCamera","currentPipelineIndex":0,"camPitch":{"radians":0.0},"calibrations":[], "cameraLEDs":[]}
|
||||
|
||||
Reference in New Issue
Block a user