|
|
@@ -7,8 +7,9 @@
|
|
|
#include "gpio_item.h"
|
|
|
#include "zeitraffer_icons.h"
|
|
|
|
|
|
-#define CONFIG_FILE_DIRECTORY_PATH "/ext/apps_data/zeitraffer"
|
|
|
-#define CONFIG_FILE_PATH CONFIG_FILE_DIRECTORY_PATH "/zeitraffer.conf"
|
|
|
+#include <assets_icons.h>
|
|
|
+
|
|
|
+#define CONFIG_FILE_PATH APP_DATA_PATH("timelapse.conf")
|
|
|
|
|
|
// Часть кода покрадена из https://github.com/zmactep/flipperzero-hello-world
|
|
|
|
|
|
@@ -153,10 +154,6 @@ int32_t zeitraffer_app(void* p) {
|
|
|
FlipperFormat* load = flipper_format_file_alloc(storage);
|
|
|
|
|
|
do {
|
|
|
- if(!storage_simply_mkdir(storage, CONFIG_FILE_DIRECTORY_PATH)) {
|
|
|
- notification_message(notifications, &sequence_error);
|
|
|
- break;
|
|
|
- }
|
|
|
if(!flipper_format_file_open_existing(load, CONFIG_FILE_PATH)) {
|
|
|
notification_message(notifications, &sequence_error);
|
|
|
break;
|
|
|
@@ -325,6 +322,7 @@ int32_t zeitraffer_app(void* p) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ view_port_update(view_port);
|
|
|
}
|
|
|
|
|
|
// Наше событие — это сработавший таймер
|
|
|
@@ -378,6 +376,8 @@ int32_t zeitraffer_app(void* p) {
|
|
|
default:
|
|
|
notification_message(notifications, &sequence_display_backlight_enforce_auto);
|
|
|
}
|
|
|
+
|
|
|
+ view_port_update(view_port);
|
|
|
}
|
|
|
if(Time < 1) Time = 1; // Не даём открутить таймер меньше единицы
|
|
|
if(Count < -1)
|
|
|
@@ -398,7 +398,7 @@ int32_t zeitraffer_app(void* p) {
|
|
|
}
|
|
|
if(!flipper_format_write_comment_cstr(
|
|
|
save,
|
|
|
- "Zeitraffer app settings: № of frames, interval time, backlight type, Delay")) {
|
|
|
+ "Zeitraffer app settings: n of frames, interval time, backlight type, Delay")) {
|
|
|
notification_message(notifications, &sequence_error);
|
|
|
break;
|
|
|
}
|