mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
Fix .gitignore, move vision package out of common
This commit is contained in:
@@ -2,7 +2,7 @@ package org.photonvision.server;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Server.main(5800);
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
Server.main(5800);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,49 +5,41 @@ import io.javalin.http.Context;
|
||||
|
||||
public class RequestHandler {
|
||||
|
||||
private static final ObjectMapper kObjectMapper = new ObjectMapper();
|
||||
private static final ObjectMapper kObjectMapper = new ObjectMapper();
|
||||
|
||||
/**
|
||||
* Parses and saves general settings to the config manager.
|
||||
*/
|
||||
public static void onGeneralSettings(Context context) {
|
||||
return;
|
||||
}
|
||||
/** Parses and saves general settings to the config manager. */
|
||||
public static void onGeneralSettings(Context context) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses and saves camera settings (FOV and tilt) to the current camera.
|
||||
*/
|
||||
public static void onCameraSettings(Context context) {
|
||||
return;
|
||||
}
|
||||
/** Parses and saves camera settings (FOV and tilt) to the current camera. */
|
||||
public static void onCameraSettings(Context context) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Duplicates the selected camera
|
||||
*/
|
||||
public static void onDuplicatePipeline(Context context) {
|
||||
return;
|
||||
}
|
||||
/** Duplicates the selected camera */
|
||||
public static void onDuplicatePipeline(Context context) {
|
||||
return;
|
||||
}
|
||||
|
||||
public static void onCalibrationStart(Context context) {
|
||||
return;
|
||||
}
|
||||
public static void onCalibrationStart(Context context) {
|
||||
return;
|
||||
}
|
||||
|
||||
public static void onSnapshot(Context context) {
|
||||
return;
|
||||
}
|
||||
public static void onSnapshot(Context context) {
|
||||
return;
|
||||
}
|
||||
|
||||
public static void onCalibrationEnding(Context context) {
|
||||
return;
|
||||
}
|
||||
public static void onCalibrationEnding(Context context) {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses and saves the current 3d settings to the current pipeline.
|
||||
*/
|
||||
public static void onPnpModel(Context context) {
|
||||
return;
|
||||
}
|
||||
/** Parses and saves the current 3d settings to the current pipeline. */
|
||||
public static void onPnpModel(Context context) {
|
||||
return;
|
||||
}
|
||||
|
||||
public static void onInstallOrUpdate(Context context) {
|
||||
return;
|
||||
}
|
||||
public static void onInstallOrUpdate(Context context) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,31 +4,31 @@ import io.javalin.Javalin;
|
||||
|
||||
public class Server {
|
||||
|
||||
public static void main(int port) {
|
||||
Javalin app =
|
||||
Javalin.create(
|
||||
javalinConfig -> {
|
||||
javalinConfig.showJavalinBanner = false;
|
||||
javalinConfig.addStaticFiles("web");
|
||||
javalinConfig.enableCorsForAllOrigins();
|
||||
});
|
||||
/*Web Socket Events */
|
||||
app.ws(
|
||||
"/websocket",
|
||||
ws -> {
|
||||
ws.onConnect(SocketHandler::onConnect);
|
||||
ws.onClose(SocketHandler::onClose);
|
||||
ws.onBinaryMessage(SocketHandler::onBinaryMessage);
|
||||
});
|
||||
/*API Events*/
|
||||
app.post("/api/settings/general", RequestHandler::onGeneralSettings);
|
||||
app.post("/api/settings/camera", RequestHandler::onCameraSettings);
|
||||
app.post("/api/vision/duplicate", RequestHandler::onDuplicatePipeline);
|
||||
app.post("/api/settings/startCalibration", RequestHandler::onCalibrationStart);
|
||||
app.post("/api/settings/snapshot", RequestHandler::onSnapshot);
|
||||
app.post("/api/settings/endCalibration", RequestHandler::onCalibrationEnding);
|
||||
app.post("/api/vision/pnpModel", RequestHandler::onPnpModel);
|
||||
app.post("/api/install", RequestHandler::onInstallOrUpdate);
|
||||
app.start(port);
|
||||
}
|
||||
public static void main(int port) {
|
||||
Javalin app =
|
||||
Javalin.create(
|
||||
javalinConfig -> {
|
||||
javalinConfig.showJavalinBanner = false;
|
||||
javalinConfig.addStaticFiles("web");
|
||||
javalinConfig.enableCorsForAllOrigins();
|
||||
});
|
||||
/*Web Socket Events */
|
||||
app.ws(
|
||||
"/websocket",
|
||||
ws -> {
|
||||
ws.onConnect(SocketHandler::onConnect);
|
||||
ws.onClose(SocketHandler::onClose);
|
||||
ws.onBinaryMessage(SocketHandler::onBinaryMessage);
|
||||
});
|
||||
/*API Events*/
|
||||
app.post("/api/settings/general", RequestHandler::onGeneralSettings);
|
||||
app.post("/api/settings/camera", RequestHandler::onCameraSettings);
|
||||
app.post("/api/vision/duplicate", RequestHandler::onDuplicatePipeline);
|
||||
app.post("/api/settings/startCalibration", RequestHandler::onCalibrationStart);
|
||||
app.post("/api/settings/snapshot", RequestHandler::onSnapshot);
|
||||
app.post("/api/settings/endCalibration", RequestHandler::onCalibrationEnding);
|
||||
app.post("/api/vision/pnpModel", RequestHandler::onPnpModel);
|
||||
app.post("/api/install", RequestHandler::onInstallOrUpdate);
|
||||
app.start(port);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user