Add {PLUS_NUM} string code which includes leading + for positive values

This commit is contained in:
Jonathan G Rennison
2021-06-14 22:55:26 +01:00
parent 2b8775fb4a
commit 8485ed724b
3 changed files with 11 additions and 0 deletions

View File

@@ -111,6 +111,7 @@ static const CmdStruct _cmd_structs[] = {
{"DECIMAL", EmitSingleChar, SCC_DECIMAL, 2, 0, C_NONE}, // Number with comma and fractional part. Second parameter is number of fractional digits, first parameter is number times 10**(second parameter).
{"DECIMAL1", EmitSingleChar, SCC_DECIMAL1, 1, 0, C_NONE}, // Decimal with fixed second parameter of 1
{"NUM", EmitSingleChar, SCC_NUM, 1, 0, C_NONE}, // Signed number
{"PLUS_NUM", EmitSingleChar, SCC_PLUS_NUM, 1, 0, C_NONE}, // Signed number, with sign (+ or -) shown for both positive and negative numbers
{"ZEROFILL_NUM", EmitSingleChar, SCC_ZEROFILL_NUM, 2, 0, C_NONE}, // Unsigned number with zero fill, e.g. "02". First parameter is number, second minimum length
{"BYTES", EmitSingleChar, SCC_BYTES, 1, 0, C_NONE}, // Unsigned number with "bytes", i.e. "1.02 MiB or 123 KiB"
{"HEX", EmitSingleChar, SCC_HEX, 1, 0, C_NONE}, // Hexadecimally printed number