Add a toggle switch to confirm the static IP address is working #2346
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
An incorrect static IP address can make the coprocessor unreachable and may require a reflash to recover access. This PR adds a toggle switch to protect against this occurring.
The switch is located underneath the static IP address entry field as shown here:

The toggle is disabled whenever a change is made to the static IP address and only becomes enabled when the UI reloads after updated network settings have been applied. Once active, the user must select the switch and press "Save" again to persist the static IP settings. If the switch isn't turned on and saved, the coprocessor reverts to DHCP the next time that PhotonVision restarts. If the static IP setting is bad, the user won't be able to turn on the switch and the coprocessor will be reachable again after a power cycle.
This code will detect if it is being applied as an offline update on a coprocessor that already has static IP configured and it will treat it as properly verified and not reset the network to DHCP.
Meta
Merge checklist: