mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-17 02:52:12 +01:00
OP-1294 Allow to specify different stack sizes for rx and tx telemetry task.
This commit is contained in:
parent
3ea328d0a0
commit
eed5c098ab
@ -41,7 +41,13 @@
|
||||
|
||||
// Private constants
|
||||
#define MAX_QUEUE_SIZE TELEM_QUEUE_SIZE
|
||||
#define STACK_SIZE_BYTES PIOS_TELEM_STACK_SIZE
|
||||
#ifdef PIOS_TELEM_RX_STACK_SIZE
|
||||
#define STACK_SIZE_RX_BYTES PIOS_TELEM_RX_STACK_SIZE
|
||||
#define STACK_SIZE_TX_BYTES PIOS_TELEM_TX_STACK_SIZE
|
||||
#else
|
||||
#define STACK_SIZE_RX_BYTES PIOS_TELEM_STACK_SIZE
|
||||
#define STACK_SIZE_TX_BYTES PIOS_TELEM_STACK_SIZE
|
||||
#endif
|
||||
#define TASK_PRIORITY_RX (tskIDLE_PRIORITY + 2)
|
||||
#define TASK_PRIORITY_TX (tskIDLE_PRIORITY + 2)
|
||||
#define TASK_PRIORITY_RADRX (tskIDLE_PRIORITY + 2)
|
||||
@ -110,9 +116,9 @@ int32_t TelemetryStart(void)
|
||||
GCSTelemetryStatsConnectQueue(priorityQueue);
|
||||
|
||||
// Start telemetry tasks
|
||||
xTaskCreate(telemetryTxTask, (signed char *)"TelTx", STACK_SIZE_BYTES / 4, NULL, TASK_PRIORITY_TX, &telemetryTxTaskHandle);
|
||||
xTaskCreate(telemetryTxTask, (signed char *)"TelTx", STACK_SIZE_TX_BYTES / 4, NULL, TASK_PRIORITY_TX, &telemetryTxTaskHandle);
|
||||
PIOS_TASK_MONITOR_RegisterTask(TASKINFO_RUNNING_TELEMETRYTX, telemetryTxTaskHandle);
|
||||
xTaskCreate(telemetryRxTask, (signed char *)"TelRx", STACK_SIZE_BYTES / 4, NULL, TASK_PRIORITY_RX, &telemetryRxTaskHandle);
|
||||
xTaskCreate(telemetryRxTask, (signed char *)"TelRx", STACK_SIZE_RX_BYTES / 4, NULL, TASK_PRIORITY_RX, &telemetryRxTaskHandle);
|
||||
PIOS_TASK_MONITOR_RegisterTask(TASKINFO_RUNNING_TELEMETRYRX, telemetryRxTaskHandle);
|
||||
|
||||
#ifdef PIOS_INCLUDE_RFM22B
|
||||
@ -391,7 +397,6 @@ static void telemetryTxTask(__attribute__((unused)) void *parameters)
|
||||
if (xQueueReceive(queue, &ev, 0) == pdTRUE) {
|
||||
// Process event
|
||||
processObjEvent(&ev);
|
||||
|
||||
// if both queues are empty, wait on priority queue for updates (1 tick) then repeat cycle
|
||||
} else if (xQueueReceive(priorityQueue, &ev, 1) == pdTRUE) {
|
||||
// Process event
|
||||
@ -458,8 +463,6 @@ static void radioRxTask(__attribute__((unused)) void *parameters)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Transmit data buffer to the radioport.
|
||||
* \param[in] data Data buffer to send
|
||||
|
@ -164,7 +164,8 @@
|
||||
#else
|
||||
#define PIOS_SYSTEM_STACK_SIZE 660
|
||||
#endif
|
||||
#define PIOS_TELEM_STACK_SIZE 540
|
||||
#define PIOS_TELEM_RX_STACK_SIZE 410
|
||||
#define PIOS_TELEM_TX_STACK_SIZE 560
|
||||
#define PIOS_EVENTDISPATCHER_STACK_SIZE 160
|
||||
|
||||
/* This can't be too high to stop eventdispatcher thread overflowing */
|
||||
|
Loading…
x
Reference in New Issue
Block a user