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

Unitemp: Save location, icons support, format

Willy-JL 2 лет назад
Родитель
Сommit
12bb60de42
5 измененных файлов с 13 добавлено и 11 удалено
  1. 5 6
      unitemp/application.fam
  2. 1 0
      unitemp/unitemp.c
  3. 1 1
      unitemp/unitemp.h
  4. 4 3
      unitemp/views/General_view.c
  5. 2 1
      unitemp/views/Widgets_view.c

+ 5 - 6
unitemp/application.fam

@@ -1,6 +1,6 @@
 App(
 App(
     appid="unitemp",
     appid="unitemp",
-    name="Temp sensors reader",
+    name="[GPIO] Unitemp",
     apptype=FlipperAppType.EXTERNAL,
     apptype=FlipperAppType.EXTERNAL,
     entry_point="unitemp_app",
     entry_point="unitemp_app",
     requires=[
     requires=[
@@ -8,12 +8,11 @@ App(
     ],
     ],
     stack_size=2 * 1024,
     stack_size=2 * 1024,
     order=100,
     order=100,
-    fap_description = "Universal temperature sensors reader",
+    fap_description="Universal temperature sensors reader",
     fap_version="1.4",
     fap_version="1.4",
-    fap_author = "@quen0n & (fixes by @xMasterX)",
-    fap_weburl = "https://github.com/quen0n/unitemp-flipperzero",
+    fap_author="@quen0n & (fixes by @xMasterX)",
+    fap_weburl="https://github.com/quen0n/unitemp-flipperzero",
     fap_category="GPIO",
     fap_category="GPIO",
     fap_icon="icon.png",
     fap_icon="icon.png",
     fap_icon_assets="assets",
     fap_icon_assets="assets",
-    fap_libs=["assets"],
-)
+)

+ 1 - 0
unitemp/unitemp.c

@@ -224,6 +224,7 @@ static bool unitemp_alloc(void) {
 
 
     //Открытие хранилища (?)
     //Открытие хранилища (?)
     app->storage = furi_record_open(RECORD_STORAGE);
     app->storage = furi_record_open(RECORD_STORAGE);
+    storage_common_migrate(app->storage, EXT_PATH("unitemp"), APP_PATH_FOLDER);
 
 
     //Уведомления
     //Уведомления
     app->notifications = furi_record_open(RECORD_NOTIFICATION);
     app->notifications = furi_record_open(RECORD_NOTIFICATION);

+ 1 - 1
unitemp/unitemp.h

@@ -42,7 +42,7 @@
 //Версия приложения
 //Версия приложения
 #define UNITEMP_APP_VER "1.4"
 #define UNITEMP_APP_VER "1.4"
 //Путь хранения файлов плагина
 //Путь хранения файлов плагина
-#define APP_PATH_FOLDER "/ext/unitemp"
+#define APP_PATH_FOLDER EXT_PATH("apps_data/unitemp")
 //Имя файла с настройками
 //Имя файла с настройками
 #define APP_FILENAME_SETTINGS "settings.cfg"
 #define APP_FILENAME_SETTINGS "settings.cfg"
 //Имя файла с датчиками
 //Имя файла с датчиками

+ 4 - 3
unitemp/views/General_view.c

@@ -18,9 +18,10 @@
 #include "UnitempViews.h"
 #include "UnitempViews.h"
 #include "unitemp_icons.h"
 #include "unitemp_icons.h"
 
 
-extern const Icon I_ButtonRight_4x7;
-extern const Icon I_ButtonLeft_4x7;
-extern const Icon I_Ok_btn_9x9;
+#include <assets_icons.h>
+// extern const Icon I_ButtonRight_4x7;
+// extern const Icon I_ButtonLeft_4x7;
+// extern const Icon I_Ok_btn_9x9;
 
 
 static View* view;
 static View* view;
 
 

+ 2 - 1
unitemp/views/Widgets_view.c

@@ -18,7 +18,8 @@
 #include "UnitempViews.h"
 #include "UnitempViews.h"
 #include "unitemp_icons.h"
 #include "unitemp_icons.h"
 
 
-extern const Icon I_DolphinCommon_56x48;
+#include <assets_icons.h>
+// extern const Icon I_DolphinCommon_56x48;
 
 
 void unitemp_widgets_alloc(void) {
 void unitemp_widgets_alloc(void) {
     app->widget = widget_alloc();
     app->widget = widget_alloc();