Force reload after restart and switch URL after IP change (#2278)

## Description

Forces a reload after restarting PhotonVision, restarting the
coprocessor, performing an offline update, or nuking the install. We
wait until we are reconnected to the coprocessor to reload, this is
accomplished by the addition of a status API endpoint.

This is being implemented due to issues experienced when the webpage is
not updated (particularly during offline updates).

---

Using the same statusCheck, we also wait until a new IP is available,
then change to it, after changing our static IP.

---

closes #2169
closes #903

## Meta

Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] The description documents the _what_ and _why_
- [ ] If this PR changes behavior or adds a feature, user documentation
is updated
- [ ] If this PR touches photon-serde, all messages have been
regenerated and hashes have not changed unexpectedly
- [ ] If this PR touches configuration, this is backwards compatible
with settings back to v2025.3.2
- [ ] If this PR touches pipeline settings or anything related to data
exchange, the frontend typing is updated
- [ ] If this PR addresses a bug, a regression test for it is added
This commit is contained in:
Sam Freund
2026-01-07 01:53:05 -06:00
committed by GitHub
parent e993cca067
commit 3f9e2a9fa8
5 changed files with 116 additions and 47 deletions

View File

@@ -75,6 +75,11 @@ public class RequestHandler {
private static boolean testMode = false;
public static void onStatusRequest(Context ctx) {
ctx.status(200);
ctx.result("not dead yet");
}
public static void setTestMode(boolean isTestMode) {
testMode = isTestMode;
}