diff --git a/firmware/app/tasks/read_px.c b/firmware/app/tasks/read_px.c index 31e6be93..f044aa4c 100644 --- a/firmware/app/tasks/read_px.c +++ b/firmware/app/tasks/read_px.c @@ -47,7 +47,7 @@ pl_px_buf_t px_buf = {0}; void vTaskReadPX(void) { static payload_t pl_px_active = PAYLOAD_X; - px_buf.lenth = PX_PONG_BUF_SIZE; + px_buf.length = PX_PONG_BUF_SIZE; /* Wait startup task to finish */ xEventGroupWaitBits(task_startup_status, TASK_STARTUP_DONE, pdFALSE, pdTRUE, pdMS_TO_TICKS(TASK_READ_PX_INIT_TIMEOUT_MS)); @@ -60,6 +60,12 @@ void vTaskReadPX(void) if (payload_get_data(pl_px_active, PAYLOAD_X_PONG, px_buf.buffer, &px_buf.length) != 0) { sys_log_print_event_from_module(SYS_LOG_ERROR, TASK_READ_PX_NAME, "Error reading the ping-pong data!"); + + uint8_t i = 0; + for(i=0;i * - * \version 0.10.7 + * \version 0.9.18 * * \date 2019/11/02 * @@ -39,7 +39,6 @@ #include #include "tasks.h" -#include "antenna_deployment.h" #include "startup.h" #include "watchdog_reset.h" #include "heartbeat.h" @@ -53,6 +52,7 @@ #include "read_antenna.h" #include "data_log.h" #include "process_tc.h" +#include "read_px.h" void create_tasks(void) { @@ -185,6 +185,15 @@ void create_tasks(void) } #endif /* CONFIG_TASK_ANTENNA_DEPLOYMENT_ENABLED */ +#if defined(CONFIG_TASK_PAYLOAD_X_ENABLED) && (CONFIG_TASK_PAYLOAD_X_ENABLED == 1) + xTaskCreate(vTaskReadPX, TASK_READ_PX_NAME, TASK_READ_PX_STACK_SIZE, NULL, TASK_READ_PX_PRIORITY, &xTaskReadPXHandle); + + if (xTaskReadPXHandle == NULL) + { + /* Error creating the Read PX task */ + } +#endif /* CONFIG_TASK_PAYLOAD_X_ENABLED */ + create_event_groups(); } diff --git a/firmware/config/config.h b/firmware/config/config.h index 5cffde13..604b820e 100644 --- a/firmware/config/config.h +++ b/firmware/config/config.h @@ -51,6 +51,7 @@ #define CONFIG_TASK_DATA_LOG_ENABLED 1 #define CONFIG_TASK_PROCESS_TC_ENABLED 1 #define CONFIG_TASK_ANTENNA_DEPLOYMENT_ENABLED 0 +#define CONFIG_TASK_PAYLOAD_X_ENABLED 1 /* Devices */ #define CONFIG_DEV_MEDIA_INT_ENABLED 1 @@ -63,7 +64,7 @@ #define CONFIG_DEV_EPS_ENABLED 1 #define CONFIG_DEV_PAYLOAD_EDC_ENABLED 1 #define CONFIG_DEV_ANTENNA_ENABLED 1 -#define CONFIG_DEV_PAYLOAD_X_ENABLED 1 +#define CONFIG_DEV_PAYLOAD_X_ENABLED 1 /* Drivers */ #define CONFIG_DRV_ISIS_ANTENNA_ENABLED 1