     tftBrightness = preferences.getFloat( "tftbrightness", tftBrightness );
     ledcWrite( TFT_BACKLIGHT_CHANNEL, map( tftBrightness, 0, 100, 0, TFT_BACKLIGHT_MAXPWM ) );
 
-    ( preferences.getString( "tftorientation", "normal" ) == "normal" ) ? tftOrientation = TFT_ORIENTATION_NORMAL : tftOrientation = TFT_ORIENTATION_UPSIDEDOWN;
+    ( preferences.getString( "tftorientation", "normal" ).equals( "normal" ) ) ? tftOrientation = TFT_ORIENTATION_NORMAL : tftOrientation = TFT_ORIENTATION_UPSIDEDOWN;
     tft.setRotation( tftOrientation );
 
     touch.begin();


  /* check if a ffat partition is defined and halt the system if it is not defined*/
  if (!esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_FAT, "ffat")) {
    ESP_LOGI( TAG, "No FFat partition defined. Halting.\nCheck 'Tools>Partition Scheme' in the Arduino IDE and select a FFat partition." );
    const char * noffatStr = "No FFat found...";
    if ( xTftTaskHandle ) {
      tft.println( noffatStr );

    }
    ESP_LOGI( TAG, "%s", formatStr );
    if (!FFat.format( true, (char*)"ffat" ) || !FFat.begin()) {
      ESP_LOGE( TAG, "FFat error while formatting. Halting." );
      const char * errorffatStr = "FFat error.";
      if ( xTftTaskHandle ) {
        tft.println( errorffatStr );
