From 27e9306d1b098b41c1490c0d733cf18ba850e9e6 Mon Sep 17 00:00:00 2001 From: Jonas Arnold Date: Fri, 21 Oct 2022 14:49:00 +0200 Subject: [PATCH] fixed issue in shell with MotOffset_Get crashing MCU --- ADIS_tinyK22_SplitFlap/source/shell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ADIS_tinyK22_SplitFlap/source/shell.c b/ADIS_tinyK22_SplitFlap/source/shell.c index 944afe4..03119d6 100644 --- a/ADIS_tinyK22_SplitFlap/source/shell.c +++ b/ADIS_tinyK22_SplitFlap/source/shell.c @@ -54,7 +54,8 @@ static uint8_t ParseCommand(const uint8_t *cmd, bool *handled, McuShell_ConstStd cmd++; if(McuUtility_xatoi(&cmd, &hwId) == ERR_OK){ // validate param - if(MotOffset_Get(hwId, NULL) != ERR_OK){ + int32_t offset = 0; + if(MotOffset_Get(hwId, &offset) != ERR_OK){ return ERR_FAILED; } }else{