Skip to content

Commit

Permalink
Revert error_buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
bkerler committed Jan 3, 2024
2 parents 6f686bf + a0df287 commit bbf49dd
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 17 deletions.
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'`.
4 changes: 2 additions & 2 deletions lib/Marlin/Marlin/src/gcode/feature/input_shaper/M74.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ void GcodeSuite::M74() {

if (parser.seen('W')) {
const float m = parser.value_float();
if (m > 0) {
if (m >= 0.f) {
params.mass = m;
} else {
SERIAL_ECHO_MSG("?Mass (W) must be greater than 0");
SERIAL_ECHO_MSG("?Mass (W) must be greater or equal 0");
}
}

Expand Down
Binary file modified src/lang/po/de/Prusa-Firmware-Buddy_de.mo
Binary file not shown.
5 changes: 2 additions & 3 deletions src/lang/po/de/Prusa-Firmware-Buddy_de.po
Original file line number Diff line number Diff line change
Expand Up @@ -4667,7 +4667,7 @@ msgstr "Rückziehen von FINDA"
#. Resume
#: src/common/client_response_texts.cpp:67
msgid "RETRY"
msgstr "WIEDERHOLEN"
msgstr "WDH."

#: src/guiapi/include/window_tool_action_box.hpp:94
#: src/guiapi/include/WindowMenuItems.hpp:40
Expand Down Expand Up @@ -6593,8 +6593,7 @@ msgstr "Mi."
msgid ""
"Welcome to the Original Prusa MINI setup wizard. Would you like to continue?"
msgstr ""
"Willkommen beim Original Prusa MINI Einrichtungsassistenten. Möchten Sie "
"fortfahren?"
"Willkommen zum Original Prusa MINI Einrichtungsassistent\nFortfahren ?"

#: src/gui/wizard/selftest_frame_fsensor.cpp:86
msgid ""
Expand Down
7 changes: 4 additions & 3 deletions src/marlin_stubs/host/M46.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ void GcodeSuite::M46() {
netdev_get_ipv4_addresses(netdev_get_active_id(), &ethconfig);
uint8_t *ipp = (uint8_t *)&ethconfig.addr_ip4;
char ip4[17] = { 0 };
sprintf(ip4, "%u.%u.%u.%u\n", ipp[0], ipp[1], ipp[2], ipp[3]);
snprintf(ip4, sizeof(ip4), "%u.%u.%u.%u\n", ipp[0], ipp[1], ipp[2], ipp[3]);
serialprintPGM(ip4);

if (parser.seen('M')) {
mac_address_t mac;
char mac_buffer[19] = { 0 };
get_MAC_address(&mac, netdev_get_active_id());
serialprintPGM(mac);
snprintf(mac_buffer, sizeof(mac_buffer), "%s\n", mac);
serialprintPGM(mac_buffer);
}
}

0 comments on commit bbf49dd

Please sign in to comment.