Skip to content

Refactor MAC address detection#1991

Merged
samfreund merged 3 commits intoPhotonVision:mainfrom
Gold856:refactor-mac-address-detection
Jul 13, 2025
Merged

Refactor MAC address detection#1991
samfreund merged 3 commits intoPhotonVision:mainfrom
Gold856:refactor-mac-address-detection

Conversation

@Gold856
Copy link
Member

@Gold856 Gold856 commented Jul 6, 2025

Description

MAC address detection didn't work on devices where PhotonVision doesn't manage the networking, as the logic pulled the interface name from the config. It also repeatedly spammed the logs with messages, which is super annoying and makes the logs harder to navigate. The system has been modified to use Java's NetworkInterface class to find a network interface on devices where PhotonVision doesn't manage networking, and the extra debug log has been removed since it doesn't tell us any information.

Resolves #1990.

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • 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 v2024.3.1
  • 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

@Gold856 Gold856 requested a review from a team as a code owner July 6, 2025 05:24
@samfreund
Copy link
Member

Looks good, I'll test and confirm when I have time.

@samfreund samfreund enabled auto-merge (squash) July 13, 2025 04:34
@samfreund samfreund merged commit 6610b21 into PhotonVision:main Jul 13, 2025
39 checks passed
@Gold856 Gold856 deleted the refactor-mac-address-detection branch July 13, 2025 06:19
@Gold856 Gold856 added the backend Things relating to photon-core and photon-server label Aug 4, 2025
Gold856 added a commit that referenced this pull request Aug 11, 2025
## Description

After #1991, the program state was always resent in an attempt to
simplify logic, but this had the side effect of causing the settings UI
to reset periodically when the hostname check was performed. This
restores the original logic in #1791 to check for differences in the
conflict state, and to only send the program state if it's changed.

## 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 v2024.3.1
- [ ] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Things relating to photon-core and photon-server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants