修复了arduino keys 命令显示异常的问题
This commit is contained in:
parent
04b37b775b
commit
5301a57bb1
|
@ -9,8 +9,6 @@
|
|||
#include <Arduino.h>
|
||||
#include "xcmd.h"
|
||||
#include "test.h"
|
||||
#include "ex_keys.h"
|
||||
#include "ex_cmds.h"
|
||||
|
||||
int cmd_get_char(uint8_t *ch)
|
||||
{
|
||||
|
@ -36,8 +34,6 @@ void setup() {
|
|||
xcmd_init(cmd_get_char, cmd_put_char);
|
||||
test_cmd_init();
|
||||
test_keys_init();
|
||||
ex_keys_init();
|
||||
ex_cmds_init();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
|
|
@ -16,7 +16,7 @@ extern "C" {
|
|||
#define VERSION "1.0.0"
|
||||
|
||||
#ifndef XCMD_LINE_MAX_LENGTH
|
||||
#define XCMD_LINE_MAX_LENGTH (32) /* 命令行支持的最大字符数 */
|
||||
#define XCMD_LINE_MAX_LENGTH (64) /* 命令行支持的最大字符数 */
|
||||
#endif
|
||||
|
||||
#ifndef XCMD_PRINT_BUF_MAX_LENGTH
|
||||
|
@ -24,7 +24,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifndef XCMD_HISTORY_MAX_NUM
|
||||
#define XCMD_HISTORY_MAX_NUM (0) /* 支持的历史记录个数,0为不支持 */
|
||||
#define XCMD_HISTORY_MAX_NUM (8) /* 支持的历史记录个数, 这个参数对内存的影响很大,建议arduino设置为0,0为不支持 */
|
||||
#endif
|
||||
|
||||
#ifndef XCMD_PARAM_MAX_NUM
|
||||
|
|
|
@ -31,7 +31,8 @@ static void cmd_keys(int argc, char* argv[])
|
|||
xcmd_key_t *p = xcmd_keylist_get();
|
||||
while(p)
|
||||
{
|
||||
xcmd_print("0x%08X %s\r\n", p->key, p->help);
|
||||
xcmd_print("0x%08X\t", p->key);
|
||||
xcmd_print("%s\r\n",p->help);
|
||||
p = p->next;
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +53,7 @@ static xcmd_t cmds[] =
|
|||
{
|
||||
{"clear", cmd_clear, "clear screen"},
|
||||
{"help", cmd_help, "show this list"},
|
||||
{"keys", cmd_keys, "show keys", NULL},
|
||||
{"keys", cmd_keys, "show keys"},
|
||||
{"logo", cmd_logo, "show logo"},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue