From 694a78982abb7d0c536bf2a82de37337472e6c73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sun, 14 Feb 2021 20:11:21 +0100 Subject: [PATCH 1/2] Add missing parameter to doxygen header of dc_pt1000_set_resistance_calibration() --- stm-firmware/include/reflow-controller/adc-meas.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stm-firmware/include/reflow-controller/adc-meas.h b/stm-firmware/include/reflow-controller/adc-meas.h index b7e8b35..6f16df4 100644 --- a/stm-firmware/include/reflow-controller/adc-meas.h +++ b/stm-firmware/include/reflow-controller/adc-meas.h @@ -144,6 +144,7 @@ void adc_pt1000_set_moving_average_filter_param(float alpha); * * @param offset Offset \f$O\f$ * @param sensitivity_deviation Sensitivity Deviation \f$\sigma\f$ after offset correction + * @param active Calibration is active */ void adc_pt1000_set_resistance_calibration(float offset, float sensitivity_deviation, bool active); From 8a764f599b06f0f75cb5f6af74bd35e0a9124ffc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Mon, 15 Feb 2021 20:35:54 +0100 Subject: [PATCH 2/2] Remove cat command from shell --- stm-firmware/shell.c | 75 +++++--------------------------------------- 1 file changed, 8 insertions(+), 67 deletions(-) diff --git a/stm-firmware/shell.c b/stm-firmware/shell.c index cbb2e30..8e31918 100644 --- a/stm-firmware/shell.c +++ b/stm-firmware/shell.c @@ -334,57 +334,6 @@ static shellmatta_retCode_t shell_cmd_reset(const shellmatta_handle_t handle, co return SHELLMATTA_BUSY; } -static shellmatta_retCode_t shell_cmd_cat(const shellmatta_handle_t handle, const char *arguments, - uint32_t length) -{ - -#ifdef IMPLEMENT_SHELL_CAT - FIL file; - char path_buff[256]; - const char *path; - UINT bytes_read; - FRESULT res; - - strncpy(path_buff, arguments, MIN(sizeof(path_buff), length)); - path_buff[MIN(length, sizeof(path_buff)-1)] = 0; - path = strtok(path_buff, " "); - path = strtok(NULL, " "); - - if (strlen(path) == 0) { - shellmatta_printf(handle, "Specify path!\r\n"); - return SHELLMATTA_OK; - } - - res = f_open(&file, path, FA_READ); - if (res == FR_OK) { - shellmatta_write(handle, "\r\n", 2U); - do { - res = f_read(&file, path_buff, sizeof(path_buff), &bytes_read); - if (bytes_read > 0) - shellmatta_write(handle, path_buff, bytes_read); - else - break; - } while (res == FR_OK); - - shellmatta_write(handle, "\r\n", 2U); - } - - if (res != FR_OK) { - shellmatta_printf(handle, "Error reading file\r\n"); - } - - f_close(&file); - -#else - (void)length; - (void)arguments; - - shellmatta_printf(handle, "cat not implemented!\r\n"); -#endif - - return SHELLMATTA_OK; -} - static shellmatta_retCode_t shell_cmd_read_flags(const shellmatta_handle_t handle, const char *arguments, uint32_t length) { @@ -701,7 +650,7 @@ shellmatta_retCode_t shell_cmd_update(const shellmatta_handle_t handle, const ch // 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[20] = { +static shellmatta_cmd_t cmd[19] = { { .cmd = "version", .cmdAlias = "ver", @@ -790,21 +739,13 @@ static shellmatta_cmd_t cmd[20] = { .cmdFct = shell_cmd_reset, .next = &cmd[11], }, - { - .cmd = "cat", - .cmdAlias = NULL, - .helpText = "Print file contents", - .usageText = "cat ", - .cmdFct = shell_cmd_cat, - .next = &cmd[12], - }, { .cmd = "safety-flags", .cmdAlias = "flags", .helpText = "Reads and may clear safety flags", .usageText = "flags [--ack]", .cmdFct = shell_cmd_read_flags, - .next = &cmd[13], + .next = &cmd[12], }, { .cmd = "save-calibration", @@ -812,7 +753,7 @@ static shellmatta_cmd_t cmd[20] = { .helpText = "", .usageText = "", .cmdFct = shell_cmd_save_cal, - .next = &cmd[14], + .next = &cmd[13], }, { .cmd = "hang", @@ -820,7 +761,7 @@ static shellmatta_cmd_t cmd[20] = { .helpText = "", .usageText = "", .cmdFct = shell_cmd_hang, - .next = &cmd[15], + .next = &cmd[14], }, { .cmd = "ui-emulate", @@ -828,7 +769,7 @@ static shellmatta_cmd_t cmd[20] = { .helpText = "", .usageText = "", .cmdFct = shell_cmd_ui_emulation, - .next = &cmd[16], + .next = &cmd[15], }, { .cmd = "panic", @@ -836,7 +777,7 @@ static shellmatta_cmd_t cmd[20] = { .helpText = "Panic Mode!", .usageText = "", .cmdFct = shell_cmd_panic, - .next = &cmd[17], + .next = &cmd[16], }, { .cmd = "safety-mem-dump", @@ -844,7 +785,7 @@ static shellmatta_cmd_t cmd[20] = { .helpText = "", .usageText = "safety-mem-dump [output-file]", .cmdFct = shell_cmd_dump_safety_mem, - .next = &cmd[18], + .next = &cmd[17], }, { .cmd = "reset-cal", @@ -852,7 +793,7 @@ static shellmatta_cmd_t cmd[20] = { .helpText = "Reset Calibration", .usageText = "", .cmdFct = shell_cmd_reset_cal, - .next = &cmd[19], + .next = &cmd[18], }, { .cmd = "update",