From 33e72f03481fcc5e3f9092c901a96f726ccc4b4f Mon Sep 17 00:00:00 2001 From: Arnold Jonas jarnold Date: Tue, 6 Dec 2022 10:06:38 +0100 Subject: [PATCH] update splitflap wrapper, not compiled! --- ADIS_ESP32_Eclipse/main/splitflap_wrapper.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ADIS_ESP32_Eclipse/main/splitflap_wrapper.c b/ADIS_ESP32_Eclipse/main/splitflap_wrapper.c index fb7828d..42770e5 100644 --- a/ADIS_ESP32_Eclipse/main/splitflap_wrapper.c +++ b/ADIS_ESP32_Eclipse/main/splitflap_wrapper.c @@ -9,19 +9,21 @@ #include #include "splitflap_wrapper.h" #include "McuUtility.h" +#include "McuShell.h" #include "rs485.h" #define RS_CMD_PREFIX "rs sendcmd SplitFlap " -#define BUF_SIZE 40 +#define BUF_SIZE 50 /* moves all split flaps to the zero position * After a timeout the initializtion is cancelled and the return value is false * If all splitflaps report to be initialized before the timeout, the return value is true */ bool SplitFlap_Wrapper_MoveAllToZeroPosition(void){ - char cmd[BUF_SIZE] = RS_CMD_PREFIX; - //McuUtility_strcat(cmd, sizeof cmd, "initAll"); - //RS485_ParseCommand(cmd); TODO + unsigned char cmd[BUF_SIZE] = RS_CMD_PREFIX; + McuUtility_strcat(cmd, sizeof(cmd), "initAll"); + McuShell_SendStr(buf, SHELL_GetStdio()->stdOut); + //old RS485_ParseCommand(cmd); return true; }