Skip to content

Conversation

@PillageDev
Copy link
Member

Kinematics.java

  • leftEncoderPostion -> leftEncoderPosition
  • Made distance variable inline
  • Simplified atPose() if statement

Autobalance.java

  • INTERGRAL_LIMIT -> INTEGRAL_LIMIT

Rotate.java

  • initalAngle -> initialAngle

Arm.java

  • Removed unnecessary *1 and /1
  • Simplified if statements

WriteToCSV.java

  • simplified if statement

@PillageDev PillageDev self-assigned this Jul 22, 2023
Copy link
Contributor

@bjmcternan bjmcternan left a comment

Choose a reason for hiding this comment

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

Nice work. A few fixes and some stuff to think about.

@PillageDev PillageDev requested a review from bjmcternan July 25, 2023 02:10
Copy link
Contributor

@bjmcternan bjmcternan left a comment

Choose a reason for hiding this comment

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

One more

Copy link
Contributor

@bjmcternan bjmcternan left a comment

Choose a reason for hiding this comment

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

One more

@PillageDev PillageDev requested a review from bjmcternan July 25, 2023 02:22
bjmcternan
bjmcternan previously approved these changes Jul 25, 2023
Copy link
Contributor

@bjmcternan bjmcternan left a comment

Choose a reason for hiding this comment

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

Nice work

@bjmcternan
Copy link
Contributor

Poke someone else on the team to review it tomorrow so you can merge it

@PillageDev
Copy link
Member Author

Yea anand is reviewing tomorrow he said

@NathanEdg
Copy link
Member

Will we ever not use booleans? Like teach the other members about the non boolean methods

@LavaWaffle
Copy link
Contributor

Could you clarify what you mean by not use booleans? Are you talking in terms of comparison and using strings with .equals?

@NathanEdg
Copy link
Member

Yea or not using == true rather than like

if (someVar) {} in substitute for

if (someVar == true) {}

or

if (!someVar) {}

rather than

if (someVar == false) {}

@LavaWaffle
Copy link
Contributor

We should make sure everyone knows that you can simply just write if (var) instead of if (true == var), but in our code we should stick to true == and false == for readability.

@NathanEdg
Copy link
Member

Yea

@bjmcternan
Copy link
Contributor

Readability is a great reason but there's another one:
In Java this is not an issue, but in some languages if(foo = 10) will assign foo a value of 10 and be TRUE.
This is the case for C. Check it out: https://onlinegdb.com/RS9imtWX2

if(10 = foo) will result in a compilation error which is better than chasing a single character logic issue. Just a good idea to get in the habit of defensive programming.

Copy link
Contributor

@LavaWaffle LavaWaffle left a comment

Choose a reason for hiding this comment

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

Looks good!

@NathanEdg
Copy link
Member

bjmcternan I think it requires your review again

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.

4 participants