Skip to content

Pull Request Guidelines

bdring edited this page Mar 25, 2020 · 13 revisions

Guidelines for creating pull requests.

Issue

Please create an issue for general discuss regarding the changes in the pull request. Ideally this is done before the pull request is submitted. Pull requests are always welcome and encouraged, but coordinating efforts saves time for everyone. Discussion via Slack is also acceptable.

Branches

Please target the devt branch with your pull requests. All new changes and features are staged in the devt branch before merging to the master branch.

For experimental features, it is also acceptible to target other, non master, branches.

Build Date

Any time changes affect the compiled firmware, change the build date in grbl.h to the date of of the pull request. $define GRBL_VERSION_BUILD "YYYYMMDD" ... Example: #define GRBL_VERSION_BUILD "20190517".

Note: This date may be changed if other changes, with later dates are merged first.

File names

If files need to be renamed from standard grbl file names due to conflicts with libraries, etc, please prefix the old filename with "grbl_". Example: limits.h has a conflict, so limits.h and limits.cpp were renamed to grbl_limits.h and grbl_limits.cpp

Code Style

Code should be formatted with AStyle in this format.

--style=google
--keep-one-line-blocks
--indent=spaces=4
--indent-preproc-block
--indent-preproc-define
--indent-col1-comments
--remove-brackets
--break-after-logical
--pad-oper
--pad-header
--unpad-paren
--align-pointer=type
--align-reference=type
--attach-classes
--attach-inlines
--keep-one-line-statements
--indent-namespaces

Consecutive macros should be aligned in header files, like this...

#define SERVO_Z_PIN             GPIO_NUM_27
#define SERVO_Z_CHANNEL_NUM     5
#define SERVO_Z_RANGE_MIN       0.0
#define SERVO_Z_RANGE_MAX       5.0
#define SERVO_Z_HOMING_TYPE     SERVO_HOMING_TARGET // during homing it will instantly move to a target value
#define SERVO_Z_HOME_POS        SERVO_Z_RANGE_MAX // move to max during homing
#define SERVO_Z_MPOS            false   // will not use mpos, uses work coordinates
Clone this wiki locally