Merge branch 'dev' into reborned/nfc_ui_refactor

This commit is contained in:
あく
2023-12-18 16:39:20 +00:00
committed by GitHub
211 changed files with 3705 additions and 11190 deletions

View File

@@ -118,7 +118,8 @@ void cli_motd() {
"|_| |____||___||_| |_| |___||_|_\\ \\___||____||___|\r\n"
"\r\n"
"Welcome to Flipper Zero Command Line Interface!\r\n"
"Read Manual https://docs.flipperzero.one\r\n"
"Read the manual: https://docs.flipper.net/development/cli\r\n"
"Run `help` or `?` to list available commands\r\n"
"\r\n");
const Version* firmware_version = furi_hal_version_get_firmware_version();

View File

@@ -202,7 +202,7 @@ uint16_t canvas_string_width(Canvas* canvas, const char* str) {
return u8g2_GetStrWidth(&canvas->fb, str);
}
uint8_t canvas_glyph_width(Canvas* canvas, char symbol) {
uint8_t canvas_glyph_width(Canvas* canvas, uint16_t symbol) {
furi_assert(canvas);
return u8g2_GetGlyphWidth(&canvas->fb, symbol);
}

View File

@@ -214,7 +214,7 @@ uint16_t canvas_string_width(Canvas* canvas, const char* str);
*
* @return width in pixels
*/
uint8_t canvas_glyph_width(Canvas* canvas, char symbol);
uint8_t canvas_glyph_width(Canvas* canvas, uint16_t symbol);
/** Draw bitmap picture at position defined by x,y.
*

View File

@@ -1,9 +1,10 @@
#include "flipper.pb.h"
#include "rpc_i.h"
#include "gui.pb.h"
#include <gui/gui_i.h>
#include <assets_icons.h>
#include <flipper.pb.h>
#include <gui.pb.h>
#define TAG "RpcGui"
typedef enum {

View File

@@ -1,6 +1,6 @@
#pragma once
#include "rpc.h"
#include "storage/filesystem_api_defines.h"
#include <storage/filesystem_api_defines.h>
#include <pb.h>
#include <pb_decode.h>
#include <pb_encode.h>

View File

@@ -1,18 +1,18 @@
#include "flipper.pb.h"
#include <core/common_defines.h>
#include <core/memmgr.h>
#include <core/record.h>
#include "pb_decode.h"
#include "rpc/rpc.h"
#include "rpc_i.h"
#include "storage.pb.h"
#include "storage/filesystem_api_defines.h"
#include "storage/storage.h"
#include <stdint.h>
#include <rpc/rpc.h>
#include <rpc/rpc_i.h>
#include <storage/filesystem_api_defines.h>
#include <storage/storage.h>
#include <lib/toolbox/md5_calc.h>
#include <lib/toolbox/path.h>
#include <update_util/lfs_backup.h>
#include <pb_decode.h>
#include <storage.pb.h>
#include <flipper.pb.h>
#define TAG "RpcStorage"
#define MAX_NAME_LENGTH 255

View File

@@ -179,7 +179,8 @@ static void rpc_system_system_factory_reset_process(const PB_Main* request, void
RpcSession* session = (RpcSession*)context;
furi_assert(session);
furi_hal_rtc_set_flag(FuriHalRtcFlagFactoryReset);
furi_hal_rtc_reset_registers();
furi_hal_rtc_set_flag(FuriHalRtcFlagStorageFormatInternal);
power_reboot(PowerBootModeNormal);
(void)session;

View File

@@ -603,7 +603,8 @@ static void storage_cli_factory_reset(Cli* cli, FuriString* args, void* context)
char c = cli_getc(cli);
if(c == 'y' || c == 'Y') {
printf("Data will be wiped after reboot.\r\n");
furi_hal_rtc_set_flag(FuriHalRtcFlagFactoryReset);
furi_hal_rtc_reset_registers();
furi_hal_rtc_set_flag(FuriHalRtcFlagStorageFormatInternal);
power_reboot(PowerBootModeNormal);
} else {
printf("Safe choice.\r\n");

View File

@@ -189,7 +189,7 @@ static void storage_int_lfs_mount(LFSData* lfs_data, StorageData* storage) {
lfs_t* lfs = &lfs_data->lfs;
bool was_fingerprint_outdated = storage_int_check_and_set_fingerprint(lfs_data);
bool need_format = furi_hal_rtc_is_flag_set(FuriHalRtcFlagFactoryReset) ||
bool need_format = furi_hal_rtc_is_flag_set(FuriHalRtcFlagStorageFormatInternal) ||
was_fingerprint_outdated;
if(need_format) {
@@ -197,7 +197,7 @@ static void storage_int_lfs_mount(LFSData* lfs_data, StorageData* storage) {
err = lfs_format(lfs, &lfs_data->config);
if(err == 0) {
FURI_LOG_I(TAG, "Factory reset: Format successful, trying to mount");
furi_hal_rtc_reset_flag(FuriHalRtcFlagFactoryReset);
furi_hal_rtc_reset_flag(FuriHalRtcFlagStorageFormatInternal);
err = lfs_mount(lfs, &lfs_data->config);
if(err == 0) {
FURI_LOG_I(TAG, "Factory reset: Mounted");