[FL-2747, FL-2745] Browser worker fix, Device Info screen update #1620
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
2e993b0a58
commit
2a452063c6
@ -23,11 +23,12 @@ void desktop_debug_render(Canvas* canvas, void* model) {
|
|||||||
const Version* ver;
|
const Version* ver;
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
|
|
||||||
static const char* headers[] = {"FW Version Info:", "Dolphin Info:"};
|
static const char* headers[] = {"Device Info:", "Dolphin Info:"};
|
||||||
|
|
||||||
canvas_set_color(canvas, ColorBlack);
|
canvas_set_color(canvas, ColorBlack);
|
||||||
canvas_set_font(canvas, FontPrimary);
|
canvas_set_font(canvas, FontPrimary);
|
||||||
canvas_draw_str(canvas, 2, 9 + STATUS_BAR_Y_SHIFT, headers[m->screen]);
|
canvas_draw_str_aligned(
|
||||||
|
canvas, 64, 1 + STATUS_BAR_Y_SHIFT, AlignCenter, AlignTop, headers[m->screen]);
|
||||||
canvas_set_font(canvas, FontSecondary);
|
canvas_set_font(canvas, FontSecondary);
|
||||||
|
|
||||||
if(m->screen != DesktopViewStatsMeta) {
|
if(m->screen != DesktopViewStatsMeta) {
|
||||||
@ -44,7 +45,7 @@ void desktop_debug_render(Canvas* canvas, void* model) {
|
|||||||
furi_hal_version_get_hw_region_name(),
|
furi_hal_version_get_hw_region_name(),
|
||||||
furi_hal_region_get_name(),
|
furi_hal_region_get_name(),
|
||||||
my_name ? my_name : "Unknown");
|
my_name ? my_name : "Unknown");
|
||||||
canvas_draw_str(canvas, 5, 19 + STATUS_BAR_Y_SHIFT, buffer);
|
canvas_draw_str(canvas, 0, 19 + STATUS_BAR_Y_SHIFT, buffer);
|
||||||
|
|
||||||
ver = furi_hal_version_get_firmware_version();
|
ver = furi_hal_version_get_firmware_version();
|
||||||
const BleGlueC2Info* c2_ver = NULL;
|
const BleGlueC2Info* c2_ver = NULL;
|
||||||
@ -52,7 +53,7 @@ void desktop_debug_render(Canvas* canvas, void* model) {
|
|||||||
c2_ver = ble_glue_get_c2_info();
|
c2_ver = ble_glue_get_c2_info();
|
||||||
#endif
|
#endif
|
||||||
if(!ver) {
|
if(!ver) {
|
||||||
canvas_draw_str(canvas, 5, 29 + STATUS_BAR_Y_SHIFT, "No info");
|
canvas_draw_str(canvas, 0, 30 + STATUS_BAR_Y_SHIFT, "No info");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +63,7 @@ void desktop_debug_render(Canvas* canvas, void* model) {
|
|||||||
"%s [%s]",
|
"%s [%s]",
|
||||||
version_get_version(ver),
|
version_get_version(ver),
|
||||||
version_get_builddate(ver));
|
version_get_builddate(ver));
|
||||||
canvas_draw_str(canvas, 5, 28 + STATUS_BAR_Y_SHIFT, buffer);
|
canvas_draw_str(canvas, 0, 30 + STATUS_BAR_Y_SHIFT, buffer);
|
||||||
|
|
||||||
snprintf(
|
snprintf(
|
||||||
buffer,
|
buffer,
|
||||||
@ -72,11 +73,11 @@ void desktop_debug_render(Canvas* canvas, void* model) {
|
|||||||
version_get_githash(ver),
|
version_get_githash(ver),
|
||||||
version_get_gitbranchnum(ver),
|
version_get_gitbranchnum(ver),
|
||||||
c2_ver ? c2_ver->StackTypeString : "<none>");
|
c2_ver ? c2_ver->StackTypeString : "<none>");
|
||||||
canvas_draw_str(canvas, 5, 39 + STATUS_BAR_Y_SHIFT, buffer);
|
canvas_draw_str(canvas, 0, 40 + STATUS_BAR_Y_SHIFT, buffer);
|
||||||
|
|
||||||
snprintf(
|
snprintf(
|
||||||
buffer, sizeof(buffer), "[%d] %s", version_get_target(ver), version_get_gitbranch(ver));
|
buffer, sizeof(buffer), "[%d] %s", version_get_target(ver), version_get_gitbranch(ver));
|
||||||
canvas_draw_str(canvas, 5, 50 + STATUS_BAR_Y_SHIFT, buffer);
|
canvas_draw_str(canvas, 0, 50 + STATUS_BAR_Y_SHIFT, buffer);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Dolphin* dolphin = furi_record_open(RECORD_DOLPHIN);
|
Dolphin* dolphin = furi_record_open(RECORD_DOLPHIN);
|
||||||
|
@ -99,6 +99,11 @@ static bool browser_folder_check_and_switch(string_t path) {
|
|||||||
FileInfo file_info;
|
FileInfo file_info;
|
||||||
Storage* storage = furi_record_open(RECORD_STORAGE);
|
Storage* storage = furi_record_open(RECORD_STORAGE);
|
||||||
bool is_root = false;
|
bool is_root = false;
|
||||||
|
|
||||||
|
if(string_search_rchar(path, '/') == 0) {
|
||||||
|
is_root = true;
|
||||||
|
}
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
// Check if folder is existing and navigate back if not
|
// Check if folder is existing and navigate back if not
|
||||||
if(storage_common_stat(storage, string_get_cstr(path), &file_info) == FSE_OK) {
|
if(storage_common_stat(storage, string_get_cstr(path), &file_info) == FSE_OK) {
|
||||||
|
@ -156,7 +156,7 @@ static void ble_glue_update_c2_fw_info() {
|
|||||||
snprintf(
|
snprintf(
|
||||||
local_info->StackTypeString,
|
local_info->StackTypeString,
|
||||||
BLE_GLUE_MAX_VERSION_STRING_LEN,
|
BLE_GLUE_MAX_VERSION_STRING_LEN,
|
||||||
"%d.%d.%d.%s",
|
"%d.%d.%d:%s",
|
||||||
local_info->VersionMajor,
|
local_info->VersionMajor,
|
||||||
local_info->VersionMinor,
|
local_info->VersionMinor,
|
||||||
local_info->VersionSub,
|
local_info->VersionSub,
|
||||||
|
Loading…
Reference in New Issue
Block a user