diff --git a/ADIS_tinyK22_SplitFlap/source/IncludeMcuLibConfig.h b/ADIS_tinyK22_SplitFlap/source/IncludeMcuLibConfig.h index 2dd3b8e..942218d 100644 --- a/ADIS_tinyK22_SplitFlap/source/IncludeMcuLibConfig.h +++ b/ADIS_tinyK22_SplitFlap/source/IncludeMcuLibConfig.h @@ -115,9 +115,9 @@ add_compile_options(-include "../config/IncludeMcuLibConfig.h") /* ------------------- RTOS ---------------------------*/ #define McuLib_CONFIG_SDK_USE_FREERTOS (1) /* #define configUSE_SEGGER_SYSTEM_VIEWER_HOOKS (1) */ -/*#define configTOTAL_HEAP_SIZE (24*1024)*/ -/* #define configUSE_HEAP_SECTION_NAME (1) */ -/* #define configHEAP_SECTION_NAME_STRING ".bss.$SRAM_LOWER.FreeRTOS" */ +#define configTOTAL_HEAP_SIZE (24*1024) +#define configUSE_HEAP_SECTION_NAME (1) +#define configHEAP_SECTION_NAME_STRING ".bss.$SRAM_LOWER.FreeRTOS" /* ------------------- FatFS ---------------------------*/ #define McuLib_CONFIG_USE_FAT_FS (0) /* ---------------------------------------------------------------------------------------*/ diff --git a/ADIS_tinyK22_SplitFlap/source/application.c b/ADIS_tinyK22_SplitFlap/source/application.c index ba04c78..cc2602f 100644 --- a/ADIS_tinyK22_SplitFlap/source/application.c +++ b/ADIS_tinyK22_SplitFlap/source/application.c @@ -24,7 +24,7 @@ #define LED_BLUE_PIN 2U /* number of splitflaps that are connected / used. max 4. */ -#define NUM_SF_USED 2 +#define NUM_SF_USED 4 /* vars */ static McuLED_Handle_t LED_blue; @@ -271,7 +271,7 @@ void configureSplitflaps(void){ /* create config instance for splitflap 2 */ SF_Config_t sf2Config; - sf2Config.setupIdentifier = 1; + sf2Config.setupIdentifier = 2; sf2Config.hardwareIdentifier = 20; // default value sf2Config.magSensorConfig = magSensor2Config; sf2Config.motorConfig = motor2Config; @@ -310,7 +310,7 @@ void configureSplitflaps(void){ /* create config instance for splitflap 3 */ SF_Config_t sf3Config; - sf3Config.setupIdentifier = 1; + sf3Config.setupIdentifier = 3; sf3Config.hardwareIdentifier = 20; // default value sf3Config.magSensorConfig = magSensor3Config; sf3Config.motorConfig = motor3Config; diff --git a/ADIS_tinyK22_SplitFlap/source/multi-splitflap.c b/ADIS_tinyK22_SplitFlap/source/multi-splitflap.c index 9808133..22f2752 100644 --- a/ADIS_tinyK22_SplitFlap/source/multi-splitflap.c +++ b/ADIS_tinyK22_SplitFlap/source/multi-splitflap.c @@ -11,6 +11,7 @@ #include "McuRTOS.h" #include "McuLog.h" #include "splitflap.h" +#include "McuUtility.h" /* vars */ static dict_t **flapDict; @@ -151,6 +152,7 @@ void initFlapKeys(uint8_t numberOfFlaps){ /* get a memory place for the key */ #if SPLITFLAP_CONFIG_USE_FREERTOS_HEAP flapKeys[i] = pvPortMalloc(sizeof(BYTES_PER_KEY)); + sprintf(flapKeys[i], "%i", i); #else if((flapKeys[i] = malloc(BYTES_PER_KEY)) == NULL){ McuLog_error("Reserving memory for flap num. %i failed!:", i); diff --git a/ADIS_tinyK22_SplitFlap/source/multi-splitflap.h b/ADIS_tinyK22_SplitFlap/source/multi-splitflap.h index 40f2eb6..b5eb778 100644 --- a/ADIS_tinyK22_SplitFlap/source/multi-splitflap.h +++ b/ADIS_tinyK22_SplitFlap/source/multi-splitflap.h @@ -10,7 +10,7 @@ #include "splitflap.h" -#define NUM_FLAPS 2 // Number of flaps that can be added to the combination +#define NUM_FLAPS 4 // Number of flaps that can be added to the combination /* initialize dictionary. * numFlaps: Amount of flaps to be used*/ diff --git a/ADIS_tinyK22_SplitFlap/source/shell.c b/ADIS_tinyK22_SplitFlap/source/shell.c index e6fe6cc..5af73ff 100644 --- a/ADIS_tinyK22_SplitFlap/source/shell.c +++ b/ADIS_tinyK22_SplitFlap/source/shell.c @@ -144,7 +144,9 @@ static const McuShell_ParseCommandCallback CmdParserTable[] = ini_ParseCommand, McuMinINI_ParseCommand, NVMC_ParseCommand, +#if PL_CONFIG_USE_RS485 RS485_ParseCommand, +#endif NULL /* Sentinel */ };