Expected primary-expression before 'const' with FreeRTOS

In your code you create a task called TaskBlink, where is TaskBlink in the code you posted?

If in setup you create a task:

xTaskCreatePinnedToCore( fFindDewPointWithHumidity,   "fFindDewPointWithHumidity", 23000, NULL, 3, NULL, 1 );

Then the task needs to be defined:

void fFindDewPointWithHumidity( void *pvParameters )
{
  TickType_t xLastWakeTime = xTaskGetTickCount();
  const TickType_t xFrequency = 1000;
  for ( ;; )
  {
    float temperature = oTemperature;
    float humi = oHumidity;
    //Celcius
    float ans =  (temperature - (14.55 + 0.114 * temperature) * (1 - (0.01 * humi)) - pow(((2.5 + 0.007 * temperature) * (1 - (0.01 * humi))),3) - (15.9 + 0.117 * temperature) * pow((1 - (0.01 * humi)), 14));
    log_i( "%f", ans );
    xLastWakeTime = xTaskGetTickCount();
    vTaskDelayUntil( &xLastWakeTime, xFrequency );
  }
  vTaskDelete( NULL );
}

That does not define the task.

1 Like