mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
from home to work. one step from the end
This commit is contained in:
@@ -25,5 +25,4 @@ ADD_SCENE(subghz, decode_raw, DecodeRAW)
|
||||
ADD_SCENE(subghz, delete_raw, DeleteRAW)
|
||||
ADD_SCENE(subghz, need_saving, NeedSaving)
|
||||
ADD_SCENE(subghz, rpc, Rpc)
|
||||
ADD_SCENE(subghz, signal_settings, SignalSettings)
|
||||
ADD_SCENE(subghz, signal_settings_counter, SignalSettingsCounter)
|
||||
ADD_SCENE(subghz, signal_settings, SignalSettings)
|
||||
@@ -2,10 +2,18 @@
|
||||
#include "subghz/types.h"
|
||||
#include "../helpers/subghz_custom_event.h"
|
||||
#include <lib/toolbox/value_index.h>
|
||||
#include <machine/endian.h>
|
||||
#include <toolbox/strint.h>
|
||||
#include <gui/view_dispatcher.h>
|
||||
|
||||
#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;
|
||||
|
||||
#define COUNTER_MODE_COUNT 7
|
||||
static const char* const counter_mode_text[COUNTER_MODE_COUNT] = {
|
||||
@@ -48,22 +56,40 @@ void subghz_scene_signal_settings_counter_mode_changed(VariableItem* item) {
|
||||
variable_item_set_current_value_text(item, counter_mode_text[index]);
|
||||
counter_mode = counter_mode_value[index];
|
||||
}
|
||||
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;
|
||||
|
||||
if(index == 1) {
|
||||
// view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||
// view_dispatcher_send_custom_event(subghz->view_dispatcher, 13);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSignalSettingsCounter);
|
||||
// Setup byte_input view
|
||||
ByteInput* byte_input = subghz->byte_input;
|
||||
byte_input_set_header_text(byte_input, "Enter counter in HEX");
|
||||
|
||||
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);
|
||||
// view_dispatcher_send_custom_event(subghz->view_dispatcher, 13);
|
||||
// scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSignalSettingsCounter);
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
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);
|
||||
@@ -108,7 +134,13 @@ void subghz_scene_signal_settings_on_enter(void* context) {
|
||||
int32_t value_index;
|
||||
VariableItem* item;
|
||||
|
||||
variable_item_list_set_enter_callback (variable_item_list,subghz_scene_signal_settings_variable_item_list_enter_callback,subghz);
|
||||
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,
|
||||
@@ -122,26 +154,144 @@ 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 !");
|
||||
|
||||
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, "----");
|
||||
// ### Counter edit section ###
|
||||
FuriString* tmp_text = furi_string_alloc_set_str("");
|
||||
FuriString* textCnt = furi_string_alloc_set_str("");
|
||||
bool counter_not_available = true;
|
||||
|
||||
// decode loaded sugbhz file and take information string from decoder
|
||||
subghz_protocol_decoder_base_get_string(subghz_txrx_get_decoder(subghz->txrx), tmp_text);
|
||||
|
||||
// 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_LOG_D(
|
||||
TAG, "Found 8 bytes string starting with Cnt:%s", furi_string_get_cstr(textCnt));
|
||||
counter_not_available = false;
|
||||
// trim and convert 8 simbols string to uint32 by base 16 (hex) by strint_to_uint32();
|
||||
// later we use loaded_counter in subghz_scene_signal_settings_on_event to check is there 0 or not - special case
|
||||
strint_to_uint32(furi_string_get_cstr(textCnt), NULL, &loaded_counter32, 16);
|
||||
|
||||
// Check it there counter 2 (less than 65535) or 4 (more than 65535) hex bytes long and use corresponding variable for ByteInput
|
||||
// To show hex value we must revert bytes for ByteInput view and display 2 or 4 hex bytes to edit
|
||||
if(counter32 > 0xFFFF) {
|
||||
byte_count = 4;
|
||||
counter32 = loaded_counter32;
|
||||
furi_string_printf(tmp_text, "%08lX", counter32);
|
||||
FURI_LOG_D(TAG, "Byte count %i", byte_count);
|
||||
FURI_LOG_D(TAG, "Counter DEC %li, HEX %lX", counter32, counter32);
|
||||
counter32 = __bswap32(counter32);
|
||||
byte_ptr = (uint8_t*)&counter32;
|
||||
} else {
|
||||
counter16 = loaded_counter32;
|
||||
byte_count = 2;
|
||||
furi_string_printf(tmp_text, "%04X", counter16);
|
||||
FURI_LOG_D(TAG, "Byte count %i", byte_count);
|
||||
FURI_LOG_D(TAG, "Counter DEC %i, HEX %X", counter16, counter16);
|
||||
counter16 = __bswap16(counter16);
|
||||
byte_ptr = (uint8_t*)&counter16;
|
||||
}
|
||||
} 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 readed from file original signal has Cnt:00 we can step 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
|
||||
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 have signal Cnt:00
|
||||
// convert back after byte_view 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) {
|
||||
@@ -174,6 +324,9 @@ 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, "");
|
||||
}
|
||||
|
||||
@@ -1,237 +0,0 @@
|
||||
#include "../subghz_i.h"
|
||||
#include "../helpers/subghz_txrx_create_protocol_key.h"
|
||||
|
||||
#include <machine/endian.h>
|
||||
#include <toolbox/strint.h>
|
||||
#define TAG "SubGhzSceneSignalSettingsCounter"
|
||||
|
||||
uint32_t counter32 = 0x0;
|
||||
uint16_t counter16 = 0x0;
|
||||
|
||||
void subghz_scene_signal_settings_counter_byte_input_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventByteInputDone);
|
||||
}
|
||||
|
||||
void subghz_scene_signal_settings_counter_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
FuriString* text = furi_string_alloc();
|
||||
FuriString* textCnt = furi_string_alloc();
|
||||
uint8_t byte_count = 0;
|
||||
uint8_t* byte_ptr = NULL;
|
||||
|
||||
subghz_protocol_decoder_base_get_string(subghz_txrx_get_decoder(subghz->txrx), text);
|
||||
FURI_LOG_D(TAG, furi_string_get_cstr(text));
|
||||
|
||||
// In protocols output we allways have HEX format for "Cnt:" output (text formating like ...Cnt:%05lX\r\n")
|
||||
// Both "Cnt:0x1111" and "Cnt:1111" always mean 0x1111 hex value, so we just use part after "0x"
|
||||
// we take 8 simbols starting from "Cnt:0x........" or "Cnt:........"
|
||||
// default value for textcnt "0000"
|
||||
furi_string_set_str(textCnt, "0000");
|
||||
int8_t cnt_place = furi_string_search_str(text, "Cnt:0x", 0);
|
||||
|
||||
if(cnt_place > 0) {
|
||||
furi_string_set_n(textCnt, text, cnt_place + 6, 8);
|
||||
} else {
|
||||
cnt_place = furi_string_search_str(text, "Cnt:", 0);
|
||||
if(cnt_place > 0) {
|
||||
furi_string_set_n(textCnt, text, cnt_place + 4, 8);
|
||||
}
|
||||
}
|
||||
///// Добавить проверку Cnt:????\r\n"
|
||||
|
||||
|
||||
|
||||
furi_string_trim(textCnt);
|
||||
FURI_LOG_D(TAG,"Counter from file %s", furi_string_get_cstr(textCnt));
|
||||
|
||||
//convert 8 simbols string to uint based on base 16 (hex);
|
||||
strint_to_uint32(furi_string_get_cstr(textCnt), NULL, &counter32, 16);
|
||||
|
||||
// Check will be counter 2(less than 65535) or 4 (more than 65535) hex bytes long and use corresponding variable for ByteInput
|
||||
// To correct display hex value we must revert bytes for ByteInput view and display 2 or 4 hex bytes to edit
|
||||
if (counter32 > 0xFFFF) {
|
||||
byte_count = 4;
|
||||
counter32 = __bswap32(counter32);
|
||||
byte_ptr = (uint8_t*)&counter32;
|
||||
|
||||
} else {
|
||||
counter16 = counter32;
|
||||
byte_count = 2;
|
||||
counter16 = __bswap16(counter16);
|
||||
byte_ptr = (uint8_t*)&counter16;
|
||||
}
|
||||
|
||||
FURI_LOG_D(TAG,"Byte count %i",byte_count);
|
||||
FURI_LOG_D(TAG, "Counter Int %li", counter32);
|
||||
|
||||
furi_assert(byte_ptr);
|
||||
furi_assert(byte_count > 0);
|
||||
|
||||
// Setup view
|
||||
ByteInput* byte_input = subghz->byte_input;
|
||||
byte_input_set_header_text(byte_input, "Enter COUNTER in HEX");
|
||||
|
||||
byte_input_set_result_callback(
|
||||
byte_input,
|
||||
subghz_scene_signal_settings_counter_byte_input_callback,
|
||||
NULL,
|
||||
subghz,
|
||||
byte_ptr,
|
||||
byte_count);
|
||||
|
||||
furi_string_free(text);
|
||||
furi_string_free(textCnt);
|
||||
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||
|
||||
}
|
||||
|
||||
bool subghz_scene_signal_settings_counter_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
bool consumed = false;
|
||||
bool generated_protocol = false;
|
||||
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
if(event.event == SubGhzCustomEventByteInputDone) {
|
||||
// Swap bytes
|
||||
switch(subghz->gen_info->type) {
|
||||
case GenFaacSLH:
|
||||
subghz->gen_info->faac_slh.cnt = __bswap32(subghz->gen_info->faac_slh.cnt);
|
||||
break;
|
||||
case GenKeeloq:
|
||||
subghz->gen_info->keeloq.cnt = __bswap16(subghz->gen_info->keeloq.cnt);
|
||||
break;
|
||||
case GenCameAtomo:
|
||||
subghz->gen_info->came_atomo.cnt = __bswap16(subghz->gen_info->came_atomo.cnt);
|
||||
break;
|
||||
case GenKeeloqBFT:
|
||||
subghz->gen_info->keeloq_bft.cnt = __bswap16(subghz->gen_info->keeloq_bft.cnt);
|
||||
break;
|
||||
case GenAlutechAt4n:
|
||||
subghz->gen_info->alutech_at_4n.cnt =
|
||||
__bswap16(subghz->gen_info->alutech_at_4n.cnt);
|
||||
break;
|
||||
case GenSomfyTelis:
|
||||
subghz->gen_info->somfy_telis.cnt = __bswap16(subghz->gen_info->somfy_telis.cnt);
|
||||
break;
|
||||
case GenNiceFlorS:
|
||||
subghz->gen_info->nice_flor_s.cnt = __bswap16(subghz->gen_info->nice_flor_s.cnt);
|
||||
break;
|
||||
case GenSecPlus2:
|
||||
subghz->gen_info->sec_plus_2.cnt = __bswap32(subghz->gen_info->sec_plus_2.cnt);
|
||||
break;
|
||||
case GenPhoenixV2:
|
||||
subghz->gen_info->phoenix_v2.cnt = __bswap16(subghz->gen_info->phoenix_v2.cnt);
|
||||
break;
|
||||
// Not needed for these types
|
||||
case GenData:
|
||||
case GenSecPlus1:
|
||||
default:
|
||||
furi_crash("Not implemented");
|
||||
break;
|
||||
}
|
||||
|
||||
switch(subghz->gen_info->type) {
|
||||
case GenFaacSLH:
|
||||
case GenKeeloqBFT:
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSetSeed);
|
||||
return true;
|
||||
case GenKeeloq:
|
||||
generated_protocol = subghz_txrx_gen_keeloq_protocol(
|
||||
subghz->txrx,
|
||||
subghz->gen_info->mod,
|
||||
subghz->gen_info->freq,
|
||||
subghz->gen_info->keeloq.serial,
|
||||
subghz->gen_info->keeloq.btn,
|
||||
subghz->gen_info->keeloq.cnt,
|
||||
subghz->gen_info->keeloq.manuf);
|
||||
break;
|
||||
case GenCameAtomo:
|
||||
generated_protocol = subghz_txrx_gen_came_atomo_protocol(
|
||||
subghz->txrx,
|
||||
subghz->gen_info->mod,
|
||||
subghz->gen_info->freq,
|
||||
subghz->gen_info->came_atomo.serial,
|
||||
subghz->gen_info->came_atomo.cnt);
|
||||
break;
|
||||
case GenAlutechAt4n:
|
||||
generated_protocol = subghz_txrx_gen_alutech_at_4n_protocol(
|
||||
subghz->txrx,
|
||||
subghz->gen_info->mod,
|
||||
subghz->gen_info->freq,
|
||||
subghz->gen_info->alutech_at_4n.serial,
|
||||
subghz->gen_info->alutech_at_4n.btn,
|
||||
subghz->gen_info->alutech_at_4n.cnt);
|
||||
break;
|
||||
case GenSomfyTelis:
|
||||
generated_protocol = subghz_txrx_gen_somfy_telis_protocol(
|
||||
subghz->txrx,
|
||||
subghz->gen_info->mod,
|
||||
subghz->gen_info->freq,
|
||||
subghz->gen_info->somfy_telis.serial,
|
||||
subghz->gen_info->somfy_telis.btn,
|
||||
subghz->gen_info->somfy_telis.cnt);
|
||||
break;
|
||||
case GenNiceFlorS:
|
||||
generated_protocol = subghz_txrx_gen_nice_flor_s_protocol(
|
||||
subghz->txrx,
|
||||
subghz->gen_info->mod,
|
||||
subghz->gen_info->freq,
|
||||
subghz->gen_info->nice_flor_s.serial,
|
||||
subghz->gen_info->nice_flor_s.btn,
|
||||
subghz->gen_info->nice_flor_s.cnt,
|
||||
subghz->gen_info->nice_flor_s.nice_one);
|
||||
break;
|
||||
case GenSecPlus2:
|
||||
generated_protocol = subghz_txrx_gen_secplus_v2_protocol(
|
||||
subghz->txrx,
|
||||
subghz->gen_info->mod,
|
||||
subghz->gen_info->freq,
|
||||
subghz->gen_info->sec_plus_2.serial,
|
||||
subghz->gen_info->sec_plus_2.btn,
|
||||
subghz->gen_info->sec_plus_2.cnt);
|
||||
break;
|
||||
case GenPhoenixV2:
|
||||
generated_protocol = subghz_txrx_gen_phoenix_v2_protocol(
|
||||
subghz->txrx,
|
||||
subghz->gen_info->mod,
|
||||
subghz->gen_info->freq,
|
||||
subghz->gen_info->phoenix_v2.serial,
|
||||
subghz->gen_info->phoenix_v2.cnt);
|
||||
break;
|
||||
// Not needed for these types
|
||||
case GenData:
|
||||
case GenSecPlus1:
|
||||
default:
|
||||
furi_crash("Not implemented");
|
||||
break;
|
||||
}
|
||||
|
||||
consumed = true;
|
||||
|
||||
if(!generated_protocol) {
|
||||
furi_string_set(
|
||||
subghz->error_str, "Function requires\nan SD card with\nfresh databases.");
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowError);
|
||||
} else {
|
||||
subghz_file_name_clear(subghz);
|
||||
|
||||
scene_manager_set_scene_state(
|
||||
subghz->scene_manager, SubGhzSceneSetType, SubGhzCustomEventManagerSet);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaveName);
|
||||
}
|
||||
}
|
||||
}
|
||||
return consumed;
|
||||
}
|
||||
|
||||
void subghz_scene_signal_settings_counter_on_exit(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
|
||||
// Clear view
|
||||
byte_input_set_result_callback(subghz->byte_input, NULL, NULL, NULL, NULL, 0);
|
||||
byte_input_set_header_text(subghz->byte_input, "");
|
||||
}
|
||||
@@ -881,7 +881,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,
|
||||
|
||||
@@ -831,7 +831,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,
|
||||
|
||||
@@ -468,10 +468,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),
|
||||
|
||||
@@ -591,7 +591,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,
|
||||
|
||||
@@ -599,8 +599,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:0x%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),
|
||||
|
||||
@@ -599,7 +599,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,
|
||||
@@ -618,7 +618,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,
|
||||
|
||||
@@ -945,7 +945,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,
|
||||
|
||||
@@ -803,7 +803,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,
|
||||
|
||||
@@ -759,7 +759,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,
|
||||
|
||||
Reference in New Issue
Block a user