-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide async notification of DS state changes #151
Comments
I would be happy to implement this in Java, but I disagree with a few points:
Is there a way to write functional robot code without using As I understand it, the wanted functionality is pretty much |
What kind of stuff would we be running asynchronously? Is the idea that we'd have gyro calibration, for example, happen on the library side on DS transition, and the user wouldn't see it? |
I think this would be useful mostly for team libraries, and/or decentralization of the |
You can already get that "decentralization" by making a MySubsystem.teleopInit() function and call that in TimedRobot.telopInit(), and it's much easier to reason about and debug. Team libraries could do the same thing. Are there specific kinds of libraries you had in mind? As @prateekma pointed out on the FRC Discord, a callback is useful when you don't have access to the state change, but you do in this case via the TimedRobot init() methods. |
not really, it's just a possible reason I thought of. If this isn't a useful feature anymore, close this issue. |
For some features (like gyro calibration) it would be a nice feature to be able to hook into transitions from disabled to autonomous/teleop. Currently this can only be done in the RobotBase class, but a feature to monitor these changes in the DS thread and call a callback would be relatively easy to implement and provide this ability more independently of user code.
The text was updated successfully, but these errors were encountered: