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

custom i2c drivers in OnBot Java always require robot restart on rebuild #565

Open
pmichaud opened this issue Jan 17, 2023 · 0 comments
Open

Comments

@pmichaud
Copy link

Reporting this as an issue after a brief discussion and recommendation from a core FtcRobotController developer.

We have some I2C devices on our robot that we have written I2C drivers for, using the guide at https://github.com/FIRST-Tech-Challenge/ftcrobotcontroller/wiki/Writing-an-I2C-Driver . An example driver for the Adafruit LED Backpack ( https://www.adafruit.com/product/902 ) is attached.

Whenever we do "Rebuild Everything" in OnBot Java, running an OpMode results in the I2C hardware devices being not found in the hardwareMap via hardwareMap.get() . We find we have to do a "Robot Restart" from the Driver Station in order to get the I2C device to be available again. This occurs even if the I2C device code remains unmodified -- any change to the the OnBot Java files requires a robot restart to be able to look up the I2C device in the hardwareMap .

I have theories for why this happens, but was advised that this is a bug and should be reported here.

Knowing that there might not be a new release on the horizon, are there any good workarounds in the meantime? The team can obviously continue to Restart Robot after every build, but that gets a bit tedious after a while. We'd also be happy to create precompiled versions of the drivers (.jar, .class, .aar) to be made available on OnBot Java, but we're not quite sure how to do that in the FtcRobotController ecosystem.

Thanks for any assistance to be provided here.

Pm

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

1 participant