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

✨ Add Support for the ADI Expander #245

Merged
merged 70 commits into from Sep 13, 2020
Merged

Conversation

kunwarsahni01
Copy link
Member

@kunwarsahni01 kunwarsahni01 commented Aug 30, 2020

Summary:

Created a new API for the Expander

Motivation:

PROS should support the 3-wire expander because it's a VRC-legal electronic part and PROS supports all the VRC-legal electronics parts.

Refs:

Supercedes #239

Test Plan:

  • Encoder
  • Button
  • Ultrasonic
  • Motor
  • Gyro

kunwarsahni01 and others added 24 commits August 14, 2020 14:36
out, and the headers have been added to the api header file.
@HotelCalifornia HotelCalifornia changed the title Add Support for the ADI Expander ✨ Add Support for the ADI Expander Aug 31, 2020
@HotelCalifornia
Copy link
Contributor

note to maintainers: add @djava to co-authored-by line in the squash merge commit

@WillXuCodes
Copy link
Member

Note: Latest commit above could be potential fix to #197

mooreBrendan and others added 2 commits September 10, 2020 20:21
theol0403
theol0403 previously approved these changes Sep 11, 2020
Copy link
Contributor

@theol0403 theol0403 left a comment

Choose a reason for hiding this comment

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

I know it's been mentioned before, but just want to make sure everyone knows that almost every formatting nit and mistake mentioned here can be automatically detected and corrected by clang-format. It is highly recommended to install a format plugin into your editor, and configure it to format on save. There is a .clang-format file in this repository which contains the format guide and all rules that must be obeyed, making sure that everything has consistent format.

Even running clang-format on the latest commit of this PR still catches a few things (mostly to do with whitespace and line length). I did not include those things in this review.

I like the API a lot, I don't have much to say about that other than have smart_port before adi_port in the function arguments.

I just have a few tiny nits, sorry for being so pedantic, ignore my comments as you wish :p.

include/pros/adi.hpp Outdated Show resolved Hide resolved
include/pros/adi.hpp Show resolved Hide resolved
include/pros/adi.hpp Outdated Show resolved Hide resolved
include/pros/adi.hpp Outdated Show resolved Hide resolved
include/pros/adi.hpp Outdated Show resolved Hide resolved
src/devices/vdml_adi.c Outdated Show resolved Hide resolved
include/pros/ext_adi.h Outdated Show resolved Hide resolved
include/pros/ext_adi.h Outdated Show resolved Hide resolved
src/devices/vdml_ext_adi.c Outdated Show resolved Hide resolved
src/devices/vdml_ext_adi.c Outdated Show resolved Hide resolved
Co-authored-by: Theo Lemay <16546293+theol0403@users.noreply.github.com>
Co-authored-by: Theo Lemay <16546293+theol0403@users.noreply.github.com>
include/api.h Outdated Show resolved Hide resolved
@kunwarsahni01
Copy link
Member Author

Encoder, Motor, Button, Potentiometer, and Ultrasonic, have been retested on the internal and external ports and everything is working properly.

include/pros/adi.hpp Outdated Show resolved Hide resolved
include/pros/ext_adi.h Outdated Show resolved Hide resolved
mooreBrendan and others added 3 commits September 12, 2020 17:53
Co-authored-by: Alex Brooke <akb.sbc@gmail.com>
Co-authored-by: Alex Brooke <akb.sbc@gmail.com>
nathan-moore
nathan-moore previously approved these changes Sep 13, 2020
Copy link
Member

@nathan-moore nathan-moore left a comment

Choose a reason for hiding this comment

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

Only thing that struck me was that formatting for some of the parm parts of the function comments was off. Nothing too pressing.

Copy link
Contributor

@HotelCalifornia HotelCalifornia left a comment

Choose a reason for hiding this comment

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

i think this looks good to go

@HotelCalifornia HotelCalifornia merged commit 81dea02 into develop Sep 13, 2020
@HotelCalifornia HotelCalifornia added this to the 3.3.0 milestone Sep 13, 2020
@HotelCalifornia HotelCalifornia deleted the feature/adi-expander branch September 13, 2020 07:38
@kunwarsahni01 kunwarsahni01 mentioned this pull request Sep 13, 2020
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.

Calling adi_ultrasonic_get hangs the program
9 participants