Преглед изворни кода

Remove connect WiFi from init

FlipperHTTP auto-connects
jblanked пре 1 година
родитељ
комит
2f4f54825a
2 измењених фајлова са 4 додато и 11 уклоњено
  1. 4 6
      app.c
  2. 0 5
      flip_weather_free.h

+ 4 - 6
app.c

@@ -12,17 +12,15 @@ int32_t flip_weather_app(void *p)
 
     // Initialize the FlipWeather application
     FlipWeatherApp *app = flip_weather_app_alloc();
-
-    if (!flipper_http_ping())
+    if (!app)
     {
-        FURI_LOG_E(TAG, "Failed to ping the device");
+        FURI_LOG_E(TAG, "Failed to allocate FlipWeatherApp");
         return -1;
     }
 
-    // connect wifi
-    if (!flipper_http_connect_wifi())
+    if (!flipper_http_ping())
     {
-        FURI_LOG_E(TAG, "Failed to connect to WiFi");
+        FURI_LOG_E(TAG, "Failed to ping the device");
         return -1;
     }
 

+ 0 - 5
flip_weather_free.h

@@ -10,11 +10,6 @@ static void flip_weather_app_free(FlipWeatherApp *app)
         return;
     }
 
-    if (!flipper_http_disconnect_wifi())
-    {
-        FURI_LOG_E(TAG, "Failed to disconnect from wifi");
-    }
-
     // Free View(s)
     if (app->view_weather)
     {