mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 01:48:35 -07:00
Temporarily backport app updates from apps repo
This commit is contained in:
@@ -51,6 +51,9 @@ void camera_suite_save_settings(void* context) {
|
||||
fff_file, BOILERPLATE_SETTINGS_HEADER, BOILERPLATE_SETTINGS_FILE_VERSION);
|
||||
flipper_format_write_uint32(
|
||||
fff_file, BOILERPLATE_SETTINGS_KEY_ORIENTATION, &app->orientation, 1);
|
||||
flipper_format_write_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_DITHER, &app->dither, 1);
|
||||
flipper_format_write_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_FLASH, &app->flash, 1);
|
||||
flipper_format_write_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_JPEG, &app->jpeg, 1);
|
||||
flipper_format_write_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_HAPTIC, &app->haptic, 1);
|
||||
flipper_format_write_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_SPEAKER, &app->speaker, 1);
|
||||
flipper_format_write_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_LED, &app->led, 1);
|
||||
@@ -100,8 +103,12 @@ void camera_suite_read_settings(void* context) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Read settings
|
||||
flipper_format_read_uint32(
|
||||
fff_file, BOILERPLATE_SETTINGS_KEY_ORIENTATION, &app->orientation, 1);
|
||||
flipper_format_read_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_DITHER, &app->dither, 1);
|
||||
flipper_format_read_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_FLASH, &app->flash, 1);
|
||||
flipper_format_read_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_JPEG, &app->jpeg, 1);
|
||||
flipper_format_read_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_HAPTIC, &app->haptic, 1);
|
||||
flipper_format_read_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_SPEAKER, &app->speaker, 1);
|
||||
flipper_format_read_uint32(fff_file, BOILERPLATE_SETTINGS_KEY_LED, &app->led, 1);
|
||||
|
||||
@@ -2,14 +2,21 @@
|
||||
#include <string.h>
|
||||
#include <storage/storage.h>
|
||||
#include <flipper_format/flipper_format_i.h>
|
||||
|
||||
#include "../camera_suite.h"
|
||||
|
||||
#ifndef CAMERA_SUITE_STORAGE_H
|
||||
#define CAMERA_SUITE_STORAGE_H
|
||||
|
||||
#define BOILERPLATE_SETTINGS_FILE_VERSION 1
|
||||
#define CONFIG_FILE_DIRECTORY_PATH EXT_PATH("apps_data/camera_suite")
|
||||
#define BOILERPLATE_SETTINGS_SAVE_PATH CONFIG_FILE_DIRECTORY_PATH "/camera_suite.conf"
|
||||
#define BOILERPLATE_SETTINGS_SAVE_PATH_TMP BOILERPLATE_SETTINGS_SAVE_PATH ".tmp"
|
||||
#define BOILERPLATE_SETTINGS_HEADER "Camera Suite Config File"
|
||||
#define BOILERPLATE_SETTINGS_KEY_ORIENTATION "Orientation"
|
||||
#define BOILERPLATE_SETTINGS_KEY_DITHER "Dither"
|
||||
#define BOILERPLATE_SETTINGS_KEY_FLASH "Flash"
|
||||
#define BOILERPLATE_SETTINGS_KEY_JPEG "SaveJPEG"
|
||||
#define BOILERPLATE_SETTINGS_KEY_HAPTIC "Haptic"
|
||||
#define BOILERPLATE_SETTINGS_KEY_LED "Led"
|
||||
#define BOILERPLATE_SETTINGS_KEY_SPEAKER "Speaker"
|
||||
@@ -18,3 +25,5 @@
|
||||
void camera_suite_save_settings(void* context);
|
||||
|
||||
void camera_suite_read_settings(void* context);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user