mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-28 02:11:40 +00:00
Yolo duplication fix (#1713)
Somebody wanted a description, so here I am. This PR fixes an error which caused the discoverModels function to be rerun after each upload of a new model, but without clearing the list of available models. This causes any models that were on the list prior to the import to be duplicated. This PR also makes it so that uploading a model automatically updates the list of available models. --------- Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com> Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
This commit is contained in:
@@ -102,7 +102,7 @@ public class Server {
|
||||
});
|
||||
});
|
||||
|
||||
/*Web Socket Events for Data Exchange */
|
||||
/* Web Socket Events for Data Exchange */
|
||||
var dsHandler = DataSocketHandler.getInstance();
|
||||
app.ws(
|
||||
"/websocket_data",
|
||||
@@ -112,7 +112,7 @@ public class Server {
|
||||
ws.onBinaryMessage(dsHandler::onBinaryMessage);
|
||||
});
|
||||
|
||||
/*API Events*/
|
||||
/* API Events */
|
||||
// Settings
|
||||
app.post("/api/settings", RequestHandler::onSettingsImportRequest);
|
||||
app.get("/api/settings/photonvision_config.zip", RequestHandler::onSettingsExportRequest);
|
||||
@@ -129,7 +129,7 @@ public class Server {
|
||||
app.post("/api/utils/offlineUpdate", RequestHandler::onOfflineUpdateRequest);
|
||||
app.post(
|
||||
"/api/utils/importObjectDetectionModel",
|
||||
RequestHandler::onObjectDetectionModelImportRequest);
|
||||
RequestHandler::onImportObjectDetectionModelRequest);
|
||||
app.get("/api/utils/photonvision-journalctl.txt", RequestHandler::onLogExportRequest);
|
||||
app.post("/api/utils/restartProgram", RequestHandler::onProgramRestartRequest);
|
||||
app.post("/api/utils/restartDevice", RequestHandler::onDeviceRestartRequest);
|
||||
|
||||
Reference in New Issue
Block a user