diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 53e2af33b..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: "Lint" - -on: - push: - branches: - - "**" - - "!release" - tags: - - "*" - pull_request: - -env: - SET_GH_OUTPUT: 1 - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: "Checkout code" - uses: actions/checkout@v4 - with: - fetch-depth: 1 - ref: ${{ github.event.pull_request.head.sha }} - - - name: "Check formatting" - run: ./fbt lint_all diff --git a/applications/main/archive/views/archive_browser_view.c b/applications/main/archive/views/archive_browser_view.c index ce1e84d5c..961d6ee4f 100644 --- a/applications/main/archive/views/archive_browser_view.c +++ b/applications/main/archive/views/archive_browser_view.c @@ -64,6 +64,58 @@ void archive_browser_set_callback( browser->context = context; } +static void archive_update_formatted_path(ArchiveBrowserViewModel* model) { + ArchiveBrowserView* browser = model->archive->browser; + if(!browser->path_changed) { + return; + } + + if(momentum_settings.browser_path_mode == BrowserPathOff || archive_is_home(browser)) { + furi_string_set(browser->formatted_path, ArchiveTabNames[model->tab_idx]); + } else { + const char* path = furi_string_get_cstr(browser->path); + switch(momentum_settings.browser_path_mode) { + case BrowserPathFull: + furi_string_set(browser->formatted_path, browser->path); + break; + + case BrowserPathBrief: { + furi_string_reset(browser->formatted_path); + FuriString* token = furi_string_alloc(); + FuriString* remaining = furi_string_alloc_set(path); + + while(furi_string_size(remaining) > 0) { + size_t slash_pos = furi_string_search_char(remaining, '/'); + if(slash_pos == FURI_STRING_FAILURE) { + furi_string_cat_printf( + browser->formatted_path, "/%s", furi_string_get_cstr(remaining)); + break; + } + furi_string_set_n(token, remaining, 0, slash_pos); + if(furi_string_size(token) > 0) { + furi_string_cat_printf( + browser->formatted_path, "/%c", furi_string_get_char(token, 0)); + } + furi_string_right(remaining, slash_pos + 1); + } + + furi_string_free(token); + furi_string_free(remaining); + break; + } + + case BrowserPathCurrent: + path_extract_basename(path, browser->formatted_path); + break; + + default: + break; + } + } + + browser->path_changed = false; +} + static void render_item_menu(Canvas* canvas, ArchiveBrowserViewModel* model) { if(menu_array_size(model->context_menu) == 0) { // Need init context menu @@ -328,10 +380,15 @@ static void draw_list(Canvas* canvas, ArchiveBrowserViewModel* model) { static void archive_render_status_bar(Canvas* canvas, ArchiveBrowserViewModel* model) { furi_assert(model); - const char* tab_name = ArchiveTabNames[model->tab_idx]; - if(model->tab_idx == ArchiveTabSearch && - scene_manager_get_scene_state(model->archive->scene_manager, ArchiveAppSceneSearch)) { - tab_name = "Searching"; + const char* tab_name = NULL; + if(model->tab_idx == ArchiveTabSearch) { + if(scene_manager_get_scene_state(model->archive->scene_manager, ArchiveAppSceneSearch)) { + tab_name = "Searching"; + } else { + tab_name = ArchiveTabNames[model->tab_idx]; + } + } else { + archive_update_formatted_path(model); } bool clip = model->clipboard != NULL; @@ -347,7 +404,19 @@ static void archive_render_status_bar(Canvas* canvas, ArchiveBrowserViewModel* m canvas_draw_rframe(canvas, 0, 0, 51, 13, 1); // frame canvas_draw_line(canvas, 49, 1, 49, 11); // shadow right canvas_draw_line(canvas, 1, 11, 49, 11); // shadow bottom - canvas_draw_str_aligned(canvas, 25, 9, AlignCenter, AlignBottom, tab_name); + if(tab_name) { + canvas_draw_str_aligned(canvas, 25, 9, AlignCenter, AlignBottom, tab_name); + } else { + elements_scrollable_text_line_centered( + canvas, + 25, + 9, + 45, + model->archive->browser->formatted_path, + model->scroll_counter, + false, + true); + } if(clip || model->select_mode) { const uint8_t box_w = clip ? 25 : 31; @@ -670,6 +739,8 @@ ArchiveBrowserView* browser_alloc(void) { browser->scroll_timer = furi_timer_alloc(browser_scroll_timer, FuriTimerTypePeriodic, browser); browser->path = furi_string_alloc_set(archive_get_default_path(TAB_DEFAULT)); + browser->formatted_path = furi_string_alloc(); + browser->path_changed = true; with_view_model( browser->view, @@ -703,6 +774,7 @@ void browser_free(ArchiveBrowserView* browser) { false); furi_string_free(browser->path); + furi_string_free(browser->formatted_path); view_free(browser->view); free(browser); diff --git a/lib/subghz/SConscript b/lib/subghz/SConscript index 7e39e4fd4..5f2751ec8 100644 --- a/lib/subghz/SConscript +++ b/lib/subghz/SConscript @@ -33,49 +33,7 @@ env.Append( libenv = env.Clone(FW_LIB_NAME="subghz") libenv.ApplyLibFlags() -all_sources = libenv.GlobRecursive("*.c*") - -excluded_protocols = [ - # - # Weather Station - "protocols/ws_generic.c", - "protocols/vauno_en8822c.c", - "protocols/emos_e601x.c", - "protocols/wendox_w6726.c", - "protocols/solight_te44.c", - "protocols/auriol_ahfl.c", - "protocols/auriol_hg0601a.c", - "protocols/kedsum_th.c", - "protocols/gt_wt_02.c", - "protocols/gt_wt_03.c", - "protocols/thermopro_tx4.c", - "protocols/infactory.c", - "protocols/nexus_th.c", - "protocols/tx_8300.c", - # - # Uncommon/Regional - "protocols/feron.c", - "protocols/elplast.c", - "protocols/hay21.c", - "protocols/doitrand.c", - "protocols/nero_radio.c", - "protocols/nero_sketch.c", - "protocols/pcsg_generic.c", - "protocols/power_smart.c", - "protocols/kinggates_stylo_4k.c", - "protocols/dickert_mahs.c", - "protocols/ansonic.c", - "protocols/dooya.c", - "protocols/ido.c", - "protocols/kia.c", - "protocols/smc5326.c", - "protocols/linear_delta3.c", - "protocols/schrader_gg4.c", - "protocols/tpms_generic.c", -] - -excluded_protocols_full = [f"lib/subghz/{f}" for f in excluded_protocols] -sources = [f for f in all_sources if str(f) not in excluded_protocols_full] +sources = libenv.GlobRecursive("*.c*") lib = libenv.StaticLibrary("${FW_LIB_NAME}", sources) libenv.Install("${LIB_DIST_DIR}", lib) diff --git a/lib/subghz/protocols/protocol_items.h b/lib/subghz/protocols/protocol_items.h index a66958094..48b587f38 100644 --- a/lib/subghz/protocols/protocol_items.h +++ b/lib/subghz/protocols/protocol_items.h @@ -50,24 +50,23 @@ #include "mastercode.h" #include "megacode.h" #include "hollarm.h" - -// #include "nero_sketch.h" -// #include "nero_radio.h" -// #include "ido.h" -// #include "kia.h" -// #include "power_smart.h" -// #include "doitrand.h" -// #include "ansonic.h" -// #include "smc5326.h" -// #include "linear_delta3.h" -// #include "dooya.h" -// #include "kinggates_stylo_4k.h" -// #include "dickert_mahs.h" -// #include "hay21.h" -// #include "feron.h" -// #include "elplast.h" -// #include "schrader_gg4.h" -// #include "tpms_generic.h" +#include "nero_sketch.h" +#include "nero_radio.h" +#include "ido.h" +#include "kia.h" +#include "power_smart.h" +#include "doitrand.h" +#include "ansonic.h" +#include "smc5326.h" +#include "linear_delta3.h" +#include "dooya.h" +#include "kinggates_stylo_4k.h" +#include "dickert_mahs.h" +#include "hay21.h" +#include "feron.h" +#include "elplast.h" +#include "schrader_gg4.h" +#include "tpms_generic.h" // Weather Station #include "oregon2.h" @@ -80,19 +79,18 @@ #include "acurite_606tx.h" #include "acurite_609txc.h" #include "lacrosse_tx141thbv2.h" - -// #include "solight_te44.h" -// #include "infactory.h" -// #include "acurite_986.h" -// #include "auriol_ahfl.h" -// #include "auriol_hg0601a.h" -// #include "emos_e601x.h" -// #include "gt_wt_02.h" -// #include "gt_wt_03.h" -// #include "kedsum_th.h" -// #include "nexus_th.h" -// #include "oregon_v1.h" -// #include "thermopro_tx4.h" -// #include "tx_8300.h" -// #include "vauno_en8822c.h" -// #include "wendox_w6726.h" +#include "solight_te44.h" +#include "infactory.h" +#include "acurite_986.h" +#include "auriol_ahfl.h" +#include "auriol_hg0601a.h" +#include "emos_e601x.h" +#include "gt_wt_02.h" +#include "gt_wt_03.h" +#include "kedsum_th.h" +#include "nexus_th.h" +#include "oregon_v1.h" +#include "thermopro_tx4.h" +#include "tx_8300.h" +#include "vauno_en8822c.h" +#include "wendox_w6726.h" diff --git a/targets/f7/api_symbols.csv b/targets/f7/api_symbols.csv index d2bd87306..f1a7613ed 100644 --- a/targets/f7/api_symbols.csv +++ b/targets/f7/api_symbols.csv @@ -4365,6 +4365,7 @@ Variable,-,_sys_errlist,const char* const[], Variable,-,_sys_nerr,int, Variable,-,ble_profile_hid,const FuriHalBleProfileTemplate*, Variable,+,ble_profile_serial,const FuriHalBleProfileTemplate* const, +Variable,+,canvas_font_params,const CanvasFontParameters[FontTotalNumber], Variable,+,compress_config_heatshrink_default,const CompressConfigHeatshrink, Variable,+,firmware_api_interface,const ElfApiInterface* const, Variable,+,furi_hal_i2c_bus_external,FuriHalI2cBus,