more print format constants defined; function printNumber(..) adapted.#271
Open
TobiasKnauss wants to merge 1 commit intoarduino:masterfrom
Open
more print format constants defined; function printNumber(..) adapted.#271TobiasKnauss wants to merge 1 commit intoarduino:masterfrom
TobiasKnauss wants to merge 1 commit intoarduino:masterfrom
Conversation
- HEX2, HEX4, HEX8 - BIN2, BIN4, BIN8, BIN16, BIN32 The number represents the minimum digit count for printing, i.e. adding leading zeros.
Author
|
Is this failed unit test related to my commit? If I understand it correctly, some external dependencies have failed and this test did not even run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had already created a PR with the same content in arduino/ArduinoCore-avr#621, but I was told that the changes need to be accepted for the API first.
changes:
Print::printNumber(unsigned long n, uint16_t base)The number represents the minimum digit count for printing, i.e. adding leading zeros.
This enhancement was inspired by https://forum.arduino.cc/t/serial-print-value-hex/463868/5
It can be tested with the code example from https://docs.arduino.cc/language-reference/en/functions/communication/serial/print/ enhanced like this: