src/mqtt.cpp
// _________________________________________________________________________
// Decorator function since we cannot use non static member function in freertos' createTask 
Decorator function since we cannot use non static member function in freertos' createTask
Decorator function since we cannot use non static member function in freertos ' createTask
void MQTT::_connectMqtt(void * pvParameters) {
  bool mqtt_connected = ((MQTT*)pvParameters)->_connect();
  while(!mqtt_connected) {
    vTaskDelay(_MQTT_UPDATE_INTERVAL);
    mqtt_connected = ((MQTT*)pvParameters)->_connect();
  }
  ((MQTT*)pvParameters)->_connectHandle = NULL;
  vTaskDelete(NULL);
}
void MQTT :: _connectMqtt ( void * pvParameters ) { bool mqtt_connected = ( ( MQTT * ) pvParameters ) -> _connect ( ) ; while ( ! mqtt_connected ) { vTaskDelay ( _MQTT_UPDATE_INTERVAL ) ; mqtt_connected = ( ( MQTT * ) pvParameters ) -> _connect ( ) ; } ( ( MQTT * ) pvParameters ) -> _connectHandle = NULL ; vTaskDelete ( NULL ) ; }
_________________________________________________________________________
Decorator function since we cannot use non static member function in freertos' createTask
_________________________________________________________________________ Decorator function since we cannot use non static member function in freertos ' createTask
// Delete this task