Skip to content

Commit d2be67b

Browse files
JohnAZoidbergkiram9
authored andcommitted
fwk: input_module: Pad integers
BUG=When connecting a module with board ID < 10 the digits are shorter, so the table is not properly aligned. BRANCH=fwk-tulip-29169 TEST=From EC console run inputdeck command. Table should be properly aligned See below: ec:~> inputdeck on Forcing Input modules on Deck state: FORCE_ON C-Deck status 0 = 15 2813 mV [X - - - -] [Disconnected] C-Deck status 1 = 6 907 mV [- X - - -] [Generic Full Width] C-Deck status 2 = 15 2813 mV [- - X - -] [Disconnected] C-Deck status 3 = 15 2813 mV [- - - X -] [Disconnected] C-Deck status 4 = 15 2813 mV [- - - - X] [Disconnected] C-Deck status 5 = 13 2505 mV [Touchpad ] [Touchpad] C-Deck status 6 = 14 2813 mV [Toprow disc.] [Reserved] C-Deck status 7 = 7 1034 mV [Hubboard ] [Reserved] Input module Overcurrent Events: 0 Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 25fc0f0 commit d2be67b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

zephyr/program/framework/lotus/src/input_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static int inputdeck_cmd(int argc, const char **argv)
349349

350350
id = get_hardware_id(ADC_HUB_BOARD_ID);
351351
mv = adc_read_channel(ADC_HUB_BOARD_ID);
352-
ccprintf(" C-Deck status %d = %d %d mV", i, id, mv);
352+
ccprintf(" C-Deck status %d = %2d %4d mV", i, id, mv);
353353
switch (i) {
354354
case TOP_ROW_0:
355355
ccprintf(" [X - - - -]");
@@ -373,7 +373,7 @@ static int inputdeck_cmd(int argc, const char **argv)
373373
ccprintf(" [Toprow disc.]");
374374
break;
375375
case HUBBOARD:
376-
ccprintf(" [Hubboard ]");
376+
ccprintf(" [Hubboard ]");
377377
break;
378378
default:
379379
break;

0 commit comments

Comments
 (0)