Commit 9c9af6ca authored by Sean Cross's avatar Sean Cross

cmd-keypad: Run only once when an arg is passed

Signed-off-by: default avatarSean Cross <xobs@kosagi.com>
parent f8d8454f
......@@ -61,6 +61,7 @@ int cmd_keypad(int argc, char **argv)
printf("Press %c on keypad or any key on serial to exit\n",
key_vals[ARRAY_SIZE(key_vals) - 2]);
while (!end && !serial_available()) {
int key;
......@@ -72,6 +73,8 @@ int cmd_keypad(int argc, char **argv)
serial_putc(key_vals[key]);
if (key == (ARRAY_SIZE(key_vals) - 2))
end = 1;
if (argc)
end = 1;
}
key_state[key] = newstate;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment