diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 9187b0748..9a8722cc5 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ +patreon: mmxdev custom: [ "https://boosty.to/mmxdev", diff --git a/CHANGELOG.md b/CHANGELOG.md index a38e4e1e7..14c20e5d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ## Please support development of the project |Service|Remark|Link/Wallet| |-|-|-| +|**Patreon**||https://patreon.com/mmxdev| |**Boosty**|patreon alternative|https://boosty.to/mmxdev| |cloudtips|only RU payments accepted|https://pay.cloudtips.ru/p/7b3e9d65| |YooMoney|only RU payments accepted|https://yoomoney.ru/fundraise/XA49mgQLPA0.221209| diff --git a/ReadMe.md b/ReadMe.md index 5e906f9ad..4e21dc3f9 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -148,6 +148,7 @@ Also, regarding our releases, every build has and always will be free and open-s You can support us by using links or addresses below: |Service|Remark|Link/Wallet| |-|-|-| +|**Patreon**||https://patreon.com/mmxdev| |**Boosty**|patreon alternative|https://boosty.to/mmxdev| |cloudtips|only RU payments accepted|https://pay.cloudtips.ru/p/7b3e9d65| |YooMoney|only RU payments accepted|https://yoomoney.ru/fundraise/XA49mgQLPA0.221209| diff --git a/applications/main/infrared/scenes/infrared_scene_universal_ac.c b/applications/main/infrared/scenes/infrared_scene_universal_ac.c index 58f067735..8914e5ad0 100644 --- a/applications/main/infrared/scenes/infrared_scene_universal_ac.c +++ b/applications/main/infrared/scenes/infrared_scene_universal_ac.c @@ -1,6 +1,7 @@ #include "../infrared_i.h" #include "common/infrared_scene_universal_common.h" +#include void infrared_scene_universal_ac_on_enter(void* context) { infrared_scene_universal_common_on_enter(context); @@ -18,24 +19,26 @@ void infrared_scene_universal_ac_on_enter(void* context) { i, 0, 0, - 3, - 22, - &I_Off_25x27, - &I_Off_hvr_25x27, + 6, + 15, + &I_power_19x20, + &I_power_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 4, 37, &I_power_text_24x5); infrared_brute_force_add_record(brute_force, i++, "Off"); button_panel_add_item( button_panel, i, 1, 0, - 36, - 22, - &I_Dehumidify_25x27, - &I_Dehumidify_hvr_25x27, + 39, + 15, + &I_dry_19x20, + &I_dry_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 41, 37, &I_dry_text_15x5); infrared_brute_force_add_record(brute_force, i++, "Dh"); button_panel_add_item( button_panel, @@ -43,9 +46,9 @@ void infrared_scene_universal_ac_on_enter(void* context) { 0, 1, 3, - 59, - &I_CoolHi_25x27, - &I_CoolHi_hvr_25x27, + 49, + &I_max_24x23, + &I_max_hover_24x23, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Cool_hi"); @@ -54,39 +57,71 @@ void infrared_scene_universal_ac_on_enter(void* context) { i, 1, 1, - 36, - 59, - &I_HeatHi_25x27, - &I_HeatHi_hvr_25x27, + 37, + 49, + &I_max_24x23, + &I_max_hover_24x23, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Heat_hi"); - button_panel_add_item( - button_panel, - i, - 0, - 2, - 3, - 91, - &I_CoolLo_25x27, - &I_CoolLo_hvr_25x27, - infrared_scene_universal_common_item_callback, - context); + if(furi_hal_rtc_get_locale_units() == FuriHalRtcLocaleUnitsMetric) { + button_panel_add_item( + button_panel, + i, + 0, + 2, + 3, + 100, + &I_celsius_24x23, + &I_celsius_hover_24x23, + infrared_scene_universal_common_item_callback, + context); + } else { + button_panel_add_item( + button_panel, + i, + 0, + 2, + 3, + 100, + &I_fahren_24x23, + &I_fahren_hover_24x23, + infrared_scene_universal_common_item_callback, + context); + } infrared_brute_force_add_record(brute_force, i++, "Cool_lo"); - button_panel_add_item( - button_panel, - i, - 1, - 2, - 36, - 91, - &I_HeatLo_25x27, - &I_HeatLo_hvr_25x27, - infrared_scene_universal_common_item_callback, - context); + + if(furi_hal_rtc_get_locale_units() == FuriHalRtcLocaleUnitsMetric) { + button_panel_add_item( + button_panel, + i, + 1, + 2, + 37, + 100, + &I_celsius_24x23, + &I_celsius_hover_24x23, + infrared_scene_universal_common_item_callback, + context); + } else { + button_panel_add_item( + button_panel, + i, + 1, + 2, + 37, + 100, + &I_fahren_24x23, + &I_fahren_hover_24x23, + infrared_scene_universal_common_item_callback, + context); + } infrared_brute_force_add_record(brute_force, i++, "Heat_lo"); - button_panel_add_label(button_panel, 6, 10, FontPrimary, "AC remote"); + button_panel_add_icon(button_panel, 0, 60, &I_cool_30x51); + button_panel_add_icon(button_panel, 34, 60, &I_heat_30x51); + + button_panel_add_label(button_panel, 4, 10, FontPrimary, "AC remote"); view_set_orientation(view_stack_get_view(infrared->view_stack), ViewOrientationVertical); view_dispatcher_switch_to_view(infrared->view_dispatcher, InfraredViewStack); diff --git a/applications/main/infrared/scenes/infrared_scene_universal_audio.c b/applications/main/infrared/scenes/infrared_scene_universal_audio.c index 00c86fff4..3938b6080 100644 --- a/applications/main/infrared/scenes/infrared_scene_universal_audio.c +++ b/applications/main/infrared/scenes/infrared_scene_universal_audio.c @@ -18,82 +18,88 @@ void infrared_scene_universal_audio_on_enter(void* context) { i, 0, 0, - 3, - 11, - &I_Power_25x27, - &I_Power_hvr_25x27, + 6, + 13, + &I_power_19x20, + &I_power_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 4, 35, &I_power_text_24x5); infrared_brute_force_add_record(brute_force, i++, "Power"); button_panel_add_item( button_panel, i, 1, 0, - 36, - 11, - &I_Mute_25x27, - &I_Mute_hvr_25x27, + 39, + 13, + &I_mute_19x20, + &I_mute_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 39, 35, &I_mute_text_19x5); infrared_brute_force_add_record(brute_force, i++, "Mute"); button_panel_add_item( button_panel, i, 0, 1, - 3, - 41, - &I_Play_25x27, - &I_Play_hvr_25x27, + 6, + 42, + &I_play_19x20, + &I_play_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 6, 64, &I_play_text_19x5); infrared_brute_force_add_record(brute_force, i++, "Play"); button_panel_add_item( button_panel, i, - 1, - 1, - 36, - 41, - &I_Pause_25x27, - &I_Pause_hvr_25x27, + 0, + 2, + 6, + 71, + &I_pause_19x20, + &I_pause_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 4, 93, &I_pause_text_23x5); infrared_brute_force_add_record(brute_force, i++, "Pause"); button_panel_add_item( button_panel, i, 0, - 2, 3, - 71, - &I_TrackPrev_25x27, - &I_TrackPrev_hvr_25x27, + 6, + 101, + &I_prev_19x20, + &I_prev_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 6, 123, &I_prev_text_19x5); infrared_brute_force_add_record(brute_force, i++, "Prev"); button_panel_add_item( button_panel, i, 1, - 2, - 36, - 71, - &I_TrackNext_25x27, - &I_TrackNext_hvr_25x27, + 3, + 39, + 101, + &I_next_19x20, + &I_next_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 39, 123, &I_next_text_19x6); infrared_brute_force_add_record(brute_force, i++, "Next"); button_panel_add_item( button_panel, i, - 0, - 3, - 3, - 101, - &I_Vol_down_25x27, - &I_Vol_down_hvr_25x27, + 1, + 2, + 37, + 77, + &I_voldown_24x21, + &I_voldown_hover_24x21, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Vol_dn"); @@ -101,16 +107,17 @@ void infrared_scene_universal_audio_on_enter(void* context) { button_panel, i, 1, - 3, - 36, - 101, - &I_Vol_up_25x27, - &I_Vol_up_hvr_25x27, + 1, + 37, + 43, + &I_volup_24x21, + &I_volup_hover_24x21, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Vol_up"); - button_panel_add_label(button_panel, 1, 8, FontPrimary, "Mus. remote"); + button_panel_add_label(button_panel, 1, 10, FontPrimary, "Mus. remote"); + button_panel_add_icon(button_panel, 34, 56, &I_vol_ac_text_30x30); view_set_orientation(view_stack_get_view(infrared->view_stack), ViewOrientationVertical); view_dispatcher_switch_to_view(infrared->view_dispatcher, InfraredViewStack); diff --git a/applications/main/infrared/scenes/infrared_scene_universal_fan.c b/applications/main/infrared/scenes/infrared_scene_universal_fan.c index 967e15c24..1622c5458 100644 --- a/applications/main/infrared/scenes/infrared_scene_universal_fan.c +++ b/applications/main/infrared/scenes/infrared_scene_universal_fan.c @@ -19,34 +19,38 @@ void infrared_scene_universal_fan_on_enter(void* context) { i, 0, 0, - 3, + 6, 24, - &I_Power_25x27, - &I_Power_hvr_25x27, + &I_power_19x20, + &I_power_hover_19x20, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Power"); + button_panel_add_icon(button_panel, 4, 46, &I_power_text_24x5); + button_panel_add_item( button_panel, i, 1, 0, - 36, + 39, 24, - &I_Mode_25x27, - &I_Mode_hvr_25x27, + &I_mode_19x20, + &I_mode_hover_19x20, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Mode"); + button_panel_add_icon(button_panel, 39, 46, &I_mode_text_20x5); + button_panel_add_item( button_panel, i, - 0, 1, - 3, - 66, - &I_Vol_up_25x27, - &I_Vol_up_hvr_25x27, + 1, + 37, + 55, + &I_volup_24x21, + &I_volup_hover_24x21, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Speed_up"); @@ -54,11 +58,11 @@ void infrared_scene_universal_fan_on_enter(void* context) { button_panel, i, 1, - 1, - 36, - 66, - &I_Vol_down_25x27, - &I_Vol_down_hvr_25x27, + 2, + 37, + 89, + &I_voldown_24x21, + &I_voldown_hover_24x21, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Speed_dn"); @@ -66,31 +70,32 @@ void infrared_scene_universal_fan_on_enter(void* context) { button_panel, i, 0, - 2, - 3, - 98, - &I_Rotate_25x27, - &I_Rotate_hvr_25x27, + 1, + 6, + 58, + &I_rotate_19x20, + &I_rotate_hover_19x20, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Rotate"); + button_panel_add_icon(button_panel, 4, 80, &I_rotate_text_24x5); + button_panel_add_item( button_panel, i, - 1, + 0, 2, - 36, - 98, - &I_Timer_25x27, - &I_Timer_hvr_25x27, + 6, + 87, + &I_timer_19x20, + &I_timer_hover_19x20, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Timer"); + button_panel_add_icon(button_panel, 4, 109, &I_timer_text_23x5); button_panel_add_label(button_panel, 5, 11, FontPrimary, "Fan remote"); - button_panel_add_label(button_panel, 20, 63, FontSecondary, "Speed"); - button_panel_add_label(button_panel, 8, 23, FontSecondary, "Pwr"); - button_panel_add_label(button_panel, 40, 23, FontSecondary, "Mod"); + button_panel_add_icon(button_panel, 34, 68, &I_speed_text_30x30); view_set_orientation(view_stack_get_view(infrared->view_stack), ViewOrientationVertical); view_dispatcher_switch_to_view(infrared->view_dispatcher, InfraredViewStack); diff --git a/applications/main/infrared/scenes/infrared_scene_universal_projector.c b/applications/main/infrared/scenes/infrared_scene_universal_projector.c index 3db3f929f..9db51b70e 100644 --- a/applications/main/infrared/scenes/infrared_scene_universal_projector.c +++ b/applications/main/infrared/scenes/infrared_scene_universal_projector.c @@ -18,46 +18,49 @@ void infrared_scene_universal_projector_on_enter(void* context) { i, 0, 0, - 3, - 19, - &I_Power_25x27, - &I_Power_hvr_25x27, + 6, + 24, + &I_power_19x20, + &I_power_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 4, 46, &I_power_text_24x5); infrared_brute_force_add_record(brute_force, i++, "Power"); button_panel_add_item( button_panel, i, 1, 0, - 36, - 19, - &I_Mute_25x27, - &I_Mute_hvr_25x27, + 39, + 24, + &I_mute_19x20, + &I_mute_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 39, 46, &I_mute_text_19x5); infrared_brute_force_add_record(brute_force, i++, "Mute"); button_panel_add_item( button_panel, i, - 0, 1, - 3, - 64, - &I_Vol_up_25x27, - &I_Vol_up_hvr_25x27, + 1, + 37, + 55, + &I_volup_24x21, + &I_volup_hover_24x21, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Vol_up"); + button_panel_add_item( button_panel, i, 1, - 1, - 36, - 64, - &I_Vol_down_25x27, - &I_Vol_down_hvr_25x27, + 2, + 37, + 89, + &I_voldown_24x21, + &I_voldown_hover_24x21, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Vol_dn"); @@ -65,29 +68,31 @@ void infrared_scene_universal_projector_on_enter(void* context) { button_panel, i, 0, - 2, - 3, - 101, - &I_Play_25x27, - &I_Play_hvr_25x27, + 1, + 6, + 58, + &I_play_19x20, + &I_play_hover_19x20, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Play"); + button_panel_add_icon(button_panel, 6, 80, &I_play_text_19x5); button_panel_add_item( button_panel, i, - 1, + 0, 2, - 36, - 101, - &I_Pause_25x27, - &I_Pause_hvr_25x27, + 6, + 87, + &I_pause_19x20, + &I_pause_hover_19x20, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Pause"); + button_panel_add_icon(button_panel, 4, 109, &I_pause_text_23x5); - button_panel_add_label(button_panel, 10, 11, FontPrimary, "Projector"); - button_panel_add_label(button_panel, 17, 60, FontSecondary, "Volume"); + button_panel_add_label(button_panel, 3, 11, FontPrimary, "Proj. remote"); + button_panel_add_icon(button_panel, 34, 68, &I_vol_ac_text_30x30); view_set_orientation(view_stack_get_view(infrared->view_stack), ViewOrientationVertical); view_dispatcher_switch_to_view(infrared->view_dispatcher, InfraredViewStack); diff --git a/applications/main/infrared/scenes/infrared_scene_universal_tv.c b/applications/main/infrared/scenes/infrared_scene_universal_tv.c index e21bf8f90..f2958d887 100644 --- a/applications/main/infrared/scenes/infrared_scene_universal_tv.c +++ b/applications/main/infrared/scenes/infrared_scene_universal_tv.c @@ -18,77 +18,82 @@ void infrared_scene_universal_tv_on_enter(void* context) { i, 0, 0, - 3, - 19, - &I_Power_25x27, - &I_Power_hvr_25x27, + 6, + 16, + &I_power_19x20, + &I_power_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 4, 38, &I_power_text_24x5); infrared_brute_force_add_record(brute_force, i++, "Power"); button_panel_add_item( button_panel, i, 1, 0, - 36, - 19, - &I_Mute_25x27, - &I_Mute_hvr_25x27, + 39, + 16, + &I_mute_19x20, + &I_mute_hover_19x20, infrared_scene_universal_common_item_callback, context); + button_panel_add_icon(button_panel, 39, 38, &I_mute_text_19x5); + + button_panel_add_icon(button_panel, 0, 66, &I_ch_text_31x34); + button_panel_add_icon(button_panel, 35, 66, &I_vol_tv_text_29x34); + infrared_brute_force_add_record(brute_force, i++, "Mute"); + button_panel_add_item( + button_panel, + i, + 1, + 1, + 38, + 53, + &I_volup_24x21, + &I_volup_hover_24x21, + infrared_scene_universal_common_item_callback, + context); + + infrared_brute_force_add_record(brute_force, i++, "Vol_up"); button_panel_add_item( button_panel, i, 0, 1, 3, - 66, - &I_Vol_up_25x27, - &I_Vol_up_hvr_25x27, - infrared_scene_universal_common_item_callback, - context); - infrared_brute_force_add_record(brute_force, i++, "Vol_up"); - button_panel_add_item( - button_panel, - i, - 1, - 1, - 36, - 66, - &I_Up_25x27, - &I_Up_hvr_25x27, + 53, + &I_ch_up_24x21, + &I_ch_up_hover_24x21, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Ch_next"); button_panel_add_item( button_panel, i, - 0, + 1, 2, - 3, - 98, - &I_Vol_down_25x27, - &I_Vol_down_hvr_25x27, + 38, + 91, + &I_voldown_24x21, + &I_voldown_hover_24x21, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Vol_dn"); button_panel_add_item( button_panel, i, - 1, + 0, 2, - 36, - 98, - &I_Down_25x27, - &I_Down_hvr_25x27, + 3, + 91, + &I_ch_down_24x21, + &I_ch_down_hover_24x21, infrared_scene_universal_common_item_callback, context); infrared_brute_force_add_record(brute_force, i++, "Ch_prev"); - button_panel_add_label(button_panel, 6, 11, FontPrimary, "TV remote"); - button_panel_add_label(button_panel, 9, 64, FontSecondary, "Vol"); - button_panel_add_label(button_panel, 43, 64, FontSecondary, "Ch"); + button_panel_add_label(button_panel, 5, 10, FontPrimary, "TV remote"); view_set_orientation(view_stack_get_view(infrared->view_stack), ViewOrientationVertical); view_dispatcher_switch_to_view(infrared->view_dispatcher, InfraredViewStack); diff --git a/applications/services/gui/modules/button_panel.c b/applications/services/gui/modules/button_panel.c index 7421650f3..a6900dee3 100644 --- a/applications/services/gui/modules/button_panel.c +++ b/applications/services/gui/modules/button_panel.c @@ -29,6 +29,9 @@ typedef struct { const Icon* name_selected; } IconElement; +LIST_DEF(IconList, IconElement, M_POD_OPLIST) +#define M_OPL_IconList_t() LIST_OPLIST(IconList) + typedef struct ButtonItem { uint32_t index; ButtonItemCallback callback; @@ -47,6 +50,7 @@ struct ButtonPanel { typedef struct { ButtonMatrix_t button_matrix; + IconList_t icons; LabelList_t labels; uint16_t reserve_x; uint16_t reserve_y; @@ -157,6 +161,7 @@ void button_panel_reset(ButtonPanel* button_panel) { model->selected_item_x = 0; model->selected_item_y = 0; LabelList_reset(model->labels); + IconList_reset(model->icons); ButtonMatrix_reset(model->button_matrix); }, true); @@ -219,9 +224,17 @@ static void button_panel_view_draw_callback(Canvas* canvas, void* _model) { canvas_clear(canvas); canvas_set_color(canvas, ColorBlack); + for + M_EACH(icon, model->icons, IconList_t) { + canvas_draw_icon(canvas, icon->x, icon->y, icon->name); + } + for(size_t x = 0; x < model->reserve_x; ++x) { for(size_t y = 0; y < model->reserve_y; ++y) { ButtonItem* button_item = *button_panel_get_item(model, x, y); + if(!button_item) { + continue; + } const Icon* icon_name = button_item->icon.name; if((model->selected_item_x == x) && (model->selected_item_y == y)) { icon_name = button_item->icon.name_selected; @@ -417,3 +430,24 @@ void button_panel_add_label( }, true); } + +// Draw an icon but don't make it a button. +void button_panel_add_icon( + ButtonPanel* button_panel, + uint16_t x, + uint16_t y, + const Icon* icon_name) { + furi_assert(button_panel); + + with_view_model( //-V773 + button_panel->view, + ButtonPanelModel * model, + { + IconElement* icon = IconList_push_raw(model->icons); + icon->x = x; + icon->y = y; + icon->name = icon_name; + icon->name_selected = icon_name; + }, + true); +} \ No newline at end of file diff --git a/applications/services/gui/modules/button_panel.h b/applications/services/gui/modules/button_panel.h index 4733b4695..daba51d3e 100644 --- a/applications/services/gui/modules/button_panel.h +++ b/applications/services/gui/modules/button_panel.h @@ -106,6 +106,19 @@ void button_panel_add_label( Font font, const char* label_str); +/** Add a non-button icon to button_panel module. + * + * @param button_panel ButtonPanel instance + * @param x x-coordinate to place icon + * @param y y-coordinate to place icon + * @param icon_name name of the icon to draw + */ +void button_panel_add_icon( + ButtonPanel* button_panel, + uint16_t x, + uint16_t y, + const Icon* icon_name); + #ifdef __cplusplus } #endif diff --git a/assets/icons/Infrared/CoolHi_25x27.png b/assets/icons/Infrared/CoolHi_25x27.png deleted file mode 100644 index cea29a5b9..000000000 Binary files a/assets/icons/Infrared/CoolHi_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/CoolHi_hvr_25x27.png b/assets/icons/Infrared/CoolHi_hvr_25x27.png deleted file mode 100644 index 692ac7b8b..000000000 Binary files a/assets/icons/Infrared/CoolHi_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/CoolLo_25x27.png b/assets/icons/Infrared/CoolLo_25x27.png deleted file mode 100644 index 23288e44f..000000000 Binary files a/assets/icons/Infrared/CoolLo_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/CoolLo_hvr_25x27.png b/assets/icons/Infrared/CoolLo_hvr_25x27.png deleted file mode 100644 index ae5316e4d..000000000 Binary files a/assets/icons/Infrared/CoolLo_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Dehumidify_25x27.png b/assets/icons/Infrared/Dehumidify_25x27.png deleted file mode 100644 index dca77ae41..000000000 Binary files a/assets/icons/Infrared/Dehumidify_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Dehumidify_hvr_25x27.png b/assets/icons/Infrared/Dehumidify_hvr_25x27.png deleted file mode 100644 index 2c593ca8d..000000000 Binary files a/assets/icons/Infrared/Dehumidify_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/HeatHi_25x27.png b/assets/icons/Infrared/HeatHi_25x27.png deleted file mode 100644 index a1724f995..000000000 Binary files a/assets/icons/Infrared/HeatHi_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/HeatHi_hvr_25x27.png b/assets/icons/Infrared/HeatHi_hvr_25x27.png deleted file mode 100644 index b92108d68..000000000 Binary files a/assets/icons/Infrared/HeatHi_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/HeatLo_25x27.png b/assets/icons/Infrared/HeatLo_25x27.png deleted file mode 100644 index af2e59d49..000000000 Binary files a/assets/icons/Infrared/HeatLo_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/HeatLo_hvr_25x27.png b/assets/icons/Infrared/HeatLo_hvr_25x27.png deleted file mode 100644 index 6708edb36..000000000 Binary files a/assets/icons/Infrared/HeatLo_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Mode_25x27.png b/assets/icons/Infrared/Mode_25x27.png deleted file mode 100644 index 381ba8296..000000000 Binary files a/assets/icons/Infrared/Mode_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Mode_hvr_25x27.png b/assets/icons/Infrared/Mode_hvr_25x27.png deleted file mode 100644 index 64f459f55..000000000 Binary files a/assets/icons/Infrared/Mode_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Mute_25x27.png b/assets/icons/Infrared/Mute_25x27.png deleted file mode 100644 index d8812dd4f..000000000 Binary files a/assets/icons/Infrared/Mute_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Mute_hvr_25x27.png b/assets/icons/Infrared/Mute_hvr_25x27.png deleted file mode 100644 index 155bd9004..000000000 Binary files a/assets/icons/Infrared/Mute_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Off_25x27.png b/assets/icons/Infrared/Off_25x27.png deleted file mode 100644 index c15100606..000000000 Binary files a/assets/icons/Infrared/Off_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Off_hvr_25x27.png b/assets/icons/Infrared/Off_hvr_25x27.png deleted file mode 100644 index d5e5e6f45..000000000 Binary files a/assets/icons/Infrared/Off_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Pause_25x27.png b/assets/icons/Infrared/Pause_25x27.png deleted file mode 100644 index a371ba817..000000000 Binary files a/assets/icons/Infrared/Pause_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Pause_hvr_25x27.png b/assets/icons/Infrared/Pause_hvr_25x27.png deleted file mode 100644 index 472d583db..000000000 Binary files a/assets/icons/Infrared/Pause_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Play_25x27.png b/assets/icons/Infrared/Play_25x27.png deleted file mode 100644 index fb793c5a9..000000000 Binary files a/assets/icons/Infrared/Play_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Play_hvr_25x27.png b/assets/icons/Infrared/Play_hvr_25x27.png deleted file mode 100644 index 6708dcdbf..000000000 Binary files a/assets/icons/Infrared/Play_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Power_25x27.png b/assets/icons/Infrared/Power_25x27.png deleted file mode 100644 index 5ae493fbe..000000000 Binary files a/assets/icons/Infrared/Power_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Power_hvr_25x27.png b/assets/icons/Infrared/Power_hvr_25x27.png deleted file mode 100644 index 9425072c0..000000000 Binary files a/assets/icons/Infrared/Power_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Rotate_25x27.png b/assets/icons/Infrared/Rotate_25x27.png deleted file mode 100644 index 648634a09..000000000 Binary files a/assets/icons/Infrared/Rotate_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Rotate_hvr_25x27.png b/assets/icons/Infrared/Rotate_hvr_25x27.png deleted file mode 100644 index a2b5cf93d..000000000 Binary files a/assets/icons/Infrared/Rotate_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Timer_25x27.png b/assets/icons/Infrared/Timer_25x27.png deleted file mode 100644 index 2f1853a34..000000000 Binary files a/assets/icons/Infrared/Timer_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Timer_hvr_25x27.png b/assets/icons/Infrared/Timer_hvr_25x27.png deleted file mode 100644 index d4dffa544..000000000 Binary files a/assets/icons/Infrared/Timer_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/TrackNext_25x27.png b/assets/icons/Infrared/TrackNext_25x27.png deleted file mode 100644 index 7b8f28391..000000000 Binary files a/assets/icons/Infrared/TrackNext_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/TrackNext_hvr_25x27.png b/assets/icons/Infrared/TrackNext_hvr_25x27.png deleted file mode 100644 index a4de4fc3c..000000000 Binary files a/assets/icons/Infrared/TrackNext_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/TrackPrev_25x27.png b/assets/icons/Infrared/TrackPrev_25x27.png deleted file mode 100644 index 3cd2a8da6..000000000 Binary files a/assets/icons/Infrared/TrackPrev_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/TrackPrev_hvr_25x27.png b/assets/icons/Infrared/TrackPrev_hvr_25x27.png deleted file mode 100644 index 838055341..000000000 Binary files a/assets/icons/Infrared/TrackPrev_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Up_25x27.png b/assets/icons/Infrared/Up_25x27.png deleted file mode 100644 index b81a02e8a..000000000 Binary files a/assets/icons/Infrared/Up_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/Up_hvr_25x27.png b/assets/icons/Infrared/Up_hvr_25x27.png deleted file mode 100644 index cf71e5965..000000000 Binary files a/assets/icons/Infrared/Up_hvr_25x27.png and /dev/null differ diff --git a/assets/icons/Infrared/celsius_24x23.png b/assets/icons/Infrared/celsius_24x23.png new file mode 100644 index 000000000..64d7a1db1 Binary files /dev/null and b/assets/icons/Infrared/celsius_24x23.png differ diff --git a/assets/icons/Infrared/celsius_hover_24x23.png b/assets/icons/Infrared/celsius_hover_24x23.png new file mode 100644 index 000000000..0488b40f5 Binary files /dev/null and b/assets/icons/Infrared/celsius_hover_24x23.png differ diff --git a/assets/icons/Infrared/Vol_up_hvr_25x27.png b/assets/icons/Infrared/ch_down_24x21.png similarity index 70% rename from assets/icons/Infrared/Vol_up_hvr_25x27.png rename to assets/icons/Infrared/ch_down_24x21.png index 90c2df47d..8c3f81c3d 100644 Binary files a/assets/icons/Infrared/Vol_up_hvr_25x27.png and b/assets/icons/Infrared/ch_down_24x21.png differ diff --git a/assets/icons/Infrared/Vol_down_25x27.png b/assets/icons/Infrared/ch_down_hover_24x21.png similarity index 70% rename from assets/icons/Infrared/Vol_down_25x27.png rename to assets/icons/Infrared/ch_down_hover_24x21.png index d7ae44558..9b840f9ce 100644 Binary files a/assets/icons/Infrared/Vol_down_25x27.png and b/assets/icons/Infrared/ch_down_hover_24x21.png differ diff --git a/assets/icons/Infrared/Vol_up_25x27.png b/assets/icons/Infrared/ch_text_31x34.png similarity index 70% rename from assets/icons/Infrared/Vol_up_25x27.png rename to assets/icons/Infrared/ch_text_31x34.png index c4d9e87a0..30e0f584c 100644 Binary files a/assets/icons/Infrared/Vol_up_25x27.png and b/assets/icons/Infrared/ch_text_31x34.png differ diff --git a/assets/icons/Infrared/ch_up_24x21.png b/assets/icons/Infrared/ch_up_24x21.png new file mode 100644 index 000000000..fa4074d12 Binary files /dev/null and b/assets/icons/Infrared/ch_up_24x21.png differ diff --git a/assets/icons/Infrared/ch_up_hover_24x21.png b/assets/icons/Infrared/ch_up_hover_24x21.png new file mode 100644 index 000000000..944a973f4 Binary files /dev/null and b/assets/icons/Infrared/ch_up_hover_24x21.png differ diff --git a/assets/icons/Infrared/Down_25x27.png b/assets/icons/Infrared/cool_30x51.png similarity index 73% rename from assets/icons/Infrared/Down_25x27.png rename to assets/icons/Infrared/cool_30x51.png index c13097778..38a8014bd 100644 Binary files a/assets/icons/Infrared/Down_25x27.png and b/assets/icons/Infrared/cool_30x51.png differ diff --git a/assets/icons/Infrared/dry_19x20.png b/assets/icons/Infrared/dry_19x20.png new file mode 100644 index 000000000..c689c0675 Binary files /dev/null and b/assets/icons/Infrared/dry_19x20.png differ diff --git a/assets/icons/Infrared/dry_hover_19x20.png b/assets/icons/Infrared/dry_hover_19x20.png new file mode 100644 index 000000000..5b7196ae2 Binary files /dev/null and b/assets/icons/Infrared/dry_hover_19x20.png differ diff --git a/assets/icons/Infrared/dry_text_15x5.png b/assets/icons/Infrared/dry_text_15x5.png new file mode 100644 index 000000000..7696e1fc8 Binary files /dev/null and b/assets/icons/Infrared/dry_text_15x5.png differ diff --git a/assets/icons/Infrared/fahren_24x23.png b/assets/icons/Infrared/fahren_24x23.png new file mode 100644 index 000000000..d6f55e806 Binary files /dev/null and b/assets/icons/Infrared/fahren_24x23.png differ diff --git a/assets/icons/Infrared/fahren_hover_24x23.png b/assets/icons/Infrared/fahren_hover_24x23.png new file mode 100644 index 000000000..db922c557 Binary files /dev/null and b/assets/icons/Infrared/fahren_hover_24x23.png differ diff --git a/assets/icons/Infrared/Down_hvr_25x27.png b/assets/icons/Infrared/heat_30x51.png similarity index 73% rename from assets/icons/Infrared/Down_hvr_25x27.png rename to assets/icons/Infrared/heat_30x51.png index 76d181924..aca27c7c8 100644 Binary files a/assets/icons/Infrared/Down_hvr_25x27.png and b/assets/icons/Infrared/heat_30x51.png differ diff --git a/assets/icons/Infrared/hourglass0_24x24.png b/assets/icons/Infrared/hourglass0_24x24.png new file mode 100644 index 000000000..a382d84e2 Binary files /dev/null and b/assets/icons/Infrared/hourglass0_24x24.png differ diff --git a/assets/icons/Infrared/hourglass1_24x24.png b/assets/icons/Infrared/hourglass1_24x24.png new file mode 100644 index 000000000..b4cc7b462 Binary files /dev/null and b/assets/icons/Infrared/hourglass1_24x24.png differ diff --git a/assets/icons/Infrared/hourglass2_24x24.png b/assets/icons/Infrared/hourglass2_24x24.png new file mode 100644 index 000000000..d2c3709f7 Binary files /dev/null and b/assets/icons/Infrared/hourglass2_24x24.png differ diff --git a/assets/icons/Infrared/hourglass3_24x24.png b/assets/icons/Infrared/hourglass3_24x24.png new file mode 100644 index 000000000..e7be1e995 Binary files /dev/null and b/assets/icons/Infrared/hourglass3_24x24.png differ diff --git a/assets/icons/Infrared/hourglass4_24x24.png b/assets/icons/Infrared/hourglass4_24x24.png new file mode 100644 index 000000000..49eee2f53 Binary files /dev/null and b/assets/icons/Infrared/hourglass4_24x24.png differ diff --git a/assets/icons/Infrared/hourglass5_24x24.png b/assets/icons/Infrared/hourglass5_24x24.png new file mode 100644 index 000000000..90e1d4b4e Binary files /dev/null and b/assets/icons/Infrared/hourglass5_24x24.png differ diff --git a/assets/icons/Infrared/hourglass6_24x24.png b/assets/icons/Infrared/hourglass6_24x24.png new file mode 100644 index 000000000..e68c744f0 Binary files /dev/null and b/assets/icons/Infrared/hourglass6_24x24.png differ diff --git a/assets/icons/Infrared/max_24x23.png b/assets/icons/Infrared/max_24x23.png new file mode 100644 index 000000000..d4163a65f Binary files /dev/null and b/assets/icons/Infrared/max_24x23.png differ diff --git a/assets/icons/Infrared/max_hover_24x23.png b/assets/icons/Infrared/max_hover_24x23.png new file mode 100644 index 000000000..65f97b0ce Binary files /dev/null and b/assets/icons/Infrared/max_hover_24x23.png differ diff --git a/assets/icons/Infrared/mode_19x20.png b/assets/icons/Infrared/mode_19x20.png new file mode 100644 index 000000000..fa0a946b6 Binary files /dev/null and b/assets/icons/Infrared/mode_19x20.png differ diff --git a/assets/icons/Infrared/mode_hover_19x20.png b/assets/icons/Infrared/mode_hover_19x20.png new file mode 100644 index 000000000..92ada65be Binary files /dev/null and b/assets/icons/Infrared/mode_hover_19x20.png differ diff --git a/assets/icons/Infrared/mode_text_20x5.png b/assets/icons/Infrared/mode_text_20x5.png new file mode 100644 index 000000000..2c8457d6f Binary files /dev/null and b/assets/icons/Infrared/mode_text_20x5.png differ diff --git a/assets/icons/Infrared/mute_19x20.png b/assets/icons/Infrared/mute_19x20.png new file mode 100644 index 000000000..410e88ac2 Binary files /dev/null and b/assets/icons/Infrared/mute_19x20.png differ diff --git a/assets/icons/Infrared/mute_hover_19x20.png b/assets/icons/Infrared/mute_hover_19x20.png new file mode 100644 index 000000000..e9a5b3510 Binary files /dev/null and b/assets/icons/Infrared/mute_hover_19x20.png differ diff --git a/assets/icons/Infrared/mute_text_19x5.png b/assets/icons/Infrared/mute_text_19x5.png new file mode 100644 index 000000000..fa2d042a6 Binary files /dev/null and b/assets/icons/Infrared/mute_text_19x5.png differ diff --git a/assets/icons/Infrared/next_19x20.png b/assets/icons/Infrared/next_19x20.png new file mode 100644 index 000000000..512b68745 Binary files /dev/null and b/assets/icons/Infrared/next_19x20.png differ diff --git a/assets/icons/Infrared/next_hover_19x20.png b/assets/icons/Infrared/next_hover_19x20.png new file mode 100644 index 000000000..c84bfdb90 Binary files /dev/null and b/assets/icons/Infrared/next_hover_19x20.png differ diff --git a/assets/icons/Infrared/next_text_19x6.png b/assets/icons/Infrared/next_text_19x6.png new file mode 100644 index 000000000..74d53171f Binary files /dev/null and b/assets/icons/Infrared/next_text_19x6.png differ diff --git a/assets/icons/Infrared/pause_19x20.png b/assets/icons/Infrared/pause_19x20.png new file mode 100644 index 000000000..99196d23b Binary files /dev/null and b/assets/icons/Infrared/pause_19x20.png differ diff --git a/assets/icons/Infrared/pause_hover_19x20.png b/assets/icons/Infrared/pause_hover_19x20.png new file mode 100644 index 000000000..33e7d8eb2 Binary files /dev/null and b/assets/icons/Infrared/pause_hover_19x20.png differ diff --git a/assets/icons/Infrared/pause_text_23x5.png b/assets/icons/Infrared/pause_text_23x5.png new file mode 100644 index 000000000..72c7b0403 Binary files /dev/null and b/assets/icons/Infrared/pause_text_23x5.png differ diff --git a/assets/icons/Infrared/play_19x20.png b/assets/icons/Infrared/play_19x20.png new file mode 100644 index 000000000..880e977d2 Binary files /dev/null and b/assets/icons/Infrared/play_19x20.png differ diff --git a/assets/icons/Infrared/Vol_down_hvr_25x27.png b/assets/icons/Infrared/play_hover_19x20.png similarity index 70% rename from assets/icons/Infrared/Vol_down_hvr_25x27.png rename to assets/icons/Infrared/play_hover_19x20.png index c556a037a..4c837a144 100644 Binary files a/assets/icons/Infrared/Vol_down_hvr_25x27.png and b/assets/icons/Infrared/play_hover_19x20.png differ diff --git a/assets/icons/Infrared/play_text_19x5.png b/assets/icons/Infrared/play_text_19x5.png new file mode 100644 index 000000000..c5f067bcf Binary files /dev/null and b/assets/icons/Infrared/play_text_19x5.png differ diff --git a/assets/icons/Infrared/power_19x20.png b/assets/icons/Infrared/power_19x20.png new file mode 100644 index 000000000..12b927973 Binary files /dev/null and b/assets/icons/Infrared/power_19x20.png differ diff --git a/assets/icons/Infrared/power_hover_19x20.png b/assets/icons/Infrared/power_hover_19x20.png new file mode 100644 index 000000000..3a41249ff Binary files /dev/null and b/assets/icons/Infrared/power_hover_19x20.png differ diff --git a/assets/icons/Infrared/power_text_24x5.png b/assets/icons/Infrared/power_text_24x5.png new file mode 100644 index 000000000..88fff8e33 Binary files /dev/null and b/assets/icons/Infrared/power_text_24x5.png differ diff --git a/assets/icons/Infrared/prev_19x20.png b/assets/icons/Infrared/prev_19x20.png new file mode 100644 index 000000000..8d17cec57 Binary files /dev/null and b/assets/icons/Infrared/prev_19x20.png differ diff --git a/assets/icons/Infrared/prev_hover_19x20.png b/assets/icons/Infrared/prev_hover_19x20.png new file mode 100644 index 000000000..be9dce700 Binary files /dev/null and b/assets/icons/Infrared/prev_hover_19x20.png differ diff --git a/assets/icons/Infrared/prev_text_19x5.png b/assets/icons/Infrared/prev_text_19x5.png new file mode 100644 index 000000000..473b89745 Binary files /dev/null and b/assets/icons/Infrared/prev_text_19x5.png differ diff --git a/assets/icons/Infrared/rotate_19x20.png b/assets/icons/Infrared/rotate_19x20.png new file mode 100644 index 000000000..21f36da52 Binary files /dev/null and b/assets/icons/Infrared/rotate_19x20.png differ diff --git a/assets/icons/Infrared/rotate_hover_19x20.png b/assets/icons/Infrared/rotate_hover_19x20.png new file mode 100644 index 000000000..581e90987 Binary files /dev/null and b/assets/icons/Infrared/rotate_hover_19x20.png differ diff --git a/assets/icons/Infrared/rotate_text_24x5.png b/assets/icons/Infrared/rotate_text_24x5.png new file mode 100644 index 000000000..851eac339 Binary files /dev/null and b/assets/icons/Infrared/rotate_text_24x5.png differ diff --git a/assets/icons/Infrared/speed_text_30x30.png b/assets/icons/Infrared/speed_text_30x30.png new file mode 100644 index 000000000..c09eb1ab7 Binary files /dev/null and b/assets/icons/Infrared/speed_text_30x30.png differ diff --git a/assets/icons/Infrared/timer_19x20.png b/assets/icons/Infrared/timer_19x20.png new file mode 100644 index 000000000..3938d4bf1 Binary files /dev/null and b/assets/icons/Infrared/timer_19x20.png differ diff --git a/assets/icons/Infrared/timer_hover_19x20.png b/assets/icons/Infrared/timer_hover_19x20.png new file mode 100644 index 000000000..930a53ae4 Binary files /dev/null and b/assets/icons/Infrared/timer_hover_19x20.png differ diff --git a/assets/icons/Infrared/timer_text_23x5.png b/assets/icons/Infrared/timer_text_23x5.png new file mode 100644 index 000000000..ad2229f73 Binary files /dev/null and b/assets/icons/Infrared/timer_text_23x5.png differ diff --git a/assets/icons/Infrared/vol_ac_text_30x30.png b/assets/icons/Infrared/vol_ac_text_30x30.png new file mode 100644 index 000000000..068266d62 Binary files /dev/null and b/assets/icons/Infrared/vol_ac_text_30x30.png differ diff --git a/assets/icons/Infrared/vol_tv_text_29x34.png b/assets/icons/Infrared/vol_tv_text_29x34.png new file mode 100644 index 000000000..caef54c25 Binary files /dev/null and b/assets/icons/Infrared/vol_tv_text_29x34.png differ diff --git a/assets/icons/Infrared/voldown_24x21.png b/assets/icons/Infrared/voldown_24x21.png new file mode 100644 index 000000000..a80c59594 Binary files /dev/null and b/assets/icons/Infrared/voldown_24x21.png differ diff --git a/assets/icons/Infrared/voldown_hover_24x21.png b/assets/icons/Infrared/voldown_hover_24x21.png new file mode 100644 index 000000000..6bc57c70e Binary files /dev/null and b/assets/icons/Infrared/voldown_hover_24x21.png differ diff --git a/assets/icons/Infrared/volup_24x21.png b/assets/icons/Infrared/volup_24x21.png new file mode 100644 index 000000000..688552751 Binary files /dev/null and b/assets/icons/Infrared/volup_24x21.png differ diff --git a/assets/icons/Infrared/volup_hover_24x21.png b/assets/icons/Infrared/volup_hover_24x21.png new file mode 100644 index 000000000..5d790e796 Binary files /dev/null and b/assets/icons/Infrared/volup_hover_24x21.png differ diff --git a/firmware/targets/f18/api_symbols.csv b/firmware/targets/f18/api_symbols.csv index 9b99c9d5b..c09162e55 100644 --- a/firmware/targets/f18/api_symbols.csv +++ b/firmware/targets/f18/api_symbols.csv @@ -1,5 +1,5 @@ entry,status,name,type,params -Version,+,35.0,, +Version,+,35.1,, Header,+,applications/services/bt/bt_service/bt.h,, Header,+,applications/services/cli/cli.h,, Header,+,applications/services/cli/cli_vcp.h,, @@ -556,6 +556,7 @@ Function,+,button_menu_get_view,View*,ButtonMenu* Function,+,button_menu_reset,void,ButtonMenu* Function,+,button_menu_set_header,void,"ButtonMenu*, const char*" Function,+,button_menu_set_selected_item,void,"ButtonMenu*, uint32_t" +Function,+,button_panel_add_icon,void,"ButtonPanel*, uint16_t, uint16_t, const Icon*" Function,+,button_panel_add_item,void,"ButtonPanel*, uint32_t, uint16_t, uint16_t, uint16_t, uint16_t, const Icon*, const Icon*, ButtonItemCallback, void*" Function,+,button_panel_add_label,void,"ButtonPanel*, uint16_t, uint16_t, Font, const char*" Function,+,button_panel_alloc,ButtonPanel*, diff --git a/firmware/targets/f7/api_symbols.csv b/firmware/targets/f7/api_symbols.csv index 124799971..847c76643 100644 --- a/firmware/targets/f7/api_symbols.csv +++ b/firmware/targets/f7/api_symbols.csv @@ -1,5 +1,5 @@ entry,status,name,type,params -Version,+,35.0,, +Version,+,35.1,, Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,, Header,+,applications/services/bt/bt_service/bt.h,, Header,+,applications/services/cli/cli.h,, @@ -629,6 +629,7 @@ Function,+,button_menu_get_view,View*,ButtonMenu* Function,+,button_menu_reset,void,ButtonMenu* Function,+,button_menu_set_header,void,"ButtonMenu*, const char*" Function,+,button_menu_set_selected_item,void,"ButtonMenu*, uint32_t" +Function,+,button_panel_add_icon,void,"ButtonPanel*, uint16_t, uint16_t, const Icon*" Function,+,button_panel_add_item,void,"ButtonPanel*, uint32_t, uint16_t, uint16_t, uint16_t, uint16_t, const Icon*, const Icon*, ButtonItemCallback, void*" Function,+,button_panel_add_label,void,"ButtonPanel*, uint16_t, uint16_t, Font, const char*" Function,+,button_panel_alloc,ButtonPanel*, diff --git a/lib/subghz/protocols/bin_raw.c b/lib/subghz/protocols/bin_raw.c index 9e68141b6..21f5e6187 100644 --- a/lib/subghz/protocols/bin_raw.c +++ b/lib/subghz/protocols/bin_raw.c @@ -744,7 +744,6 @@ static bool bin_raw_debug("\r\n\r\n"); #endif - //TODO FL-3557: can be optimized BinRAW_Markup markup_temp[BIN_RAW_MAX_MARKUP_COUNT]; memcpy( markup_temp, @@ -770,7 +769,6 @@ static bool } } } - //TODO FL-3557: can be optimized if(bin_raw_type == BinRAWTypeGap) { if(data_temp != 0) { //there are sequences with the same number of bits diff --git a/scripts/flipper/app.py b/scripts/flipper/app.py index 405c4c399..da43a1f11 100644 --- a/scripts/flipper/app.py +++ b/scripts/flipper/app.py @@ -15,10 +15,9 @@ class App: # Application specific initialization self.init() - def __call__(self, args=None, skip_logger_init=False): + def __call__(self, args=None): self.args, self.other_args = self.parser.parse_known_args(args=args) # configure log output - # if skip_logger_init: self.log_level = logging.DEBUG if self.args.debug else logging.INFO self.logger.setLevel(self.log_level) if not self.logger.hasHandlers(): diff --git a/scripts/fwflash.py b/scripts/fwflash.py index 2b1ad543b..c119aaf80 100755 --- a/scripts/fwflash.py +++ b/scripts/fwflash.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import logging import os +import re import socket import subprocess import time @@ -10,11 +11,12 @@ from dataclasses import dataclass, field from flipper.app import App - -# When adding an interface, also add it to SWD_TRANSPORT in fbt options +# When adding an interface, also add it to SWD_TRANSPORT in fbt/ufbt options class Programmer(ABC): + root_logger = logging.getLogger("Programmer") + @abstractmethod def flash(self, file_path: str, do_verify: bool) -> bool: pass @@ -31,6 +33,26 @@ class Programmer(ABC): def set_serial(self, serial: str): pass + @classmethod + def _spawn_and_await(cls, process_params, show_progress: bool = False): + cls.root_logger.debug(f"Launching: {' '.join(process_params)}") + + process = subprocess.Popen( + process_params, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + ) + + if show_progress: + while process.poll() is None: + time.sleep(0.25) + print(".", end="", flush=True) + print() + else: + process.wait() + + return process + @dataclass class OpenOCDInterface: @@ -43,7 +65,7 @@ class OpenOCDInterface: class OpenOCDProgrammer(Programmer): def __init__(self, interface: OpenOCDInterface): self.interface = interface - self.logger = logging.getLogger("OpenOCD") + self.logger = self.root_logger.getChild("OpenOCD") self.serial: typing.Optional[str] = None def _add_file(self, params: list[str], file: str): @@ -87,17 +109,7 @@ class OpenOCDProgrammer(Programmer): self.logger.debug(f"Launching: {openocd_launch_params_string}") - process = subprocess.Popen( - openocd_launch_params, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - ) - - while process.poll() is None: - time.sleep(0.25) - print(".", end="", flush=True) - print() - + process = self._spawn_and_await(openocd_launch_params, True) success = process.returncode == 0 if not success: @@ -108,35 +120,41 @@ class OpenOCDProgrammer(Programmer): return success def probe(self) -> bool: - i = self.interface - openocd_launch_params = ["openocd"] - self._add_file(openocd_launch_params, i.config_file) + self._add_file(openocd_launch_params, self.interface.config_file) if self.serial: self._add_serial(openocd_launch_params, self.serial) - if i.additional_args: - for a in i.additional_args: - self._add_command(openocd_launch_params, a) + for additional_arg in self.interface.additional_args: + self._add_command(openocd_launch_params, additional_arg) self._add_file(openocd_launch_params, "target/stm32wbx.cfg") self._add_command(openocd_launch_params, "init") self._add_command(openocd_launch_params, "exit") - self.logger.debug(f"Launching: {' '.join(openocd_launch_params)}") + process = self._spawn_and_await(openocd_launch_params) + success = process.returncode == 0 - process = subprocess.Popen( - openocd_launch_params, - stderr=subprocess.STDOUT, - stdout=subprocess.PIPE, - ) + output = process.stdout.read().decode("utf-8").strip() if process.stdout else "" + self.logger.debug(output) + # Find target voltage using regex + if match := re.search(r"Target voltage: (\d+\.\d+)", output): + voltage = float(match.group(1)) + if not success: + if voltage < 1: + self.logger.warning( + f"Found {self.get_name()}, but device is not connected" + ) + else: + self.logger.warning( + f"Device is connected, but {self.get_name()} failed to attach. Is System>Debug enabled?" + ) - # Wait for OpenOCD to end and get the return code - process.wait() - found = process.returncode == 0 + if "cannot read IDR" in output: + self.logger.warning( + f"Found {self.get_name()}, but failed to attach. Is device connected and is System>Debug enabled?" + ) + success = False - if process.stdout: - self.logger.debug(process.stdout.read().decode("utf-8").strip()) - - return found + return success def get_name(self) -> str: return self.interface.name @@ -218,7 +236,7 @@ class BlackmagicProgrammer(Programmer): ): self.port_resolver = port_resolver self.name = name - self.logger = logging.getLogger("BlackmagicUSB") + self.logger = self.root_logger.getChild(f"Blackmagic{name}") self.port: typing.Optional[str] = None def _add_command(self, params: list[str], command: str): @@ -240,6 +258,14 @@ class BlackmagicProgrammer(Programmer): else: self.port = serial + def _get_gdb_core_params(self) -> list[str]: + gdb_launch_params = ["arm-none-eabi-gdb"] + self._add_command(gdb_launch_params, f"target extended-remote {self.port}") + self._add_command(gdb_launch_params, "set pagination off") + self._add_command(gdb_launch_params, "set confirm off") + self._add_command(gdb_launch_params, "monitor swdp_scan") + return gdb_launch_params + def flash(self, file_path: str, do_verify: bool) -> bool: if not self.port: if not self.probe(): @@ -268,43 +294,25 @@ class BlackmagicProgrammer(Programmer): # -ex 'compare-sections' # -ex 'quit' - gdb_launch_params = ["arm-none-eabi-gdb", file_path] - self._add_command(gdb_launch_params, f"target extended-remote {self.port}") - self._add_command(gdb_launch_params, "set pagination off") - self._add_command(gdb_launch_params, "set confirm off") - self._add_command(gdb_launch_params, "monitor swdp_scan") + gdb_launch_params = self._get_gdb_core_params() self._add_command(gdb_launch_params, "attach 1") self._add_command(gdb_launch_params, "set mem inaccessible-by-default off") self._add_command(gdb_launch_params, "load") if do_verify: self._add_command(gdb_launch_params, "compare-sections") self._add_command(gdb_launch_params, "quit") + gdb_launch_params.append(file_path) - self.logger.debug(f"Launching: {' '.join(gdb_launch_params)}") - - process = subprocess.Popen( - gdb_launch_params, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - ) - - while process.poll() is None: - time.sleep(0.5) - print(".", end="", flush=True) - print() - + process = self._spawn_and_await(gdb_launch_params, True) if not process.stdout: return False output = process.stdout.read().decode("utf-8").strip() - flashed = "Loading section .text," in output - - # Check flash verification - if "MIS-MATCHED!" in output: - flashed = False - - if "target image does not match the loaded file" in output: - flashed = False + flashed = ( + "Loading section .text," in output + and "MIS-MATCHED!" not in output + and "target image does not match the loaded file" not in output + ) if not flashed: self.logger.error("Blackmagic failed to flash") @@ -317,6 +325,20 @@ class BlackmagicProgrammer(Programmer): return False self.port = port + + gdb_launch_params = self._get_gdb_core_params() + self._add_command(gdb_launch_params, "quit") + + process = self._spawn_and_await(gdb_launch_params) + if not process.stdout or process.returncode != 0: + return False + + output = process.stdout.read().decode("utf-8").strip() + if "SW-DP scan failed!" in output: + self.logger.warning( + f"Found {self.get_name()} at {self.port}, but failed to attach. Is device connected and is System>Debug enabled?" + ) + return False return True def get_name(self) -> str: @@ -358,6 +380,8 @@ class Main(App): AUTO_INTERFACE = "auto" def init(self): + Programmer.root_logger = self.logger + self.parser.add_argument( "filename", type=str, @@ -433,10 +457,10 @@ class Main(App): available_interfaces = self._search_interface(network_flash_interfaces) if not available_interfaces: - self.logger.error("No interface found") + self.logger.error("No availiable interfaces") return 1 elif len(available_interfaces) > 1: - self.logger.error("Multiple interfaces found: ") + self.logger.error("Multiple interfaces found:") self.logger.error( f"Please specify '--interface={[i.get_name() for i in available_interfaces]}'" ) @@ -446,11 +470,10 @@ class Main(App): if self.args.serial != self.AUTO_INTERFACE: interface.set_serial(self.args.serial) - self.logger.info( - f"Flashing {file_path} via {interface.get_name()} with {self.args.serial}" - ) + self.logger.info(f"Using {interface.get_name()} with {self.args.serial}") else: - self.logger.info(f"Flashing {file_path} via {interface.get_name()}") + self.logger.info(f"Using {interface.get_name()}") + self.logger.info(f"Flashing {file_path}") if not interface.flash(file_path, self.args.verify): self.logger.error(f"Failed to flash via {interface.get_name()}")