Fix #1: Implement save function for calibration

This commit is contained in:
2020-08-16 12:52:16 +02:00
parent fa3c980207
commit 15d255778c
5 changed files with 29 additions and 9 deletions

View File

@@ -415,9 +415,12 @@ static shellmatta_retCode_t shell_cmd_save_cal(const shellmatta_handle_t handle,
(void)length;
(void)arguments;
int res;
float offset, sens_dev;
bool active;
adc_pt1000_get_resistance_calibration(&offset, &sens_dev, &active);
res = settings_save_calibration(sens_dev, offset, active);
/* TODO: Change this */
res = settings_save_calibration(0.0f, 0.0f);
if (res) {
shellmatta_printf(handle, "Error saving %d\r\n", res);
} else {