Skip to content
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

8.1 SDK Undocumented breaking change: OpMode telemetry field is now final #495

Closed
kevinfrei opened this issue Nov 26, 2022 · 7 comments
Closed

Comments

@kevinfrei
Copy link

Anyone using the FtcDashboard has to work around this. Anyone using libraries that try to integrate seamlessly with the Telemetry system probably has even more work to do.

Are there release notes somewhere that explain the logic behind this change? I'd be even more interested in reading the justification for deploying a breaking change (of any sort) mid-season.

@kevinfrei kevinfrei changed the title 8.1 SDK: OpMode telemetry field is now final 8.1 SDK Undocumented breaking change: OpMode telemetry field is now final Nov 26, 2022
@kevinfrei
Copy link
Author

(Ideally, could y'all undo the change for 8.2?)

@texasdiaz
Copy link
Collaborator

@kevinfrei Would you be willing to help us test release candidate patch 8.1.1 once it is ready?

@kevinfrei
Copy link
Author

Absolutely!

@texasdiaz
Copy link
Collaborator

Please send me an email to ftctech@firstinspires.org so I can notify you about the release candidate and provide instructions.

@ymanchanda
Copy link

We use roadrunner and after updating to 8.1 we are getting a build error "cannot assign a value to final variable telemetry" in the opmodes, AutomaticFeedForwardTuner, DriveVelocityPIDTuner, ManualFeedForwardTuner for this line of code:
telemetry = new MultipleTelemetry(telemetry, dashboard.getTelemetry());

Please help!

@cmacfarl
Copy link
Member

@ymanchanda

The problem is that your opmode, through its integration with FtcDashboard, wants to hijack the Telemetry object declared in OpModeInternal wherein it is declared with the 'final' modifier. You can not assign a value to a member declared final outside of its initialization. This was the result of some refactoring that appeared in v8.1.

We are in the process of turning the crank on a v8.1.1 release that will contain a fix for both this and #492

In the meantime, as a workaround, you should be able to declare a new Telemetry object with a name that's not 'telemetry' in your opmode. Assign that the result of creating a new instance of MultipleTelemetry, and then use that new instance within your opmode, and things should work as before. Disclaimer, I haven't actually done this hence all the normal "should work" disclaimers apply.

@texasdiaz
Copy link
Collaborator

This has been fixed in 8.1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants