Skip to content

Commit

Permalink
Merge branch 'prusa3d:master' into de_lang_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bkerler authored Dec 21, 2023
2 parents ee69b04 + 53ae4e7 commit a0df287
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assignees: ''

Please, before you create a new bug report, please make sure you searched in open and closed issues and couldn't find anything that matches.

**Printer type** - [MINI]
**Printer type** - [MINI, MK4, XL]

**Printer firmware version** - [e.g. 4.0.5, ...]

Expand All @@ -33,7 +33,9 @@ Please, before you create a new bug report, please make sure you searched in ope
Please attach the G-code you had trouble with. This will make it easier for us to replicate the error.

**Crash dump file**
Please attach the crash dump file. This will make it easier for us to investigate the bug.
Please send the crash dump file to Prusa by emailing it to [email protected]. Sharing this file is important and helps us investigate the bug.

Do not share the file publicly, as the crash dump contains a raw snapshot of the printer's memory and may include unencrypted sensitive information.

**Video**
Please attach a video. It usually helps to solve the problem.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
This repository includes source code and firmware releases for the Original Prusa 3D printers based on the 32-bit ARM microcontrollers.

The currently supported models are:
- Original Prusa MINI
- Original Prusa MINI/MINI+
- Original Prusa MK3.9
- Original Prusa MK4
- Original Prusa XL

Expand Down Expand Up @@ -59,15 +60,9 @@ The build process of this project is driven by CMake and `build.py` is just a hi
- [Eclipse, STM32CubeIDE](doc/editor/stm32cubeide.md)
- [Other LSP-based IDEs (Atom, Sublime Text, ...)](doc/editor/lsp-based-ides.md)

#### Formatting
#### Contributing

All the source code in this repository is automatically formatted:

- C/C++ files using [clang-format](https://clang.llvm.org/docs/ClangFormat.html),
- Python files using [yapf](https://github.com/google/yapf),
- and CMake files using [cmake-format](https://github.com/cheshirekow/cmake_format).

If you want to contribute, make sure to install [pre-commit](https://pre-commit.com) and then run `pre-commit install` within the repository. This makes sure that all your future commits will be formatted appropriately. Our build server automatically rejects improperly formatted pull requests.
If you want to contribute to the codebase, please read the [Contribution Guidelines](doc/contributing.md).

#### XL and Puppies

Expand Down
64 changes: 64 additions & 0 deletions doc/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Contribution Guidelines

## Git

### Merging: Use rebase whenever possible

The goal is to have a simple and linear git history.
It is not always possible; for example when merging master into private.
In such cases, it is ok to use git-merge.

### Commit: Atomicity

A commit should be a single complete unit of work.
Every commit should be buildable and follow the rules in this document.

### Commit: Message

- Commit message comprises a subject and a body (separated by an empty line).
- Commit message is written in English.
- Subject uses the imperative mood.
- Subject starts with a capital letter and does not end with a period.
- When a commit is relevant to some subset/module of the project (most of the time), use it as a prefix of the subject as follows:
```
metrics: Add support for syslog
```
or
```
gui: Add touch support
```
- Write the module in lowercase
- Limit the subject to 72 letters.
- Wrap the body to 72 letters per line.
- Put an issue tracker reference (BFW-xxxx) at the end of the body if you have one. Do not put it in the subject line.

## Formatting & Code Organization

### Formatting

All the source code in this repository is automatically formatted:

- C/C++ files using [clang-format](https://clang.llvm.org/docs/ClangFormat.html),
- Python files using [yapf](https://github.com/google/yapf),
- and CMake files using [cmake-format](https://github.com/cheshirekow/cmake_format).

If you want to contribute, make sure to install [pre-commit](https://pre-commit.com) and then run `pre-commit install` within the repository. This makes sure that all your future commits will be formatted appropriately. Our build server automatically rejects improperly formatted pull requests.

### Files: Include Guards
Use the `#pragma once` as a file guard.
Do not use the `#ifdef FILE_X`, `#define FILE_X`, `#endif` pattern.

### Files: Author & Copyright

Do not add file headers with author/creation time/copyright, etc.
Those data are already stored in the commit, and we don't want to duplicate them.

This does not apply to 3rd party code in our repository.

### Code Style: C/C++ Naming Conventions

- Types & Classes are in `PascalCase`.
- Global constants in `SCREAMING_CASE`
- Variables (local, class, etc), class-level constants, `enum class` items, methods and namespaces are in `snake_case`.
- File names are in `snake_case.cpp` (even if the only thing the file contains is a class named in `PascalCase`).
- Types never end with a `'_t'`.
2 changes: 1 addition & 1 deletion src/marlin_stubs/host/M46.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ void GcodeSuite::M46() {
char mac_buffer[19] = { 0 };
get_MAC_address(&mac, netdev_get_active_id());
snprintf(mac_buffer, sizeof(mac_buffer), "%s\n", mac);
serialprintPGM(mac);
serialprintPGM(mac_buffer);
}
}

0 comments on commit a0df287

Please sign in to comment.