Repository navigation
fix(serial): forward va_list to Print::vprintf - #3071
Open
chinderdelis wants to merge 1 commit into
Open
chinderdelis wants to merge 1 commit into
chinderdelis wants to merge 1 commit into
Conversation
USBSerial::vprintf() passed the va_list as a variadic argument to printf(), so formatted CLI output printed memory addresses instead of values. Forward it to vprintf().
This branch has not been deployed
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.
Proposed Changes
USBSerial::vprintf()forwarded itsva_listas a variadic argument toPrint::printf(). Ava_listcannot be passed through..., so formatted CLI output printed the address of the argument list instead of the values, e.g.:led rgb 255 0 0→LED color set to 3FCD8C30Use the existing
Print::vprintf()instead, which consumes theva_listcorrectly.BLESerialService::vprintf()already does the right thing.Types of Changes
Bugfix
Verification
led rgb 255 0 0now printsLED color set to FF0000.serialDevice->printf-style output (RGB LED color, etc.) prints values instead of addresses.Testing
Hardware tested on Freenove FNK0104AB.
Linked Issues
N/A
User-Facing Change
Further Comments
N/A