Issue #18: ommand to shell in order to test panic mode
This commit is contained in:
parent
3df0631ffc
commit
e85a85d9c3
@ -38,6 +38,7 @@
|
||||
#include <reflow-controller/safety/safety-controller.h>
|
||||
#include <reflow-controller/settings/settings.h>
|
||||
#include <reflow-controller/button.h>
|
||||
#include <reflow-controller/safety/fault.h>
|
||||
|
||||
#ifndef GIT_VER
|
||||
#define GIT_VER "VERSION NOT SET"
|
||||
@ -501,6 +502,19 @@ static shellmatta_retCode_t shell_cmd_ui_emulation(const shellmatta_handle_t han
|
||||
return SHELLMATTA_CONTINUE;
|
||||
}
|
||||
|
||||
static shellmatta_retCode_t shell_cmd_panic(const shellmatta_handle_t handle, const char *arguments,
|
||||
uint32_t length)
|
||||
|
||||
{
|
||||
(void)handle;
|
||||
(void)arguments;
|
||||
(void)length;
|
||||
|
||||
panic_mode();
|
||||
|
||||
return SHELLMATTA_OK;
|
||||
}
|
||||
|
||||
//typedef struct shellmatta_cmd
|
||||
//{
|
||||
// char *cmd; /**< command name */
|
||||
@ -510,7 +524,7 @@ static shellmatta_retCode_t shell_cmd_ui_emulation(const shellmatta_handle_t han
|
||||
// shellmatta_cmdFct_t cmdFct; /**< pointer to the cmd callack function */
|
||||
// struct shellmatta_cmd *next; /**< pointer to next command or NULL */
|
||||
//} shellmatta_cmd_t;
|
||||
static shellmatta_cmd_t cmd[16] = {
|
||||
static shellmatta_cmd_t cmd[17] = {
|
||||
{
|
||||
.cmd = "version",
|
||||
.cmdAlias = "ver",
|
||||
@ -637,6 +651,14 @@ static shellmatta_cmd_t cmd[16] = {
|
||||
.helpText = "",
|
||||
.usageText = "",
|
||||
.cmdFct = shell_cmd_ui_emulation,
|
||||
.next = &cmd[16],
|
||||
},
|
||||
{
|
||||
.cmd = "panic",
|
||||
.cmdAlias = NULL,
|
||||
.helpText = "Panic Mode!",
|
||||
.usageText = "",
|
||||
.cmdFct = shell_cmd_panic,
|
||||
.next = NULL,
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user