Conversation
…d documentation - Add complete type hints throughout Python backend (photon_sc_app.py) * All function signatures include parameter and return type annotations * Use Optional[], Dict[], list[] generic types for clarity * Union types for service instantiation polymorphism - Format code with black for consistency and PEP 8 compliance - Enhance docstrings across all classes and methods * Module-level overview explaining architecture and deployment modes * SocketActivatedService: systemd socket activation protocol documentation * LocalService: development server details * ServiceHandler: HTTP routing and status/tabs endpoint details * Comprehensive signal_handler documentation - Update frontend JavaScript with detailed JSDoc comments * Explain tab switching logic and event handling * Document URL parsing and error handling in fetchTabs() * Clear function-level comments with parameters and return types - Restore iframe sandbox attribute for security - Remove broken cross-origin proxy endpoint - Add CI/CD integration: build-ipk job to GitHub Actions * Automatically build .ipk artifacts on push * Upload to release assets - Add run_local.sh and run_local.bat for convenient local development - Update .gitignore for build artifacts (photon-sc-app/build/, *.ipk) All Python code now passes syntax validation and black formatting checks.
… refresh intervals Discovery Suite Architecture: - Modular discovery strategies: mDNS, network scan (10.TE.AM.0/24), port 5800 check, NetworkTables - Background DiscoveryCache thread for low-CPU periodic updates - Independent refresh intervals for fast (mDNS, port checks) vs slow (network scan) strategies Background Discovery Features: - DiscoveryCache class manages periodic discovery in daemon thread - Fast strategies default to 10-second cycles (mDNS, port verification) - Slow strategies default to 60-second cycles (network scan, NetworkTables) - Tunable via command-line args: --discovery-fast-interval, --discovery-slow-interval - Can disable fast/slow strategies with --discovery-disable-fast/--discovery-disable-slow - Thread-safe cache using RLock, responsive to stop signal with 0.5s sleep precision - Low CPU overhead: sleeps most of the time, wakes only for periodic discovery ServiceHandler Integration: - /tabs endpoint now serves results from DiscoveryCache instead of blocking on discovery - Instant response even if discovery is running (cache coherency via lock) - Multiple requests don't trigger redundant discovery Both SocketActivatedService and LocalService now: - Create and pass DiscoveryCache to request handlers - Start discovery thread on service startup - Cleanly stop discovery thread on shutdown Additional improvements: - Enhanced styles.css with .empty-state styling for no-dashboards case - Updated logger to use string formatting instead of print() - Added team number to discovery log output - Updated docstrings to explain background caching architecture
- Rewrite networktables_discovery.py to connect to the roboRIO NT server, enumerate subtables under /photonvision/, validate cameras by checking for rawBytes (same logic as PhotonCamera.java), and resolve coprocessor hostnames via mDNS - Update aggregator.py to pass team_number to NT strategy - Remove unused imports (threading, discover_all, EventFlags) - Add NT structure reference to README - Add NT4 persist files to gitignore
mcm001
reviewed
Jul 3, 2026
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| def discover_mdns() -> Set[str]: |
Contributor
There was a problem hiding this comment.
We could consider instead using #351 and the robotpy bindings of wpilib's multicast resolver to discover photonvision instances
mcm001
reviewed
Jul 3, 2026
Comment on lines
+60
to
+62
| instance = NetworkTableInstance.create() | ||
| instance.setServerTeam(team_number, NT_SERVER_PORT) | ||
| instance.startClient(NT_CLIENT_IDENTITY) |
Contributor
There was a problem hiding this comment.
I believe youll need a MultiSubscriber here, like how PhotonCamera works.
// Existing is enough to make this multisubscriber do its thing
topicNameSubscriber =
new MultiSubscriber(instance, new String[] {"/photonvision/"}, PubSubOption.TOPICS_ONLY);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Making a first pass at a SystemCore App for PhotonVision
Meta
Merge checklist: