Просмотр исходного кода

Decrease game thread and max file show size

this should prevent out of memory when starting the game
jblanked 1 год назад
Родитель
Сommit
10bec4b6a0
2 измененных файлов с 4 добавлено и 4 удалено
  1. 1 1
      callback/callback.c
  2. 3 3
      flipper_http/flipper_http.h

+ 1 - 1
callback/callback.c

@@ -537,7 +537,7 @@ void callback_submenu_choices(void *context, uint32_t index)
             }
         }
         view_dispatcher_switch_to_view(app->view_dispatcher, FlipWorldViewMain);
-        FuriThread *thread = furi_thread_alloc_ex("game", 4096, game_app, app);
+        FuriThread *thread = furi_thread_alloc_ex("game", 1024, game_app, app);
         if (!thread)
         {
             FURI_LOG_E(TAG, "Failed to allocate game thread");

+ 3 - 3
flipper_http/flipper_http.h

@@ -22,9 +22,9 @@
 #define UART_CH (FuriHalSerialIdUsart)    // UART channel
 #define TIMEOUT_DURATION_TICKS (5 * 1000) // 5 seconds
 #define BAUDRATE (115200)                 // UART baudrate
-#define RX_BUF_SIZE 1024                  // UART RX buffer size
-#define RX_LINE_BUFFER_SIZE 4096          // UART RX line buffer size (increase for large responses)
-#define MAX_FILE_SHOW 4096                // Maximum data from file to show
+#define RX_BUF_SIZE 2048                  // UART RX buffer size
+#define RX_LINE_BUFFER_SIZE 2048          // UART RX line buffer size (increase for large responses)
+#define MAX_FILE_SHOW 3000                // Maximum data from file to show
 #define FILE_BUFFER_SIZE 512              // File buffer size
 
 // Forward declaration for callback