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

Fix runtime errors on develop #30

Merged
merged 1 commit into from
Mar 8, 2022
Merged

Fix runtime errors on develop #30

merged 1 commit into from
Mar 8, 2022

Conversation

ky28059
Copy link
Member

@ky28059 ky28059 commented Mar 8, 2022

Fixes:

  • ClassCastException when attempting to use GRTNetworkTableEntry.getValue() -- it was returning a NetworkTableValue instance instead of the Object value
  • NullPointerException in TurretSubsystem.periodic() after robot initialization -- this was an oversight with when jetson was non-null and it was attempting to calculate the hub location from previousPosition which was initialized to null

@ky28059 ky28059 requested review from e3l and eggaskin March 8, 2022 04:12
@ky28059 ky28059 changed the title Fix GRTNetworkTableEntry and TurretSubsystem Fix runtime errors on develop Mar 8, 2022
Copy link
Contributor

@e3l e3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. We might get some weird behavior in the future with previousPosition when we reset the pose in auto..

@ky28059
Copy link
Member Author

ky28059 commented Mar 8, 2022

We might get some weird behavior in the future with previousPosition when we reset the pose in auto..

There's probably a more elegant solution in the auton sequential command groups to set turret's previous position at the end of the sequence (or even just when teleop initializes to call some turretSubsystem.resetPreviousPosition() method to set it back to current localization readings) but since auton is still a draft and we're always currently starting at (0, 0) this works for now

@eggaskin eggaskin merged commit c8916d9 into develop Mar 8, 2022
@ky28059 ky28059 deleted the runtime-errors branch March 8, 2022 18:32
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

Successfully merging this pull request may close these issues.

3 participants