Fix variable name mismatch

This commit is contained in:
2026-06-14 21:24:01 +02:00
parent 19eefc288b
commit 3c66a39a5d
3 changed files with 13 additions and 13 deletions
+6 -6
View File
@@ -111,7 +111,7 @@ void vCANLoggerListen(void *argument)
{
if (osMessageQueueGet(queue, &message, NULL, osWaitForever) == osOK)
{
osSemaphoreRelease( (hcan->Instance == CAN1) ? xSemaphoreCAN1 : xLEDSemaphoreCAN2 );
osSemaphoreRelease( (hcan->Instance == CAN1) ? xSemaphoreCAN1 : xSemaphoreCAN2 );
// TODO: use this semaphore
}
@@ -129,16 +129,16 @@ void vCANLoggerListen(void *argument)
void vLEDHeartbeat(void *argument)
{
/* CODE BEGIN */
LEDContext *ctx = (LEDContext*)argument;
LEDContext *context = (LEDContext*)argument;
if (osSemaphoreAcquire(ctx->sem, 0U) == osOK)
if (osSemaphoreAcquire(context->semaphore, 0U) == osOK)
{
HAL_GPIO_WritePin(ctx->led->port, ctx->led->pin, GPIO_PIN_SET);
osTimerStart(ctx->timer, 25U);
HAL_GPIO_WritePin(context->led->port, context->led->pin, GPIO_PIN_SET);
osTimerStart(context->timer, 25U);
}
else
{
HAL_GPIO_WritePin(ctx->led->port, ctx->led->pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(context->led->port, context->led->pin, GPIO_PIN_RESET);
}
/* CODE END */
}