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

Arm firmware implementation #407

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

Conversation

TateKolton
Copy link
Contributor

Please fill out the following before requesting review on this PR

Description

ArmSketchRev3: Main Arm testing firmware for teensy board. Allows homing of arm with limit switches, and incremental and absolute motion of individual axes.
SerialCom1: C# Windows form UI for communication with ArmSketchRev3. Allows user to input angles into a terminal and home the arm.

Testing Done

All code has been tested on arm. Under constant construction so will be more PR's in near future.

Resolved Issues

NA

Review Checklist

(Please check every item to indicate your code complies with it (by changing [ ]->[x]). This will hopefully save both you and the reviewer(s) a lot of time!)
It is the reviewers responsibility to also make sure every item here has been covered

  • [ X] Start of document comments: each .cpp and .h file should have a comment at the start of it. See files in src/sample_package for examples.
  • [X ] Function comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the classes defined in src/sample_package
  • [X ] Remove all commented out code
  • [ X] Remove extra print statements: for example, those just used for testing
  • [ X] Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue
    Feel free to make additions of things that we should be checking to this file if you think there's something missing!!!!

@TateKolton TateKolton self-assigned this Feb 28, 2022
Copy link
Collaborator

@ihsan314 ihsan314 left a comment

Choose a reason for hiding this comment

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

Remove editor specific files and files that get autogenerated.

Copy link
Collaborator

@ihsan314 ihsan314 left a comment

Choose a reason for hiding this comment

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

The bin folder and the obj folder should not be included in the repo. Also the SerialCom.sln file as well as all the .resx files seem to be specific to Visual Studio and can be removed as well, unless I'm mistaken. I believe you also don't need the Properties folder, but I'll need to look more in depth to be sure.

src/firmware/arm_firmware/SerialCom1/SerialCom/Form1.cs Outdated Show resolved Hide resolved
src/firmware/arm_firmware/SerialCom1/SerialCom/Form1.cs Outdated Show resolved Hide resolved
src/firmware/arm_firmware/SerialCom1/SerialCom/Form1.cs Outdated Show resolved Hide resolved
src/firmware/arm_firmware/SerialCom1/SerialCom/Form1.cs Outdated Show resolved Hide resolved
src/firmware/arm_firmware/armSketchRev3.ino Outdated Show resolved Hide resolved
Comment on lines 214 to 216
if(ang == 0) {
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this necessary?

src/firmware/arm_firmware/armSketchRev3.ino Outdated Show resolved Hide resolved
bool a5FinishFlag = false;
bool a6FinishFlag = false;

while (!completeFlag) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Be consistent with the indentation in this while loop so that the code is easier to read

}
}

void a6LimTrigger() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This applies to the other functions above as well but I think the code could benefit from refactoring.

With the LimTrigger functions for instance, the only difference between a5LimTrigger and a6LimTrigger is that one operates on a5 and the other operates on a6. It would be cleaner if there was a generic LimTrigger function that can accept a5 or a6 or whatever as a parameter, and then you wouldn't be repeating so much code.

TateKolton and others added 7 commits March 3, 2022 14:07
…ored code (deleted 400 lines or something crazy). Check out how simple the home function is now! So happy with this. Code compiles, will test in coming weeks

// stepper motor objects for AccelStepper library
AccelStepper steppers[6];

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will delete extra spaces next push

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.

2 participants