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

Elevator sim #14

Merged
merged 40 commits into from
Feb 4, 2024
Merged

Elevator sim #14

merged 40 commits into from
Feb 4, 2024

Conversation

Emma03L
Copy link
Contributor

@Emma03L Emma03L commented Jan 23, 2024

This is actually Gaia, I did the mistake of working from Emma's profile.
peace and love

@Emma03L Emma03L added the fun label Jan 23, 2024
@Emma03L Emma03L requested review from katzuv and vichik123 January 23, 2024 18:35
@Emma03L Emma03L changed the title Feature/elevator sim elevator sim Jan 23, 2024
@Emma03L Emma03L changed the base branch from main to develop January 23, 2024 18:38
@katzuv katzuv changed the base branch from develop to main January 23, 2024 18:41
@katzuv katzuv changed the base branch from main to develop January 23, 2024 18:43
Comment on lines 31 to 32
powerRequest.withOutput(power);
motor.setControl(powerRequest);
Copy link
Member

Choose a reason for hiding this comment

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

All of the .with* methods return the object so you can combine both lines (everywhere)

Copy link
Contributor

Choose a reason for hiding this comment

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

motor.update(Timer.getFPGATimestamp());
inputs.currentHeight =
Meters.of(
lib.units.Units.rpsToMetersPerSecond(
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. Notice that the TalonFXSim constructor has a parameter called conversionFactor, which works exactly the same as the real motor conversion factor.

Copy link
Member

Choose a reason for hiding this comment

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

I keep forgetting this is your class and not Phoenix's sim classes lol

Copy link
Contributor

@GaiaZano05 GaiaZano05 Feb 4, 2024

Choose a reason for hiding this comment

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

fixed it a long time ago

@vichik123 vichik123 changed the title elevator sim Elevator sim Jan 24, 2024
Copy link
Member

@katzuv katzuv left a comment

Choose a reason for hiding this comment

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

Missing Command.withName() decorators everywhere (should be written like normal text and not in camelCase).

@vichik123
Copy link
Contributor

vichik123 commented Jan 28, 2024

I am greatly confuzzled. Github shows a diff between this branch and the base in irrelevant files, and intellij sees it too. And yet, when I run git diff develop those changes don't show.
@katzuv please help.

@katzuv
Copy link
Member

katzuv commented Jan 29, 2024

I am greatly confuzzled.

Unfortunately, I'm also not sure what happened. There was a problem with the merge commit -- for example, if you look at this commit, GitHub recognizes it's a merge commit:

image

If you click on "view the diff", you'll get to f261626, and there you can see it has two parents, as it should be:

image

But, if you look at 24472e1, which looks like a merge commit, it has only one parent:

image

Looks like the files were added to this branch separately and not merged from develop. The cynical me will say it's GitKraken's fault (I don't know whether you used it for this merge). Perhaps you merged develop into one branch, then cherry-picked that commit in all other branches? I'm not familiar with Git internals, but merge commits should probably be made with regular merges for Git to understand they are merge commits, so files from other branches won't be detected as new files (but as files added from another branch).

Github shows a diff between this branch and the base in irrelevant files, and intellij sees it too. And yet, when I run git diff develop those changes don't show.

Unfortunately, here too I'm not entirely sure what causes this inconsistency. It might be that GitHub compares commits, so it thinks some files are new, but Git compares the files themselves, so it knows there isn't really a diff. I believe a quick Google search will shed more light on this Git mechanism.

As for merging these problematic PRs, I think you might have some merge conflicts, but not something worse. Just make sure you choose the right things. You may also be interested in using this GitHub feature which detects when the PR branch is out of sync with the base branch and can update the PR branch in one click. I recommend doing so with a rebase to reduce the amount of clutter commits. Note however that this should be done by the PR author to prevent conflicts.

Feel free to ask any additional questions you have and I'll do my best to answer. BTW, your PR was approved wpilibsuite/allwpilib#6313 (review), but not yet merged.

@vichik123 vichik123 merged commit 3d6632f into develop Feb 4, 2024
0 of 2 checks passed
@vichik123 vichik123 deleted the feature/elevator-sim branch February 4, 2024 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants