We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm looking for a way to programmatically register classes into the FTCDashboard config system. Here's what I'm trying to do:
object TunerRegistrar { private fun OpModeManager.register(cls: KClass<out OpMode>) { this.register( OpModeMeta(cls.simpleName!!, OpModeMeta.Flavor.AUTONOMOUS, "Tuning"), cls.java) FtcDashboard.getInstance().configRoot.putVariable( ReflectionConfig.createVariableFromClass(cls.java)) } @JvmStatic @OpModeRegistrar fun registerTuners(mgr: OpModeManager) { if (DEBUG) { mgr.register(DumbWheelSpinner::class) mgr.register(WheelDirectionTester::class) mgr.register(TrackWidthTuner::class) mgr.register(DriveVelocityPIDTuner::class) mgr.register(FollowerPIDTuner::class) mgr.register(TurnTest::class) mgr.register(StraightTest::class) mgr.register(SplineTest::class) mgr.register(VisionTest::class) } } }
However, ReflectionConfig.createVariableFromClass is a private method. Could it be made public so that this could be possible?
ReflectionConfig.createVariableFromClass
Thank you!
The text was updated successfully, but these errors were encountered:
8f6818d
Make ReflectionConfig#createVariableFromClass() public (fixes acmerob…
efb3f2b
…otics#18)
No branches or pull requests
I'm looking for a way to programmatically register classes into the FTCDashboard config system. Here's what I'm trying to do:
However,
ReflectionConfig.createVariableFromClass
is a private method. Could it be made public so that this could be possible?Thank you!
The text was updated successfully, but these errors were encountered: