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 coding standards, language pack size check during compiling, fix incorrect temperature for mixing hotend, reduce program memory usage #1427

Merged
merged 12 commits into from
Dec 25, 2020

Conversation

guruathwal
Copy link
Contributor

@guruathwal guruathwal commented Dec 23, 2020

@digant73
Copy link
Contributor

In some menus you now passed an unitialized buffer to numPad funtion. Also in PID menu the tool index is now wrongly set befor the loop detecting it. Just a very quick check, so probably other errors are present.
I would avoid that comment style because it will require frequent indentation changes when a new or a change in a code line is made. Also in case the code is well commented (as it should be) it makes the code pretty much distracting and confusing.
The conditional code must be aligned to the rest of the code. So the best way is to always put conditional clause (e.g. #if._.) on column 1. That solution allows nested conditional code more easily. It was also adopted on ST libs if I am not wrong or in general in any commercial sw

@traffic-light
Copy link
Contributor

traffic-light commented Dec 23, 2020

Small feedback on the guidestyle:

  • Header files: instead if define and ifndef we should use #pragma once (already implemented in my pr)
  • When you described camel case you said that we can use _ in between words. I think it's better to use one. Only camel case or underscore for variables

(Didn't take the time to read the whole thing)

@guruathwal
Copy link
Contributor Author

@digant73 Editing code line will affect the comment alignment in every style even when the comments are aligned to the far right side. it will also require frequent indentation changes when a line is changed. The benefit of the style suggested in this PR is that it can be easily programmed via clang-format to auto-indent the comments removing the need to manually fix everything manually.
The Marlin Firmware prefers Indenting the preprocessor directives with the code.

@traffic-light I did not add #pragma once as you already have a PR for that. You are right about the camel case. I added the _ as it is already used in the firmware in a lot of places. But it should be removed from the guide.

@guruathwal guruathwal changed the title Add coding standards, language pack size check during compiling, reduce program memory usage Add coding standards, language pack size check during compiling, fix incorrect temperature for mixing hotend, reduce program memory usage Dec 24, 2020
@bigtreetech bigtreetech merged commit 46d7434 into bigtreetech:master Dec 25, 2020
jeffeb3 pushed a commit to V1EngineeringInc/BIGTREETECH-TouchScreenFirmware that referenced this pull request Nov 10, 2021
…incorrect temperature for mixing hotend, reduce program memory usage (bigtreetech#1427)
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.

Multi extruder Cold extrusion prevent
4 participants