mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-11 06:09:08 -07:00
Merge remote-tracking branch 'ofw/dev' into mntm-dev
This commit is contained in:
@@ -222,7 +222,7 @@ void dialog_ex_set_header(
|
||||
dialog_ex->view,
|
||||
DialogExModel * model,
|
||||
{
|
||||
furi_string_set(model->header.text, text);
|
||||
furi_string_set(model->header.text, text ? text : "");
|
||||
model->header.x = x;
|
||||
model->header.y = y;
|
||||
model->header.horizontal = horizontal;
|
||||
@@ -243,7 +243,7 @@ void dialog_ex_set_text(
|
||||
dialog_ex->view,
|
||||
DialogExModel * model,
|
||||
{
|
||||
furi_string_set(model->text.text, text);
|
||||
furi_string_set(model->text.text, text ? text : "");
|
||||
model->text.x = x;
|
||||
model->text.y = y;
|
||||
model->text.horizontal = horizontal;
|
||||
@@ -268,7 +268,10 @@ void dialog_ex_set_icon(DialogEx* dialog_ex, uint8_t x, uint8_t y, const Icon* i
|
||||
void dialog_ex_set_left_button_text(DialogEx* dialog_ex, const char* text) {
|
||||
furi_check(dialog_ex);
|
||||
with_view_model(
|
||||
dialog_ex->view, DialogExModel * model, { furi_string_set(model->left_text, text); }, true);
|
||||
dialog_ex->view,
|
||||
DialogExModel * model,
|
||||
{ furi_string_set(model->left_text, text ? text : ""); },
|
||||
true);
|
||||
}
|
||||
|
||||
void dialog_ex_set_center_button_text(DialogEx* dialog_ex, const char* text) {
|
||||
@@ -276,7 +279,7 @@ void dialog_ex_set_center_button_text(DialogEx* dialog_ex, const char* text) {
|
||||
with_view_model(
|
||||
dialog_ex->view,
|
||||
DialogExModel * model,
|
||||
{ furi_string_set(model->center_text, text); },
|
||||
{ furi_string_set(model->center_text, text ? text : ""); },
|
||||
true);
|
||||
}
|
||||
|
||||
@@ -285,7 +288,7 @@ void dialog_ex_set_right_button_text(DialogEx* dialog_ex, const char* text) {
|
||||
with_view_model(
|
||||
dialog_ex->view,
|
||||
DialogExModel * model,
|
||||
{ furi_string_set(model->right_text, text); },
|
||||
{ furi_string_set(model->right_text, text ? text : ""); },
|
||||
true);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "rpc.h"
|
||||
#include "rpc_app_error_codes.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
11
applications/services/rpc/rpc_app_error_codes.h
Normal file
11
applications/services/rpc/rpc_app_error_codes.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* @brief Enumeration of possible error codes for application which can be started through rpc
|
||||
*/
|
||||
typedef enum {
|
||||
RpcAppSystemErrorCodeNone, /** There are no errors */
|
||||
RpcAppSystemErrorCodeParseFile, /** File parsing error, or wrong file structure, or missing required parameters. more accurate data can be obtained through the debug port */
|
||||
RpcAppSystemErrorCodeRegionLock, /** Requested function is blocked by regional settings */
|
||||
RpcAppSystemErrorCodeInternalParse, /** Error in protocol parameters description, or some data in opened file are unsupported */
|
||||
} RpcAppSystemErrorCode;
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <storage/storage.h>
|
||||
#include <lib/toolbox/md5_calc.h>
|
||||
#include <lib/toolbox/path.h>
|
||||
#include <update_util/lfs_backup.h>
|
||||
#include <update_util/int_backup.h>
|
||||
#include <toolbox/tar/tar_archive.h>
|
||||
|
||||
#include <pb_decode.h>
|
||||
@@ -656,7 +656,7 @@ static void rpc_system_storage_backup_create_process(const PB_Main* request, voi
|
||||
|
||||
rpc_system_storage_reset_state(rpc_storage, session, true);
|
||||
|
||||
bool backup_ok = lfs_backup_create(
|
||||
bool backup_ok = int_backup_create(
|
||||
rpc_storage->api, request->content.storage_backup_create_request.archive_path);
|
||||
|
||||
rpc_send_and_release_empty(
|
||||
@@ -676,7 +676,7 @@ static void rpc_system_storage_backup_restore_process(const PB_Main* request, vo
|
||||
|
||||
rpc_system_storage_reset_state(rpc_storage, session, true);
|
||||
|
||||
bool backup_ok = lfs_backup_unpack(
|
||||
bool backup_ok = int_backup_unpack(
|
||||
rpc_storage->api, request->content.storage_backup_restore_request.archive_path);
|
||||
|
||||
rpc_send_and_release_empty(
|
||||
|
||||
@@ -531,7 +531,7 @@ FS_Error storage_sd_info(Storage* storage, SDInfo* info);
|
||||
*/
|
||||
FS_Error storage_sd_status(Storage* storage);
|
||||
|
||||
/******************* Internal LFS Functions *******************/
|
||||
/************ Internal Storage Backup/Restore ************/
|
||||
|
||||
typedef void (*StorageNameConverter)(FuriString*);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user