Comments (3)
Sounds good.
One point for question: should the returned collection be read-only, a capture, or fully backed and writeable?
from allwpilib.
Sounds good.
One point for question: should the returned collection be read-only, a capture, or fully backed and writeable?
Good question, I would have just put a getter for the existing collection in there, which would have made for some interesting bugs when teams started tweaking the returned collection.
For the purposes I envision, a read-only would be great. A writable capture would be confusing, and fully backed would be problematic (how to detect and properly respond to changes to the collection?)
For performance reasons, I wonder if a read-only copy should be kept and maintained by the scheduler as subsystems are added. I would worry about someone putting a for (var subsystem : CommandScheduler.getAllSubsystems())
in a periodic. Is that a legit concern?
from allwpilib.
If ImmutableSet(m_subsystems.keySet())
still reads from the backing set (rather than a one-time copy), that can be a simple solution.
EDIT: Collections.unmodifiableSet
looks like exactly what we need.
C++ would also be interesting, I'm not versed enough with C++ STL/LLVM collections to know how this can be done properly.
EDIT: C++20 has https://en.cppreference.com/w/cpp/ranges/keys_view, that might do what we need if it's compatible with llvm::DenseMap
from allwpilib.
Related Issues (20)
- Remove CANcoder Phoenix 5 preset from SysId in 2025
- [discussion] Prefer LTV over Ramsete HOT 3
- Why do we have Interpolatable and Interpolator? HOT 1
- Java `EncoderSim.setDistancePerPulse` has incorrect parameter name and description
- Ability to see activity on commands embedded in a composite command HOT 1
- DataLog should be able to record nulls HOT 4
- Unify the various DataLog*Entry to have a common superclass HOT 3
- Include server receive timestamp in NT Value
- wpilog DS:autonomous signal not logged in some matches HOT 2
- Datalog version endianness is inconsistent HOT 1
- Documentation for `PIDController.setIntegratorRange` is incorrect; some checks for non-negativity of the PID constants are missing HOT 2
- The `Sendable` for `PIDController` does not contain the values for the integrator range HOT 1
- DutyCycleEncoder .get() method randomly jumps up 1 revolution HOT 1
- Fix Alliance logs to properly show invalid state.
- Add ability to get Rotation2d as Measurement<Angle>
- Calling `GetCanStatus` causes noisy CAN utilization measurements HOT 1
- C++ Command Based: Assertion failed: isHandleInSync() && โinvalid iterator access!โ HOT 21
- angle of module position delta in odometry? HOT 6
- [math] Pose2d.minus has unexpected behavior; seems to rotate the translation HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from allwpilib.