shell: Add dummy function save-calibration. Not yet correcly implemented!
This commit is contained in:
parent
3c6200e08c
commit
fa3c980207
@ -36,6 +36,7 @@
|
|||||||
#include <reflow-controller/stack-check.h>
|
#include <reflow-controller/stack-check.h>
|
||||||
#include <reflow-controller/rotary-encoder.h>
|
#include <reflow-controller/rotary-encoder.h>
|
||||||
#include <reflow-controller/safety/safety-controller.h>
|
#include <reflow-controller/safety/safety-controller.h>
|
||||||
|
#include <reflow-controller/settings/settings.h>
|
||||||
|
|
||||||
#ifndef GIT_VER
|
#ifndef GIT_VER
|
||||||
#define GIT_VER "VERSION NOT SET"
|
#define GIT_VER "VERSION NOT SET"
|
||||||
@ -407,6 +408,24 @@ static shellmatta_retCode_t shell_cmd_read_flags(const shellmatta_handle_t handl
|
|||||||
return SHELLMATTA_OK;
|
return SHELLMATTA_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static shellmatta_retCode_t shell_cmd_save_cal(const shellmatta_handle_t handle, const char *arguments,
|
||||||
|
uint32_t length)
|
||||||
|
|
||||||
|
{
|
||||||
|
(void)length;
|
||||||
|
(void)arguments;
|
||||||
|
int res;
|
||||||
|
|
||||||
|
/* TODO: Change this */
|
||||||
|
res = settings_save_calibration(0.0f, 0.0f);
|
||||||
|
if (res) {
|
||||||
|
shellmatta_printf(handle, "Error saving %d\r\n", res);
|
||||||
|
} else {
|
||||||
|
shellmatta_printf(handle, "Saved!\r\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
return SHELLMATTA_OK;
|
||||||
|
}
|
||||||
//typedef struct shellmatta_cmd
|
//typedef struct shellmatta_cmd
|
||||||
//{
|
//{
|
||||||
// char *cmd; /**< command name */
|
// char *cmd; /**< command name */
|
||||||
@ -417,7 +436,7 @@ static shellmatta_retCode_t shell_cmd_read_flags(const shellmatta_handle_t handl
|
|||||||
// struct shellmatta_cmd *next; /**< pointer to next command or NULL */
|
// struct shellmatta_cmd *next; /**< pointer to next command or NULL */
|
||||||
//} shellmatta_cmd_t;
|
//} shellmatta_cmd_t;
|
||||||
|
|
||||||
static shellmatta_cmd_t cmd[13] = {
|
static shellmatta_cmd_t cmd[14] = {
|
||||||
{
|
{
|
||||||
.cmd = "version",
|
.cmd = "version",
|
||||||
.cmdAlias = "ver",
|
.cmdAlias = "ver",
|
||||||
@ -520,8 +539,16 @@ static shellmatta_cmd_t cmd[13] = {
|
|||||||
.helpText = "",
|
.helpText = "",
|
||||||
.usageText = "",
|
.usageText = "",
|
||||||
.cmdFct = shell_cmd_read_flags,
|
.cmdFct = shell_cmd_read_flags,
|
||||||
|
.next = &cmd[13],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.cmd = "save-calibration",
|
||||||
|
.cmdAlias = "save-cal",
|
||||||
|
.helpText = "",
|
||||||
|
.usageText = "",
|
||||||
|
.cmdFct = shell_cmd_save_cal,
|
||||||
.next = NULL,
|
.next = NULL,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
shellmatta_handle_t shell_init(shellmatta_write_t write_func)
|
shellmatta_handle_t shell_init(shellmatta_write_t write_func)
|
||||||
|
Loading…
Reference in New Issue
Block a user