RPC: Add Virtual Display & Unify log tags (#814)

* RPC: Update protobuf sources
* RPC: Add Virtual Display
* Unify log tags
* RPC: Virtual Display placeholder
* Rpc: clear frame buffer callback before confirm.
* Firmware: full assert for hal, move fatfs initialization to furi hal.
* FuriHal: VCP optimizations, thread safe console. Rpc: adjust buffer sizes.

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Anna Prosvetova
2021-11-12 16:04:35 +03:00
committed by GitHub
parent b564e8eb38
commit 558fa5670b
123 changed files with 1050 additions and 694 deletions

View File

@@ -2,7 +2,7 @@
#include <furi.h>
#include <file-worker.h>
#define BT_SETTINGS_TAG "bt settings"
#define TAG "BtSettings"
#define BT_SETTINGS_PATH "/int/bt.settings"
bool bt_settings_load(BtSettings* bt_settings) {
@@ -10,7 +10,7 @@ bool bt_settings_load(BtSettings* bt_settings) {
bool file_loaded = false;
BtSettings settings = {};
FURI_LOG_I(BT_SETTINGS_TAG, "Loading settings from \"%s\"", BT_SETTINGS_PATH);
FURI_LOG_I(TAG, "Loading settings from \"%s\"", BT_SETTINGS_PATH);
FileWorker* file_worker = file_worker_alloc(true);
if(file_worker_open(file_worker, BT_SETTINGS_PATH, FSAM_READ, FSOM_OPEN_EXISTING)) {
if(file_worker_read(file_worker, &settings, sizeof(settings))) {
@@ -20,16 +20,16 @@ bool bt_settings_load(BtSettings* bt_settings) {
file_worker_free(file_worker);
if(file_loaded) {
FURI_LOG_I(BT_SETTINGS_TAG, "Settings load success");
FURI_LOG_I(TAG, "Settings load success");
if(settings.version != BT_SETTINGS_VERSION) {
FURI_LOG_E(BT_SETTINGS_TAG, "Settings version mismatch");
FURI_LOG_E(TAG, "Settings version mismatch");
} else {
osKernelLock();
*bt_settings = settings;
osKernelUnlock();
}
} else {
FURI_LOG_E(BT_SETTINGS_TAG, "Settings load failed");
FURI_LOG_E(TAG, "Settings load failed");
}
return file_loaded;
}
@@ -41,7 +41,7 @@ bool bt_settings_save(BtSettings* bt_settings) {
FileWorker* file_worker = file_worker_alloc(true);
if(file_worker_open(file_worker, BT_SETTINGS_PATH, FSAM_WRITE, FSOM_OPEN_ALWAYS)) {
if(file_worker_write(file_worker, bt_settings, sizeof(BtSettings))) {
FURI_LOG_I(BT_SETTINGS_TAG, "Settings saved to \"%s\"", BT_SETTINGS_PATH);
FURI_LOG_I(TAG, "Settings saved to \"%s\"", BT_SETTINGS_PATH);
result = true;
}
}