diff --git a/CHANGELOG.md b/CHANGELOG.md index c935b882f..d7b226155 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,7 +90,7 @@ - UL: Add support for Came Atomo TOP44RBN remotes (by @xMasterX & @mishamyte) - UL: Add IL-100 Smart support for Add manually (by @xMasterX) - UL: Add experimental counter overflow mode (OFEX), replicates how some key duplicators work, DO NOT USE if you don't know what you are doing, it will reset your counter value! (by @xMasterX) - - UL: Counter modes settings per-file for Keeloq, CAME Atomo, Nice Flor S, AlutechAT4N (by @xMasterX & @Dmitry422) + - UL: Counter modes settings per-file for Keeloq, CAME Atomo, Nice Flor S, AlutechAT4N and option to edit counter value (by @xMasterX & @Dmitry422) - UL: Add AN-Motors AT4 button on arrow keys (0xC) (by @xMasterX) - RFID: - Support writing Securakey, Jablotron and FDX-B to EM4305 cards (#434 by @jamisonderek) @@ -112,7 +112,9 @@ - Added `gui/popup` - Added `gui/vi_list` - Changed API for `gui/submenu`, see breaking changes above -- Desktop: Add Keybinds support for directories (#331 by @956MB & @WillyJL) +- Desktop: + - Add Keybinds support for directories (#331 by @956MB & @WillyJL) + - UL: Enable winter animations (by @xMasterX) - Input Settings: Add Vibro Trigger option (#429 by @956MB) - Archive: Support opening and favoriting Picopass files (by @WillyJL) - Bad KB: Colemak keyboard layout (#466 by @Ashe-Sterling) diff --git a/applications/main/subghz/scenes/subghz_scene_radio_settings.c b/applications/main/subghz/scenes/subghz_scene_radio_settings.c index 06f4769c7..995c2c096 100644 --- a/applications/main/subghz/scenes/subghz_scene_radio_settings.c +++ b/applications/main/subghz/scenes/subghz_scene_radio_settings.c @@ -65,7 +65,7 @@ const int32_t debug_counter_val[DEBUG_COUNTER_COUNT] = { 10, 50, 65535, - 65534, + -2147483647, 0, -1, -2, diff --git a/applications/main/subghz/scenes/subghz_scene_signal_settings.c b/applications/main/subghz/scenes/subghz_scene_signal_settings.c index 6c0b71acf..382289513 100644 --- a/applications/main/subghz/scenes/subghz_scene_signal_settings.c +++ b/applications/main/subghz/scenes/subghz_scene_signal_settings.c @@ -2,10 +2,19 @@ #include "subghz/types.h" #include "../helpers/subghz_custom_event.h" #include +#include +#include #define TAG "SubGhzSceneSignalSettings" static uint32_t counter_mode = 0xff; +static uint32_t loaded_counter32 = 0x0; +static uint32_t counter32 = 0x0; +static uint16_t counter16 = 0x0; +static uint8_t byte_count = 0; +static uint8_t* byte_ptr = NULL; +static uint8_t hex_char_lenght = 0; +static FuriString* byte_input_text; #define COUNTER_MODE_COUNT 7 static const char* const counter_mode_text[COUNTER_MODE_COUNT] = { @@ -43,17 +52,96 @@ static Protocols protocols[] = { #define PROTOCOLS_COUNT (sizeof(protocols) / sizeof(Protocols)); +// our special case function based on strint_to_uint32 from strint.c +StrintParseError strint_to_uint32_base16(const char* str, uint32_t* out, uint8_t* lenght) { + // skip whitespace + while(((*str >= '\t') && (*str <= '\r')) || *str == ' ') { + str++; + } + + // read digits + uint32_t limit = UINT32_MAX; + uint32_t mul_limit = limit / 16; + uint32_t result = 0; + int read_total = 0; + + while(*str != 0) { + int digit_value; + if(*str >= '0' && *str <= '9') { + digit_value = *str - '0'; + } else if(*str >= 'A' && *str <= 'Z') { + digit_value = *str - 'A' + 10; + } else if(*str >= 'a' && *str <= 'z') { + digit_value = *str - 'a' + 10; + } else { + break; + } + + if(digit_value >= 16) { + break; + } + + if(result > mul_limit) return StrintParseOverflowError; + result *= 16; + if(result > limit - digit_value) return StrintParseOverflowError; //-V658 + result += digit_value; + + read_total++; + str++; + } + + if(read_total == 0) { + result = 0; + *lenght = 0; + return StrintParseAbsentError; + } + + if(out) *out = result; + if(lenght) *lenght = read_total; + return StrintParseNoError; +} + void subghz_scene_signal_settings_counter_mode_changed(VariableItem* item) { uint8_t index = variable_item_get_current_value_index(item); variable_item_set_current_value_text(item, counter_mode_text[index]); counter_mode = counter_mode_value[index]; } -void subghz_scene_signal_settings_on_enter(void* context) { - // When we open saved file we do some check and fill up subghz->file_path. - // So now we use it to check is there CounterMode in file or not +void subghz_scene_signal_settings_byte_input_callback(void* context) { + SubGhz* subghz = context; + view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventByteInputDone); +} + +void subghz_scene_signal_settings_variable_item_list_enter_callback(void* context, uint32_t index) { SubGhz* subghz = context; + // when we click OK on "Edit counter" item + if(index == 1) { + furi_string_cat_printf(byte_input_text, "%i", hex_char_lenght * 4); + furi_string_cat_str(byte_input_text, "-bit counter in HEX"); + + // Setup byte_input view + ByteInput* byte_input = subghz->byte_input; + byte_input_set_header_text(byte_input, furi_string_get_cstr(byte_input_text)); + + byte_input_set_result_callback( + byte_input, + subghz_scene_signal_settings_byte_input_callback, + NULL, + subghz, + byte_ptr, + byte_count); + view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput); + } +} + +void subghz_scene_signal_settings_on_enter(void* context) { + SubGhz* subghz = context; + + // ### Counter mode section ### + + // When we open saved file we do some check and fill up subghz->file_path. + // So now we use it to check is there CounterMode in file or not const char* file_path = furi_string_get_cstr(subghz->file_path); furi_assert(subghz); @@ -98,6 +186,14 @@ void subghz_scene_signal_settings_on_enter(void* context) { int32_t value_index; VariableItem* item; + variable_item_list_set_selected_item(subghz->variable_item_list, 0); + variable_item_list_reset(subghz->variable_item_list); + + variable_item_list_set_enter_callback( + variable_item_list, + subghz_scene_signal_settings_variable_item_list_enter_callback, + subghz); + item = variable_item_list_add( variable_item_list, "Counter Mode", @@ -110,16 +206,175 @@ void subghz_scene_signal_settings_on_enter(void* context) { variable_item_set_current_value_text(item, counter_mode_text[value_index]); variable_item_set_locked(item, (counter_mode == 0xff), "Not available\nfor this\nprotocol !"); + // ### Counter edit section ### + FuriString* tmp_text = furi_string_alloc_set_str(""); + FuriString* textCnt = furi_string_alloc_set_str(""); + byte_input_text = furi_string_alloc_set_str("Enter "); + + bool counter_not_available = true; + SubGhzProtocolDecoderBase* decoder = subghz_txrx_get_decoder(subghz->txrx); + + // deserialaze and decode loaded sugbhz file and take information string from decoder + if(subghz_protocol_decoder_base_deserialize(decoder, subghz_txrx_get_fff_data(subghz->txrx)) == + SubGhzProtocolStatusOk) { + subghz_protocol_decoder_base_get_string(decoder, tmp_text); + } else { + FURI_LOG_E(TAG, "Cant deserialize this subghz file"); + } + + // In protocols output we allways have HEX format for "Cnt:" output (text formating like ...Cnt:%05lX\r\n") + // we take 8 simbols starting from "Cnt:........" + // at first we search "Cnt:????" that mean for this protocol counter cannot be decoded + + int8_t place = furi_string_search_str(tmp_text, "Cnt:??", 0); + if(place > 0) { + FURI_LOG_D(TAG, "Founded Cnt:???? - counter not available for this protocol"); + } else { + place = furi_string_search_str(tmp_text, "Cnt:", 0); + if(place > 0) { + furi_string_set_n(textCnt, tmp_text, place + 4, 8); + furi_string_trim(textCnt); + FURI_LOG_D( + TAG, + "Taked 8 bytes hex value starting after 'Cnt:' - %s", + furi_string_get_cstr(textCnt)); + + // trim and convert 8 simbols string to uint32 by base 16 (hex); + // later we use loaded_counter in subghz_scene_signal_settings_on_event to check is there 0 or not - special case + + if(strint_to_uint32_base16( + furi_string_get_cstr(textCnt), &loaded_counter32, &hex_char_lenght) == + StrintParseNoError) { + counter_not_available = false; + + // calculate and roundup number of hex bytes do display counter in byte_input (every 2 hex simbols = 1 byte for view) + // later must be used in byte_input to restrict number of available byte to edit + // cnt_byte_count = (hex_char_lenght + 1) / 2; + + FURI_LOG_D( + TAG, + "Result of conversion from String to uint_32 DEC %li, HEX %lX, HEX lenght %i symbols", + loaded_counter32, + loaded_counter32, + hex_char_lenght); + + // Check is there byte_count more than 2 hex bytes long (16 bit) or not (32bit) + // To show hex value we must correct revert bytes for ByteInput view + if(hex_char_lenght > 4) { + counter32 = loaded_counter32; + furi_string_printf(tmp_text, "%lX", counter32); + counter32 = __bswap32(counter32); + byte_ptr = (uint8_t*)&counter32; + byte_count = 4; + } else { + counter16 = loaded_counter32; + furi_string_printf(tmp_text, "%X", counter16); + counter16 = __bswap16(counter16); + byte_ptr = (uint8_t*)&counter16; + byte_count = 2; + } + } else { + FURI_LOG_E(TAG, "Cant convert text counter value"); + }; + + } else { + FURI_LOG_D(TAG, "Counter not available for this protocol"); + } + } + + furi_assert(byte_ptr); + furi_assert(byte_count > 0); + + item = variable_item_list_add(variable_item_list, "Edit Counter", 1, NULL, subghz); + variable_item_set_current_value_index(item, 0); + variable_item_set_current_value_text(item, furi_string_get_cstr(tmp_text)); + variable_item_set_locked(item, (counter_not_available), "Not available\nfor this\nprotocol !"); + + furi_string_free(tmp_text); + furi_string_free(textCnt); + view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdVariableItemList); } bool subghz_scene_signal_settings_on_event(void* context, SceneManagerEvent event) { SubGhz* subghz = context; - if(event.type == SceneManagerEventTypeBack) { - scene_manager_previous_scene(subghz->scene_manager); - return true; - } else - return false; + int32_t tmp_counter = 0; + + if(event.type == SceneManagerEventTypeCustom) { + if(event.event == SubGhzCustomEventByteInputDone) { + switch(byte_count) { + case 2: + // when signal has Cnt:00 we can step only to 0000+FFFF = FFFF, but we need 0000 for next step + // for this case we must use +1 additional step to increace Cnt from FFFF to 0000. + + // save current user definded counter increase value (mult) + tmp_counter = furi_hal_subghz_get_rolling_counter_mult(); + + // increase signal counter to max value - at result it must be 0000 in most cases + // but can be FFFF in case Cnt:0000 (for this we have +1 additional step below) + furi_hal_subghz_set_rolling_counter_mult(0xFFFF); + subghz_tx_start(subghz, subghz_txrx_get_fff_data(subghz->txrx)); + subghz_txrx_stop(subghz->txrx); + + // if file Cnt:00 then do +1 additional step + if(loaded_counter32 == 0) { + furi_hal_subghz_set_rolling_counter_mult(1); + subghz_tx_start(subghz, subghz_txrx_get_fff_data(subghz->txrx)); + subghz_txrx_stop(subghz->txrx); + } + + // at this point we must have signal Cnt:00 + // convert back after byte_input and do one send with our new mult (counter16) - at end we must have signal Cnt = counter16 + counter16 = __bswap16(counter16); + + if(counter16 > 0) { + furi_hal_subghz_set_rolling_counter_mult(counter16); + subghz_tx_start(subghz, subghz_txrx_get_fff_data(subghz->txrx)); + subghz_txrx_stop(subghz->txrx); + } + + // restore user definded counter increase value (mult) + furi_hal_subghz_set_rolling_counter_mult(tmp_counter); + break; + case 4: + // the same for 32 bit Counter + tmp_counter = furi_hal_subghz_get_rolling_counter_mult(); + + furi_hal_subghz_set_rolling_counter_mult(0xFFFFFFFF); + subghz_tx_start(subghz, subghz_txrx_get_fff_data(subghz->txrx)); + subghz_txrx_stop(subghz->txrx); + + if(loaded_counter32 == 0) { + furi_hal_subghz_set_rolling_counter_mult(1); + subghz_tx_start(subghz, subghz_txrx_get_fff_data(subghz->txrx)); + subghz_txrx_stop(subghz->txrx); + } + + counter32 = __bswap32(counter32); + + if(counter32 > 0) { + furi_hal_subghz_set_rolling_counter_mult(counter32); + subghz_tx_start(subghz, subghz_txrx_get_fff_data(subghz->txrx)); + subghz_txrx_stop(subghz->txrx); + } + + furi_hal_subghz_set_rolling_counter_mult(tmp_counter); + break; + default: + break; + } + + scene_manager_previous_scene(subghz->scene_manager); + return true; + + } else { + if(event.type == SceneManagerEventTypeBack) { + scene_manager_previous_scene(subghz->scene_manager); + return true; + } + } + } + return false; } void subghz_scene_signal_settings_on_exit(void* context) { @@ -152,6 +407,10 @@ void subghz_scene_signal_settings_on_exit(void* context) { furi_record_close(RECORD_STORAGE); } + // Clear views variable_item_list_set_selected_item(subghz->variable_item_list, 0); variable_item_list_reset(subghz->variable_item_list); + byte_input_set_result_callback(subghz->byte_input, NULL, NULL, NULL, NULL, 0); + byte_input_set_header_text(subghz->byte_input, ""); + furi_string_free(byte_input_text); } diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_0.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_0.png new file mode 100755 index 000000000..f1207ed14 Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_0.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_1.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_1.png new file mode 100755 index 000000000..9d9012281 Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_1.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_10.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_10.png new file mode 100755 index 000000000..cb8f173b0 Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_10.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_11.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_11.png new file mode 100755 index 000000000..0b042e3aa Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_11.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_12.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_12.png new file mode 100755 index 000000000..5d4c7e7c5 Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_12.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_2.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_2.png new file mode 100755 index 000000000..35ee06ee0 Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_2.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_3.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_3.png new file mode 100755 index 000000000..3a47dfc17 Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_3.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_4.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_4.png new file mode 100755 index 000000000..0b3bb3250 Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_4.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_5.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_5.png new file mode 100755 index 000000000..233448547 Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_5.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_6.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_6.png new file mode 100755 index 000000000..b7164380d Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_6.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_7.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_7.png new file mode 100755 index 000000000..da3a78f4c Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_7.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_8.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_8.png new file mode 100755 index 000000000..adbe53159 Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_8.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/frame_9.png b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_9.png new file mode 100755 index 000000000..3d81f935a Binary files /dev/null and b/assets/dolphin/external/L1_Happy_holidays_128x64/frame_9.png differ diff --git a/assets/dolphin/external/L1_Happy_holidays_128x64/meta.txt b/assets/dolphin/external/L1_Happy_holidays_128x64/meta.txt new file mode 100755 index 000000000..a2c733397 --- /dev/null +++ b/assets/dolphin/external/L1_Happy_holidays_128x64/meta.txt @@ -0,0 +1,23 @@ +Filetype: Flipper Animation +Version: 1 + +Width: 128 +Height: 64 +Passive frames: 10 +Active frames: 18 +Frames order: 0 1 2 1 0 1 2 1 0 1 2 3 4 5 6 5 4 7 2 8 9 10 11 10 9 10 11 12 +Active cycles: 1 +Frame rate: 2 +Duration: 3600 +Active cooldown: 7 + +Bubble slots: 1 + +Slot: 0 +X: 11 +Y: 19 +Text: HAPPY\nHOLIDAYS! +AlignH: Right +AlignV: Center +StartFrame: 22 +EndFrame: 27 diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_0.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_0.png new file mode 100755 index 000000000..0e86e6641 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_0.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_1.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_1.png new file mode 100755 index 000000000..219407e4b Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_1.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_10.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_10.png new file mode 100755 index 000000000..5459ae27c Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_10.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_11.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_11.png new file mode 100755 index 000000000..9f9d80de6 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_11.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_12.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_12.png new file mode 100755 index 000000000..7b35e1d3c Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_12.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_13.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_13.png new file mode 100755 index 000000000..9e560baa8 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_13.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_14.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_14.png new file mode 100755 index 000000000..a5d6c1a7a Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_14.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_15.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_15.png new file mode 100755 index 000000000..57b2c9bbe Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_15.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_16.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_16.png new file mode 100755 index 000000000..4be832c64 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_16.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_17.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_17.png new file mode 100755 index 000000000..1910cf939 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_17.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_18.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_18.png new file mode 100755 index 000000000..0236692c6 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_18.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_19.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_19.png new file mode 100755 index 000000000..7450c87b4 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_19.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_2.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_2.png new file mode 100755 index 000000000..0355c510c Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_2.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_20.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_20.png new file mode 100755 index 000000000..c371e217f Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_20.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_21.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_21.png new file mode 100755 index 000000000..822d2230e Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_21.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_22.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_22.png new file mode 100755 index 000000000..6d359ef86 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_22.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_23.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_23.png new file mode 100755 index 000000000..639834612 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_23.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_24.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_24.png new file mode 100755 index 000000000..fbafab70f Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_24.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_25.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_25.png new file mode 100755 index 000000000..190985282 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_25.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_26.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_26.png new file mode 100755 index 000000000..894e62d29 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_26.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_27.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_27.png new file mode 100755 index 000000000..962349bfd Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_27.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_28.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_28.png new file mode 100755 index 000000000..2eb4456cc Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_28.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_29.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_29.png new file mode 100755 index 000000000..ee325d3ee Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_29.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_3.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_3.png new file mode 100755 index 000000000..e5772a672 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_3.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_30.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_30.png new file mode 100755 index 000000000..11fc5d0b4 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_30.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_31.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_31.png new file mode 100755 index 000000000..ec47b899c Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_31.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_32.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_32.png new file mode 100755 index 000000000..3f345b563 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_32.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_33.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_33.png new file mode 100755 index 000000000..c044765eb Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_33.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_34.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_34.png new file mode 100755 index 000000000..44c4d0d49 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_34.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_35.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_35.png new file mode 100755 index 000000000..f70ecb3ab Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_35.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_36.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_36.png new file mode 100755 index 000000000..9af3a8338 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_36.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_4.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_4.png new file mode 100755 index 000000000..7d970234f Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_4.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_5.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_5.png new file mode 100755 index 000000000..70eab1f3e Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_5.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_6.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_6.png new file mode 100755 index 000000000..8169e0766 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_6.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_7.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_7.png new file mode 100755 index 000000000..adee1a63d Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_7.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_8.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_8.png new file mode 100755 index 000000000..db6e667fb Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_8.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_9.png b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_9.png new file mode 100755 index 000000000..a6a37fe29 Binary files /dev/null and b/assets/dolphin/external/L1_Sleigh_ride_128x64/frame_9.png differ diff --git a/assets/dolphin/external/L1_Sleigh_ride_128x64/meta.txt b/assets/dolphin/external/L1_Sleigh_ride_128x64/meta.txt new file mode 100755 index 000000000..3e31e1d69 --- /dev/null +++ b/assets/dolphin/external/L1_Sleigh_ride_128x64/meta.txt @@ -0,0 +1,23 @@ +Filetype: Flipper Animation +Version: 1 + +Width: 128 +Height: 64 +Passive frames: 18 +Active frames: 19 +Frames order: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 +Active cycles: 1 +Frame rate: 2 +Duration: 3600 +Active cooldown: 7 + +Bubble slots: 1 + +Slot: 0 +X: 21 +Y: 25 +Text: AAAAaAAAAHHh!! +AlignH: Right +AlignV: Bottom +StartFrame: 30 +EndFrame: 32 diff --git a/assets/dolphin/external/manifest.txt b/assets/dolphin/external/manifest.txt index e1e3ca1f0..0c2642a5b 100644 --- a/assets/dolphin/external/manifest.txt +++ b/assets/dolphin/external/manifest.txt @@ -245,3 +245,17 @@ Max butthurt: 13 Min level: 9 Max level: 30 Weight: 4 + +Name: L1_Happy_holidays_128x64 +Min butthurt: 0 +Max butthurt: 14 +Min level: 1 +Max level: 30 +Weight: 3 + +Name: L1_Sleigh_ride_128x64 +Min butthurt: 0 +Max butthurt: 14 +Min level: 1 +Max level: 30 +Weight: 4 diff --git a/lib/subghz/protocols/alutech_at_4n.c b/lib/subghz/protocols/alutech_at_4n.c index b1f6d8dfd..a4f91c785 100644 --- a/lib/subghz/protocols/alutech_at_4n.c +++ b/lib/subghz/protocols/alutech_at_4n.c @@ -279,7 +279,7 @@ static bool subghz_protocol_alutech_at_4n_gen_data( if(alutech_at4n_counter_mode == 0) { // Check for OFEX (overflow experimental) mode - if(furi_hal_subghz_get_rolling_counter_mult() != 0xFFFE) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { if(instance->generic.cnt < 0xFFFF) { if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFF) { instance->generic.cnt = 0; @@ -295,7 +295,7 @@ static bool subghz_protocol_alutech_at_4n_gen_data( if((instance->generic.cnt + 0x1) > 0xFFFF) { instance->generic.cnt = 0; } else if(instance->generic.cnt >= 0x1 && instance->generic.cnt != 0xFFFE) { - instance->generic.cnt = furi_hal_subghz_get_rolling_counter_mult(); + instance->generic.cnt = 0xFFFE; } else { instance->generic.cnt++; } @@ -883,7 +883,7 @@ void subghz_protocol_decoder_alutech_at_4n_get_string(void* context, FuriString* "%s\r\n" "Key:0x%08lX%08lX\nCRC:%02X %dbit\r\n" "Sn:0x%08lX Btn:0x%01X\r\n" - "Cnt:0x%04lX\r\n", + "Cnt:%04lX\r\n", instance->generic.protocol_name, code_found_hi, code_found_lo, diff --git a/lib/subghz/protocols/came_atomo.c b/lib/subghz/protocols/came_atomo.c index dcd9717a5..9d75ca4a3 100644 --- a/lib/subghz/protocols/came_atomo.c +++ b/lib/subghz/protocols/came_atomo.c @@ -191,7 +191,7 @@ static void subghz_protocol_encoder_came_atomo_get_upload( if(came_atomo_counter_mode == 0) { // Check for OFEX (overflow experimental) mode - if(furi_hal_subghz_get_rolling_counter_mult() != 0xFFFE) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { if(instance->generic.cnt < 0xFFFF) { if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFF) { instance->generic.cnt = 0; @@ -207,7 +207,7 @@ static void subghz_protocol_encoder_came_atomo_get_upload( if((instance->generic.cnt + 0x1) > 0xFFFF) { instance->generic.cnt = 0; } else if(instance->generic.cnt >= 0x1 && instance->generic.cnt != 0xFFFE) { - instance->generic.cnt = furi_hal_subghz_get_rolling_counter_mult(); + instance->generic.cnt = 0xFFFE; } else { instance->generic.cnt++; } @@ -833,7 +833,7 @@ void subghz_protocol_decoder_came_atomo_get_string(void* context, FuriString* ou "%s %db\r\n" "Key:%08lX%08lX\r\n" "Sn:0x%08lX Btn:%01X\r\n" - "Cnt:0x%04lX\r\n" + "Cnt:%04lX\r\n" "Btn_Cnt:0x%02X", instance->generic.protocol_name, diff --git a/lib/subghz/protocols/faac_slh.c b/lib/subghz/protocols/faac_slh.c index 655305956..d7afeed26 100644 --- a/lib/subghz/protocols/faac_slh.c +++ b/lib/subghz/protocols/faac_slh.c @@ -142,7 +142,7 @@ static bool subghz_protocol_faac_slh_gen_data(SubGhzProtocolEncoderFaacSLH* inst data_prg[0] = 0x00; if(allow_zero_seed || (instance->generic.seed != 0x0)) { - if(!(furi_hal_subghz_get_rolling_counter_mult() >= 0xFFFE)) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { if(instance->generic.cnt < 0xFFFFF) { if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFFF) { @@ -160,7 +160,7 @@ static bool subghz_protocol_faac_slh_gen_data(SubGhzProtocolEncoderFaacSLH* inst } if(temp_counter_backup != 0x0) { - if(!(furi_hal_subghz_get_rolling_counter_mult() >= 0xFFFE)) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { if(temp_counter_backup < 0xFFFFF) { if((temp_counter_backup + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFFF) { diff --git a/lib/subghz/protocols/hay21.c b/lib/subghz/protocols/hay21.c index 37b8e4a44..bce9172b6 100644 --- a/lib/subghz/protocols/hay21.c +++ b/lib/subghz/protocols/hay21.c @@ -148,7 +148,7 @@ static void subghz_protocol_encoder_hay21_get_upload(SubGhzProtocolEncoderHay21* // Counter increment // Check for OFEX (overflow experimental) mode - if(furi_hal_subghz_get_rolling_counter_mult() != 0xFFFE) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { if(instance->generic.cnt < 0xF) { if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xF) { instance->generic.cnt = 0; @@ -470,10 +470,10 @@ void subghz_protocol_decoder_hay21_get_string(void* context, FuriString* output) furi_string_cat_printf( output, "%s - %dbit\r\n" - "Key: 0x%06lX\r\n" - "Serial: 0x%02X\r\n" - "Btn: 0x%01X - %s\r\n" - "Cnt: 0x%01X\r\n", + "Key:0x%06lX\r\n" + "Serial:0x%02X\r\n" + "Btn:0x%01X - %s\r\n" + "Cnt:%01X\r\n", instance->generic.protocol_name, instance->generic.data_count_bit, (uint32_t)(instance->generic.data & 0xFFFFFFFF), diff --git a/lib/subghz/protocols/keeloq.c b/lib/subghz/protocols/keeloq.c index fefe4fa4f..e6b65f7a4 100644 --- a/lib/subghz/protocols/keeloq.c +++ b/lib/subghz/protocols/keeloq.c @@ -188,7 +188,7 @@ static bool subghz_protocol_keeloq_gen_data( if(keeloq_counter_mode == 0) { // Check for OFEX (overflow experimental) mode - if(furi_hal_subghz_get_rolling_counter_mult() != 0xFFFE) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { // If counter is 0xFFFF we will reset it to 0 if(instance->generic.cnt < 0xFFFF) { // Increase counter with value set in global settings (mult) @@ -207,7 +207,7 @@ static bool subghz_protocol_keeloq_gen_data( if((instance->generic.cnt + 0x1) > 0xFFFF) { instance->generic.cnt = 0; } else if(instance->generic.cnt >= 0x1 && instance->generic.cnt != 0xFFFE) { - instance->generic.cnt = furi_hal_subghz_get_rolling_counter_mult(); + instance->generic.cnt = 0xFFFE; } else { instance->generic.cnt++; } diff --git a/lib/subghz/protocols/kinggates_stylo_4k.c b/lib/subghz/protocols/kinggates_stylo_4k.c index f312ec2d1..23d3a2734 100644 --- a/lib/subghz/protocols/kinggates_stylo_4k.c +++ b/lib/subghz/protocols/kinggates_stylo_4k.c @@ -158,7 +158,7 @@ static bool subghz_protocol_kinggates_stylo_4k_gen_data( instance->generic.cnt = decrypt & 0xFFFF; // Check for OFEX (overflow experimental) mode - if(furi_hal_subghz_get_rolling_counter_mult() != 0xFFFE) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { if(instance->generic.cnt < 0xFFFF) { if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFF) { instance->generic.cnt = 0; @@ -174,7 +174,7 @@ static bool subghz_protocol_kinggates_stylo_4k_gen_data( if((instance->generic.cnt + 0x1) > 0xFFFF) { instance->generic.cnt = 0; } else if(instance->generic.cnt >= 0x1 && instance->generic.cnt != 0xFFFE) { - instance->generic.cnt = furi_hal_subghz_get_rolling_counter_mult(); + instance->generic.cnt = 0xFFFE; } else { instance->generic.cnt++; } @@ -593,7 +593,7 @@ void subghz_protocol_decoder_kinggates_stylo_4k_get_string(void* context, FuriSt "%s\r\n" "Key:0x%llX%07llX %dbit\r\n" "Sn:0x%08lX Btn:0x%01X\r\n" - "Cnt:0x%04lX\r\n", + "Cnt:%04lX\r\n", instance->generic.protocol_name, instance->generic.data, instance->generic.data_2, diff --git a/lib/subghz/protocols/nice_flor_s.c b/lib/subghz/protocols/nice_flor_s.c index 29c7b4f91..9fecea1ff 100644 --- a/lib/subghz/protocols/nice_flor_s.c +++ b/lib/subghz/protocols/nice_flor_s.c @@ -158,7 +158,7 @@ static void subghz_protocol_encoder_nice_flor_s_get_upload( } if(nice_flors_counter_mode == 0) { // Check for OFEX (overflow experimental) mode - if(furi_hal_subghz_get_rolling_counter_mult() != 0xFFFE) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { if(instance->generic.cnt < 0xFFFF) { if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFF) { instance->generic.cnt = 0; @@ -174,7 +174,7 @@ static void subghz_protocol_encoder_nice_flor_s_get_upload( if((instance->generic.cnt + 0x1) > 0xFFFF) { instance->generic.cnt = 0; } else if(instance->generic.cnt >= 0x1 && instance->generic.cnt != 0xFFFE) { - instance->generic.cnt = furi_hal_subghz_get_rolling_counter_mult(); + instance->generic.cnt = 0xFFFE; } else { instance->generic.cnt++; } diff --git a/lib/subghz/protocols/phoenix_v2.c b/lib/subghz/protocols/phoenix_v2.c index 19bf15249..f06e8dbce 100644 --- a/lib/subghz/protocols/phoenix_v2.c +++ b/lib/subghz/protocols/phoenix_v2.c @@ -255,7 +255,7 @@ static bool // Reconstruction of the data // Check for OFEX (overflow experimental) mode - if(furi_hal_subghz_get_rolling_counter_mult() != 0xFFFE) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { if(instance->generic.cnt < 0xFFFF) { if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFF) { instance->generic.cnt = 0; @@ -271,7 +271,7 @@ static bool if((instance->generic.cnt + 0x1) > 0xFFFF) { instance->generic.cnt = 0; } else if(instance->generic.cnt >= 0x1 && instance->generic.cnt != 0xFFFE) { - instance->generic.cnt = furi_hal_subghz_get_rolling_counter_mult(); + instance->generic.cnt = 0xFFFE; } else { instance->generic.cnt++; } @@ -601,8 +601,8 @@ void subghz_protocol_decoder_phoenix_v2_get_string(void* context, FuriString* ou "V2 Phoenix %dbit\r\n" "Key:%05lX%08lX\r\n" "Sn:0x%07lX \r\n" - "Cnt: 0x%04lX\r\n" - "Btn: %X\r\n", + "Cnt:%04lX\r\n" + "Btn:%X\r\n", instance->generic.data_count_bit, (uint32_t)(instance->generic.data >> 32) & 0xFFFFFFFF, (uint32_t)(instance->generic.data & 0xFFFFFFFF), diff --git a/lib/subghz/protocols/secplus_v1.c b/lib/subghz/protocols/secplus_v1.c index 09891342e..1433faf53 100644 --- a/lib/subghz/protocols/secplus_v1.c +++ b/lib/subghz/protocols/secplus_v1.c @@ -601,7 +601,7 @@ void subghz_protocol_decoder_secplus_v1_get_string(void* context, FuriString* ou furi_string_cat_printf( output, "Sn:0x%08lX\r\n" - "Cnt:0x%03lX " + "Cnt:%03lX " "SwID:0x%X\r\n", instance->generic.serial, instance->generic.cnt, @@ -620,7 +620,7 @@ void subghz_protocol_decoder_secplus_v1_get_string(void* context, FuriString* ou furi_string_cat_printf( output, "Sn:0x%08lX\r\n" - "Cnt:0x%03lX " + "Cnt:%03lX " "SwID:0x%X\r\n", instance->generic.serial, instance->generic.cnt, diff --git a/lib/subghz/protocols/secplus_v2.c b/lib/subghz/protocols/secplus_v2.c index 8827a7016..456c63640 100644 --- a/lib/subghz/protocols/secplus_v2.c +++ b/lib/subghz/protocols/secplus_v2.c @@ -947,7 +947,7 @@ void subghz_protocol_decoder_secplus_v2_get_string(void* context, FuriString* ou "Pk1:0x%lX%08lX\r\n" "Pk2:0x%lX%08lX\r\n" "Sn:0x%08lX Btn:0x%01X\r\n" - "Cnt:0x%03lX\r\n", + "Cnt:%03lX\r\n", instance->generic.protocol_name, instance->generic.data_count_bit, diff --git a/lib/subghz/protocols/somfy_keytis.c b/lib/subghz/protocols/somfy_keytis.c index 620a1409d..9d9e09e56 100644 --- a/lib/subghz/protocols/somfy_keytis.c +++ b/lib/subghz/protocols/somfy_keytis.c @@ -133,7 +133,7 @@ static bool instance->generic.serial = data & 0xFFFFFF; // Check for OFEX (overflow experimental) mode - if(furi_hal_subghz_get_rolling_counter_mult() != 0xFFFE) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { if(instance->generic.cnt < 0xFFFF) { if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFF) { instance->generic.cnt = 0; @@ -149,7 +149,7 @@ static bool if((instance->generic.cnt + 0x1) > 0xFFFF) { instance->generic.cnt = 0; } else if(instance->generic.cnt >= 0x1 && instance->generic.cnt != 0xFFFE) { - instance->generic.cnt = furi_hal_subghz_get_rolling_counter_mult(); + instance->generic.cnt = 0xFFFE; } else { instance->generic.cnt++; } @@ -805,7 +805,7 @@ void subghz_protocol_decoder_somfy_keytis_get_string(void* context, FuriString* "%s %db\r\n" "%lX%08lX%06lX\r\n" "Sn:0x%06lX \r\n" - "Cnt:0x%04lX\r\n" + "Cnt:%04lX\r\n" "Btn:%s\r\n", instance->generic.protocol_name, diff --git a/lib/subghz/protocols/somfy_telis.c b/lib/subghz/protocols/somfy_telis.c index b1c0048b1..724650c5b 100644 --- a/lib/subghz/protocols/somfy_telis.c +++ b/lib/subghz/protocols/somfy_telis.c @@ -127,7 +127,7 @@ static bool subghz_protocol_somfy_telis_gen_data( btn = subghz_protocol_somfy_telis_get_btn_code(); // Check for OFEX (overflow experimental) mode - if(furi_hal_subghz_get_rolling_counter_mult() != 0xFFFE) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { if(instance->generic.cnt < 0xFFFF) { if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFF) { instance->generic.cnt = 0; @@ -143,7 +143,7 @@ static bool subghz_protocol_somfy_telis_gen_data( if((instance->generic.cnt + 0x1) > 0xFFFF) { instance->generic.cnt = 0; } else if(instance->generic.cnt >= 0x1 && instance->generic.cnt != 0xFFFE) { - instance->generic.cnt = furi_hal_subghz_get_rolling_counter_mult(); + instance->generic.cnt = 0xFFFE; } else { instance->generic.cnt++; } @@ -761,7 +761,7 @@ void subghz_protocol_decoder_somfy_telis_get_string(void* context, FuriString* o "%s %db\r\n" "Key:0x%lX%08lX\r\n" "Sn:0x%06lX \r\n" - "Cnt:0x%04lX\r\n" + "Cnt:%04lX\r\n" "Btn:%s\r\n", instance->generic.protocol_name, diff --git a/lib/subghz/protocols/star_line.c b/lib/subghz/protocols/star_line.c index 2700834cc..ec0e209f0 100644 --- a/lib/subghz/protocols/star_line.c +++ b/lib/subghz/protocols/star_line.c @@ -133,7 +133,7 @@ void subghz_protocol_encoder_star_line_free(void* context) { static bool subghz_protocol_star_line_gen_data(SubGhzProtocolEncoderStarLine* instance, uint8_t btn) { // Check for OFEX (overflow experimental) mode - if(furi_hal_subghz_get_rolling_counter_mult() != 0xFFFE) { + if(furi_hal_subghz_get_rolling_counter_mult() != -0x7FFFFFFF) { if(instance->generic.cnt < 0xFFFF) { if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFF) { instance->generic.cnt = 0; @@ -149,7 +149,7 @@ static bool if((instance->generic.cnt + 0x1) > 0xFFFF) { instance->generic.cnt = 0; } else if(instance->generic.cnt >= 0x1 && instance->generic.cnt != 0xFFFE) { - instance->generic.cnt = furi_hal_subghz_get_rolling_counter_mult(); + instance->generic.cnt = 0xFFFE; } else { instance->generic.cnt++; }