Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新功能建议 #9

Open
mojinpan opened this issue Feb 28, 2019 · 1 comment
Open

新功能建议 #9

mojinpan opened this issue Feb 28, 2019 · 1 comment

Comments

@mojinpan
Copy link

大神,提几个新功能建议,希望能集成到当前shell中(如果不集成也请指导一下如何实现):
1、增加登录密码,当前版本没有登录密码,只能自己测试用,产品投放现场后就不敢用了,希望能增加登录密码的设置。
2、增加变量查询的功能,便于在调试解决查看一些地址的异常情况。这个不知道如何实现比较好,最好能查结构体程序的值。

@NevermindZZT
Copy link
Owner

  1. shell的输入都是交给shellHandler函数处理的,只要启动写一个判断,首先hook这个函数,进行密码的判断就行
bool shellActive = false;

void shellCheck(SHELL_TypeDef *shell, char  data)
{
    /** 缓冲输入的字符,检测到回车输入的时候将输入和密码进行比较
     *  如果密码正确,shellActive = true 
    */
}

shellTask函数中(或者调用shellHandler的地方

ifshellActive == false)
{
    shellCheckshell, data);
}
else
{
    shellHandler(shell, data);
}
  1. 对于全局变量,可以考虑将数据所在地址的内存块内容直接打印出来

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants