Skip to content

Migrate NNM Settings to SQLITE #1894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const handleImport = async () => {
});

axios
.post("/utils/importObjectDetectionModel", formData, {
.post("/objectdetection/import", formData, {
headers: { "Content-Type": "multipart/form-data" }
})
.then((response) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ public boolean saveUploadedAprilTagFieldLayout(Path uploadPath) {
return m_provider.saveUploadedAprilTagFieldLayout(uploadPath);
}

public boolean saveUploadedNeuralNetworkProperties(Path uploadPath) {
return m_provider.saveUploadedNeuralNetworkProperties(uploadPath);
}

public void requestSave() {
logger.trace("Requesting save...");
saveRequestTimestamp = System.currentTimeMillis();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ public void clearConfig() {
public abstract boolean saveUploadedNetworkConfig(Path uploadPath);

public abstract boolean saveUploadedAprilTagFieldLayout(Path uploadPath);

public abstract boolean saveUploadedNeuralNetworkProperties(Path uploadPath);
}
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,12 @@ public void load() {

this.config =
new PhotonConfiguration(
hardwareConfig, hardwareSettings, networkConfig, atfl, cameraConfigurations);
hardwareConfig,
hardwareSettings,
networkConfig,
atfl,
new NeuralNetworkProperties(),
cameraConfigurations);
}

@Override
Expand Down Expand Up @@ -484,4 +489,11 @@ private void saveAndWriteTask() {
public void unloadCameraConfigs() {
this.config.getCameraConfigurations().clear();
}

@Override
public boolean saveUploadedNeuralNetworkProperties(Path uploadPath) {
// TODO I'm not implementing this cause nobody with the legacy config is gonna have one of these
throw new UnsupportedOperationException(
"Unimplemented method 'saveUploadedNeuralNetworkProperties'");
}
}
Loading
Loading