mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware into xfw-dev
This commit is contained in:
@@ -92,35 +92,41 @@ static void subghz_scene_add_to_history_callback(
|
||||
void* context) {
|
||||
furi_assert(context);
|
||||
SubGhz* subghz = context;
|
||||
SubGhzHistory* history = subghz->history;
|
||||
FuriString* item_name = furi_string_alloc();
|
||||
FuriString* item_time = furi_string_alloc();
|
||||
uint16_t idx = subghz_history_get_item(history);
|
||||
|
||||
SubGhzRadioPreset preset = subghz_txrx_get_preset(subghz->txrx);
|
||||
if(subghz_history_add_to_history(history, decoder_base, &preset)) {
|
||||
furi_string_reset(item_name);
|
||||
furi_string_reset(item_time);
|
||||
// The check can be moved to /lib/subghz/receiver.c, but may result in false positives
|
||||
if((decoder_base->protocol->flag & subghz->ignore_filter) == 0) {
|
||||
SubGhzHistory* history = subghz->history;
|
||||
FuriString* item_name = furi_string_alloc();
|
||||
FuriString* item_time = furi_string_alloc();
|
||||
uint16_t idx = subghz_history_get_item(history);
|
||||
|
||||
subghz->state_notifications = SubGhzNotificationStateRxDone;
|
||||
SubGhzRadioPreset preset = subghz_txrx_get_preset(subghz->txrx);
|
||||
if(subghz_history_add_to_history(history, decoder_base, &preset)) {
|
||||
furi_string_reset(item_name);
|
||||
furi_string_reset(item_time);
|
||||
|
||||
subghz_history_get_text_item_menu(history, item_name, idx);
|
||||
subghz_history_get_time_item_menu(history, item_time, idx);
|
||||
subghz_view_receiver_add_item_to_menu(
|
||||
subghz->subghz_receiver,
|
||||
furi_string_get_cstr(item_name),
|
||||
furi_string_get_cstr(item_time),
|
||||
subghz_history_get_type_protocol(history, idx));
|
||||
subghz->state_notifications = SubGhzNotificationStateRxDone;
|
||||
|
||||
subghz_scene_receiver_update_statusbar(subghz);
|
||||
if(subghz_history_get_text_space_left(subghz->history, NULL)) {
|
||||
notification_message(subghz->notifications, &sequence_error);
|
||||
subghz_history_get_text_item_menu(history, item_name, idx);
|
||||
subghz_history_get_time_item_menu(history, item_time, idx);
|
||||
subghz_view_receiver_add_item_to_menu(
|
||||
subghz->subghz_receiver,
|
||||
furi_string_get_cstr(item_name),
|
||||
furi_string_get_cstr(item_time),
|
||||
subghz_history_get_type_protocol(history, idx));
|
||||
|
||||
subghz_scene_receiver_update_statusbar(subghz);
|
||||
if(subghz_history_get_text_space_left(subghz->history, NULL)) {
|
||||
notification_message(subghz->notifications, &sequence_error);
|
||||
}
|
||||
}
|
||||
subghz_receiver_reset(receiver);
|
||||
furi_string_free(item_name);
|
||||
furi_string_free(item_time);
|
||||
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateAddKey);
|
||||
} else {
|
||||
FURI_LOG_I(TAG, "%s protocol ignored", decoder_base->protocol->name);
|
||||
}
|
||||
subghz_receiver_reset(receiver);
|
||||
furi_string_free(item_name);
|
||||
furi_string_free(item_time);
|
||||
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateAddKey);
|
||||
}
|
||||
|
||||
void subghz_scene_receiver_on_enter(void* context) {
|
||||
@@ -161,32 +167,6 @@ void subghz_scene_receiver_on_enter(void* context) {
|
||||
subghz->subghz_receiver, subghz_scene_receiver_callback, subghz);
|
||||
subghz_txrx_set_rx_calback(subghz->txrx, subghz_scene_add_to_history_callback, subghz);
|
||||
|
||||
// TODO: Replace with proper solution based on protocol flags, remove kostily and velosipedy from here
|
||||
// Needs to be done after subghz refactoring merge!!!
|
||||
if(subghz->ignore_starline == true) {
|
||||
if(subghz_txrx_load_decoder_by_name_protocol(subghz->txrx, "Star Line")) {
|
||||
subghz_protocol_decoder_base_set_decoder_callback(
|
||||
subghz_txrx_get_decoder(subghz->txrx), NULL, NULL);
|
||||
}
|
||||
}
|
||||
if(subghz->ignore_auto_alarms == true) {
|
||||
if(subghz_txrx_load_decoder_by_name_protocol(subghz->txrx, "KIA Seed")) {
|
||||
subghz_protocol_decoder_base_set_decoder_callback(
|
||||
subghz_txrx_get_decoder(subghz->txrx), NULL, NULL);
|
||||
}
|
||||
|
||||
if(subghz_txrx_load_decoder_by_name_protocol(subghz->txrx, "Scher-Khan")) {
|
||||
subghz_protocol_decoder_base_set_decoder_callback(
|
||||
subghz_txrx_get_decoder(subghz->txrx), NULL, NULL);
|
||||
}
|
||||
}
|
||||
if(subghz->ignore_magellan == true) {
|
||||
if(subghz_txrx_load_decoder_by_name_protocol(subghz->txrx, "Magellan")) {
|
||||
subghz_protocol_decoder_base_set_decoder_callback(
|
||||
subghz_txrx_get_decoder(subghz->txrx), NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if(!subghz_history_get_text_space_left(subghz->history, NULL)) {
|
||||
subghz->state_notifications = SubGhzNotificationStateRx;
|
||||
}
|
||||
@@ -204,6 +184,9 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
|
||||
SubGhz* subghz = context;
|
||||
bool consumed = false;
|
||||
if(event.type == SceneManagerEventTypeCustom) {
|
||||
// Save cursor position before going to any other dialog
|
||||
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
|
||||
|
||||
switch(event.event) {
|
||||
case SubGhzCustomEventViewReceiverBack:
|
||||
// Stop CC1101 Rx
|
||||
@@ -226,23 +209,21 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
|
||||
break;
|
||||
case SubGhzCustomEventViewReceiverOK:
|
||||
// Show file info, scene: receiver_info
|
||||
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReceiverInfo);
|
||||
dolphin_deed(DolphinDeedSubGhzReceiverInfo);
|
||||
consumed = true;
|
||||
break;
|
||||
case SubGhzCustomEventViewReceiverDeleteItem:
|
||||
subghz->state_notifications = SubGhzNotificationStateRx;
|
||||
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
|
||||
|
||||
subghz_view_receiver_disable_draw_callback(subghz->subghz_receiver);
|
||||
|
||||
subghz_history_delete_item(subghz->history, subghz->idx_menu_chosen);
|
||||
subghz_view_receiver_delete_element_callback(subghz->subghz_receiver);
|
||||
|
||||
subghz_view_receiver_enable_draw_callback(subghz->subghz_receiver);
|
||||
|
||||
subghz_scene_receiver_update_statusbar(subghz);
|
||||
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
|
||||
if(subghz_history_get_last_index(subghz->history) == 0) {
|
||||
subghz_rx_key_state_set(subghz, SubGhzRxKeyStateStart);
|
||||
}
|
||||
@@ -250,7 +231,6 @@ bool subghz_scene_receiver_on_event(void* context, SceneManagerEvent event) {
|
||||
break;
|
||||
case SubGhzCustomEventViewReceiverConfig:
|
||||
// Actually signals are received but SubGhzNotificationStateRx is not working inside Config Scene
|
||||
subghz->idx_menu_chosen = subghz_view_receiver_get_idx_menu(subghz->subghz_receiver);
|
||||
scene_manager_set_scene_state(
|
||||
subghz->scene_manager, SubGhzViewIdReceiver, SubGhzCustomEventManagerSet);
|
||||
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneReceiverConfig);
|
||||
|
||||
@@ -71,20 +71,8 @@ const uint32_t bin_raw_value[BIN_RAW_COUNT] = {
|
||||
SubGhzProtocolFlag_Decodable,
|
||||
SubGhzProtocolFlag_Decodable | SubGhzProtocolFlag_BinRAW,
|
||||
};
|
||||
#define STARLINE_COUNT 2
|
||||
const char* const starline_text[STARLINE_COUNT] = {
|
||||
"OFF",
|
||||
"ON",
|
||||
};
|
||||
|
||||
#define AUTO_ALARMS_COUNT 2
|
||||
const char* const auto_alarms_text[AUTO_ALARMS_COUNT] = {
|
||||
"OFF",
|
||||
"ON",
|
||||
};
|
||||
|
||||
#define MAGELLAN_COUNT 2
|
||||
const char* const magellan_text[MAGELLAN_COUNT] = {
|
||||
#define PROTOCOL_IGNORE_COUNT 2
|
||||
const char* const protocol_ignore_text[PROTOCOL_IGNORE_COUNT] = {
|
||||
"OFF",
|
||||
"ON",
|
||||
};
|
||||
@@ -257,28 +245,35 @@ static void subghz_scene_receiver_config_set_raw_threshold_rssi(VariableItem* it
|
||||
subghz_threshold_rssi_set(subghz->threshold_rssi, raw_threshold_rssi_value[index]);
|
||||
}
|
||||
|
||||
static void subghz_scene_receiver_config_set_starline(VariableItem* item) {
|
||||
static inline void
|
||||
subghz_scene_receiver_config_set_ignore_filter(VariableItem* item, SubGhzProtocolFlag filter) {
|
||||
SubGhz* subghz = variable_item_get_context(item);
|
||||
uint8_t index = variable_item_get_current_value_index(item);
|
||||
|
||||
variable_item_set_current_value_text(item, starline_text[index]);
|
||||
subghz->ignore_starline = (index == 1);
|
||||
variable_item_set_current_value_text(item, protocol_ignore_text[index]);
|
||||
|
||||
if(index == 0) {
|
||||
CLEAR_BIT(subghz->ignore_filter, filter);
|
||||
} else {
|
||||
SET_BIT(subghz->ignore_filter, filter);
|
||||
}
|
||||
}
|
||||
static inline bool subghz_scene_receiver_config_ignore_filter_get_index(
|
||||
SubGhzProtocolFlag filter,
|
||||
SubGhzProtocolFlag flag) {
|
||||
return READ_BIT(filter, flag) > 0;
|
||||
}
|
||||
|
||||
static void subghz_scene_receiver_config_set_starline(VariableItem* item) {
|
||||
subghz_scene_receiver_config_set_ignore_filter(item, SubGhzProtocolFlag_StarLine);
|
||||
}
|
||||
|
||||
static void subghz_scene_receiver_config_set_auto_alarms(VariableItem* item) {
|
||||
SubGhz* subghz = variable_item_get_context(item);
|
||||
uint8_t index = variable_item_get_current_value_index(item);
|
||||
|
||||
variable_item_set_current_value_text(item, auto_alarms_text[index]);
|
||||
subghz->ignore_auto_alarms = (index == 1);
|
||||
subghz_scene_receiver_config_set_ignore_filter(item, SubGhzProtocolFlag_AutoAlarms);
|
||||
}
|
||||
|
||||
static void subghz_scene_receiver_config_set_magellan(VariableItem* item) {
|
||||
SubGhz* subghz = variable_item_get_context(item);
|
||||
uint8_t index = variable_item_get_current_value_index(item);
|
||||
|
||||
variable_item_set_current_value_text(item, magellan_text[index]);
|
||||
subghz->ignore_magellan = (index == 1);
|
||||
subghz_scene_receiver_config_set_ignore_filter(item, SubGhzProtocolFlag_Magelan);
|
||||
}
|
||||
|
||||
static void subghz_scene_receiver_config_var_list_enter_callback(void* context, uint32_t index) {
|
||||
@@ -362,35 +357,38 @@ void subghz_scene_receiver_config_on_enter(void* context) {
|
||||
item = variable_item_list_add(
|
||||
subghz->variable_item_list,
|
||||
"Ignore Starline:",
|
||||
STARLINE_COUNT,
|
||||
PROTOCOL_IGNORE_COUNT,
|
||||
subghz_scene_receiver_config_set_starline,
|
||||
subghz);
|
||||
|
||||
value_index = subghz->ignore_starline;
|
||||
value_index = subghz_scene_receiver_config_ignore_filter_get_index(
|
||||
subghz->ignore_filter, SubGhzProtocolFlag_StarLine);
|
||||
variable_item_set_current_value_index(item, value_index);
|
||||
variable_item_set_current_value_text(item, starline_text[value_index]);
|
||||
variable_item_set_current_value_text(item, protocol_ignore_text[value_index]);
|
||||
|
||||
item = variable_item_list_add(
|
||||
subghz->variable_item_list,
|
||||
"Ignore Cars:",
|
||||
AUTO_ALARMS_COUNT,
|
||||
PROTOCOL_IGNORE_COUNT,
|
||||
subghz_scene_receiver_config_set_auto_alarms,
|
||||
subghz);
|
||||
|
||||
value_index = subghz->ignore_auto_alarms;
|
||||
value_index = subghz_scene_receiver_config_ignore_filter_get_index(
|
||||
subghz->ignore_filter, SubGhzProtocolFlag_AutoAlarms);
|
||||
variable_item_set_current_value_index(item, value_index);
|
||||
variable_item_set_current_value_text(item, auto_alarms_text[value_index]);
|
||||
variable_item_set_current_value_text(item, protocol_ignore_text[value_index]);
|
||||
|
||||
item = variable_item_list_add(
|
||||
subghz->variable_item_list,
|
||||
"Ignore Magellan:",
|
||||
MAGELLAN_COUNT,
|
||||
PROTOCOL_IGNORE_COUNT,
|
||||
subghz_scene_receiver_config_set_magellan,
|
||||
subghz);
|
||||
|
||||
value_index = subghz->ignore_magellan;
|
||||
value_index = subghz_scene_receiver_config_ignore_filter_get_index(
|
||||
subghz->ignore_filter, SubGhzProtocolFlag_Magelan);
|
||||
variable_item_set_current_value_index(item, value_index);
|
||||
variable_item_set_current_value_text(item, magellan_text[value_index]);
|
||||
variable_item_set_current_value_text(item, protocol_ignore_text[value_index]);
|
||||
}
|
||||
|
||||
// Enable speaker, will send all incoming noises and signals to speaker so you can listen how your remote sounds like :)
|
||||
|
||||
@@ -53,6 +53,42 @@ static void subghz_rpc_command_callback(RpcAppSystemEvent event, void* context)
|
||||
}
|
||||
}
|
||||
|
||||
static void subghz_load_custom_presets(SubGhzSetting* setting) {
|
||||
furi_assert(setting);
|
||||
|
||||
const char* presets[][2] = {
|
||||
{"FM95",
|
||||
"02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 83 10 67 15 24 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00"},
|
||||
|
||||
// #2-FSK 200khz BW / 135kHz Filter/ 15.86Khz Deviation + Ramping
|
||||
{"FM15k",
|
||||
"02 0D 03 47 08 32 0B 06 15 32 14 00 13 00 12 00 11 32 10 A7 18 18 19 1D 1D 92 1C 00 1B 04 20 FB 22 17 21 B6 00 00 00 12 0E 34 60 C5 C1 C0"},
|
||||
|
||||
// Pagers
|
||||
{"Pagers",
|
||||
"02 0D 07 04 08 32 0B 06 10 64 11 93 12 0C 13 02 14 00 15 15 18 18 19 16 1B 07 1C 00 1D 91 20 FB 21 56 22 10 00 00 C0 00 00 00 00 00 00 00"},
|
||||
|
||||
// # HND - FM preset
|
||||
{"HND_1",
|
||||
"02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 36 10 69 15 32 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00"},
|
||||
};
|
||||
|
||||
FlipperFormat* fff_temp = flipper_format_string_alloc();
|
||||
|
||||
for(uint8_t i = 0; i < COUNT_OF(presets); i++) {
|
||||
flipper_format_insert_or_update_string_cstr(fff_temp, "Custom_preset_data", presets[i][1]);
|
||||
|
||||
flipper_format_rewind(fff_temp);
|
||||
subghz_setting_load_custom_preset(setting, presets[i][0], fff_temp);
|
||||
}
|
||||
|
||||
flipper_format_free(fff_temp);
|
||||
|
||||
#ifdef FURI_DEBUG
|
||||
subghz_setting_customs_presets_to_log(setting);
|
||||
#endif
|
||||
}
|
||||
|
||||
SubGhz* subghz_alloc(bool alloc_for_tx_only) {
|
||||
SubGhz* subghz = malloc(sizeof(SubGhz));
|
||||
|
||||
@@ -179,52 +215,7 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
|
||||
|
||||
SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx);
|
||||
|
||||
// Custom Presets load without using config file
|
||||
if(!alloc_for_tx_only) {
|
||||
FlipperFormat* temp_fm_preset = flipper_format_string_alloc();
|
||||
flipper_format_write_string_cstr(
|
||||
temp_fm_preset,
|
||||
(const char*)"Custom_preset_data",
|
||||
(const char*)"02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 83 10 67 15 24 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00");
|
||||
flipper_format_rewind(temp_fm_preset);
|
||||
subghz_setting_load_custom_preset(setting, (const char*)"FM95", temp_fm_preset);
|
||||
|
||||
flipper_format_free(temp_fm_preset);
|
||||
|
||||
// #2-FSK 200khz BW / 135kHz Filter/ 15.86Khz Deviation + Ramping
|
||||
FlipperFormat* temp_fm_preset2 = flipper_format_string_alloc();
|
||||
flipper_format_write_string_cstr(
|
||||
temp_fm_preset2,
|
||||
(const char*)"Custom_preset_data",
|
||||
(const char*)"02 0D 03 47 08 32 0B 06 15 32 14 00 13 00 12 00 11 32 10 A7 18 18 19 1D 1D 92 1C 00 1B 04 20 FB 22 17 21 B6 00 00 00 12 0E 34 60 C5 C1 C0");
|
||||
flipper_format_rewind(temp_fm_preset2);
|
||||
subghz_setting_load_custom_preset(setting, (const char*)"FM15k", temp_fm_preset2);
|
||||
|
||||
flipper_format_free(temp_fm_preset2);
|
||||
|
||||
// Pagers
|
||||
FlipperFormat* temp_fm_preset3 = flipper_format_string_alloc();
|
||||
flipper_format_write_string_cstr(
|
||||
temp_fm_preset3,
|
||||
(const char*)"Custom_preset_data",
|
||||
(const char*)"02 0D 07 04 08 32 0B 06 10 64 11 93 12 0C 13 02 14 00 15 15 18 18 19 16 1B 07 1C 00 1D 91 20 FB 21 56 22 10 00 00 C0 00 00 00 00 00 00 00");
|
||||
flipper_format_rewind(temp_fm_preset3);
|
||||
subghz_setting_load_custom_preset(setting, (const char*)"Pagers", temp_fm_preset3);
|
||||
|
||||
flipper_format_free(temp_fm_preset3);
|
||||
|
||||
// # HND - FM preset
|
||||
FlipperFormat* temp_fm_preset4 = flipper_format_string_alloc();
|
||||
flipper_format_write_string_cstr(
|
||||
temp_fm_preset4,
|
||||
(const char*)"Custom_preset_data",
|
||||
(const char*)"02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 36 10 69 15 32 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00");
|
||||
flipper_format_rewind(temp_fm_preset4);
|
||||
subghz_setting_load_custom_preset(setting, (const char*)"HND_1", temp_fm_preset4);
|
||||
|
||||
flipper_format_free(temp_fm_preset4);
|
||||
}
|
||||
// custom presets loading - end
|
||||
subghz_load_custom_presets(setting);
|
||||
|
||||
// Load last used values for Read, Read RAW, etc. or default
|
||||
subghz->last_settings = subghz_last_settings_alloc();
|
||||
@@ -253,6 +244,7 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
|
||||
subghz->secure_data = malloc(sizeof(SecureData));
|
||||
|
||||
subghz->filter = SubGhzProtocolFlag_Decodable;
|
||||
subghz->ignore_filter = 0x0;
|
||||
subghz_txrx_receiver_set_filter(subghz->txrx, subghz->filter);
|
||||
subghz_txrx_set_need_save_callback(subghz->txrx, subghz_save_to_file, subghz);
|
||||
|
||||
|
||||
@@ -89,13 +89,10 @@ struct SubGhz {
|
||||
SubGhzLastSettings* last_settings;
|
||||
|
||||
SubGhzProtocolFlag filter;
|
||||
SubGhzProtocolFlag ignore_filter;
|
||||
FuriString* error_str;
|
||||
SubGhzLock lock;
|
||||
|
||||
bool ignore_starline;
|
||||
bool ignore_auto_alarms;
|
||||
bool ignore_magellan;
|
||||
|
||||
SecureData* secure_data;
|
||||
|
||||
SubGhzFileEncoderWorker* decode_raw_file_worker_encoder;
|
||||
|
||||
@@ -119,7 +119,6 @@ void subghz_last_settings_load(SubGhzLastSettings* instance, size_t preset_count
|
||||
|
||||
instance->timestamp_file_names = temp_timestamp_file_names;
|
||||
|
||||
// Set globally
|
||||
if(instance->external_module_power_5v_disable) {
|
||||
furi_hal_subghz_set_external_power_disable(true);
|
||||
furi_hal_subghz_disable_ext_power();
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
|
||||
#define SUBGHZ_RAW_THRESHOLD_MIN -90.0f
|
||||
|
||||
#define SCROLL_INTERVAL (606)
|
||||
#define SCROLL_DELAY (2)
|
||||
#define FLIP_TIMEOUT (500)
|
||||
|
||||
typedef struct {
|
||||
FuriString* item_str;
|
||||
@@ -55,7 +54,7 @@ struct SubGhzViewReceiver {
|
||||
View* view;
|
||||
SubGhzViewReceiverCallback callback;
|
||||
void* context;
|
||||
FuriTimer* scroll_timer;
|
||||
FuriTimer* flip_time_timer;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@@ -70,7 +69,7 @@ typedef struct {
|
||||
SubGhzViewReceiverBarShow bar_show;
|
||||
SubGhzViewReceiverMode mode;
|
||||
uint8_t u_rssi;
|
||||
size_t scroll_counter;
|
||||
bool show_time;
|
||||
bool nodraw;
|
||||
} SubGhzViewReceiverModel;
|
||||
|
||||
@@ -148,6 +147,24 @@ static void subghz_view_receiver_update_offset(SubGhzViewReceiver* subghz_receiv
|
||||
true);
|
||||
}
|
||||
|
||||
static void subghz_view_receiver_show_time_moment(void* context) {
|
||||
furi_assert(context);
|
||||
SubGhzViewReceiver* subghz_receiver = context;
|
||||
with_view_model(
|
||||
subghz_receiver->view, SubGhzViewReceiverModel * model, { model->show_time = true; }, true);
|
||||
furi_timer_start(subghz_receiver->flip_time_timer, FLIP_TIMEOUT);
|
||||
}
|
||||
|
||||
static void subghz_view_receiver_flip_string_callback(void* context) {
|
||||
furi_assert(context);
|
||||
SubGhzViewReceiver* subghz_receiver = context;
|
||||
with_view_model(
|
||||
subghz_receiver->view,
|
||||
SubGhzViewReceiverModel * model,
|
||||
{ model->show_time = false; },
|
||||
true);
|
||||
}
|
||||
|
||||
void subghz_view_receiver_add_item_to_menu(
|
||||
SubGhzViewReceiver* subghz_receiver,
|
||||
const char* name,
|
||||
@@ -166,6 +183,7 @@ void subghz_view_receiver_add_item_to_menu(
|
||||
if((model->idx == model->history_item - 1)) {
|
||||
model->history_item++;
|
||||
model->idx++;
|
||||
subghz_view_receiver_show_time_moment(subghz_receiver);
|
||||
} else {
|
||||
model->history_item++;
|
||||
}
|
||||
@@ -255,30 +273,18 @@ void subghz_view_receiver_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
|
||||
break;
|
||||
}
|
||||
furi_string_set(str_buff, item_menu->item_str);
|
||||
size_t scroll_counter = model->scroll_counter;
|
||||
if(model->idx == idx) {
|
||||
subghz_view_receiver_draw_frame(canvas, i, scrollbar);
|
||||
if(scroll_counter < SCROLL_DELAY) {
|
||||
if(model->show_time) {
|
||||
// Show time of signal one moment
|
||||
furi_string_set(str_buff, item_menu->time);
|
||||
scroll_counter = 0;
|
||||
} else {
|
||||
scroll_counter -= SCROLL_DELAY;
|
||||
}
|
||||
} else {
|
||||
canvas_set_color(canvas, ColorBlack);
|
||||
scroll_counter = 0;
|
||||
}
|
||||
elements_string_fit_width(canvas, str_buff, scrollbar ? MAX_LEN_PX - 7 : MAX_LEN_PX);
|
||||
canvas_draw_icon(canvas, 4, 2 + i * FRAME_HEIGHT, ReceiverItemIcons[item_menu->type]);
|
||||
elements_scrollable_text_line(
|
||||
canvas,
|
||||
15,
|
||||
9 + i * FRAME_HEIGHT,
|
||||
(scrollbar ? MAX_LEN_PX - 6 : MAX_LEN_PX),
|
||||
str_buff,
|
||||
scroll_counter,
|
||||
(model->idx != idx),
|
||||
false);
|
||||
canvas_draw_str(canvas, 15, 9 + i * FRAME_HEIGHT, furi_string_get_cstr(str_buff));
|
||||
furi_string_reset(str_buff);
|
||||
}
|
||||
if(scrollbar) {
|
||||
@@ -385,13 +391,6 @@ void subghz_view_receiver_draw(Canvas* canvas, SubGhzViewReceiverModel* model) {
|
||||
}
|
||||
}
|
||||
|
||||
static void subghz_view_receiver_scroll_timer_callback(void* context) {
|
||||
furi_assert(context);
|
||||
SubGhzViewReceiver* subghz_receiver = context;
|
||||
with_view_model(
|
||||
subghz_receiver->view, SubGhzViewReceiverModel * model, { model->scroll_counter++; }, true);
|
||||
}
|
||||
|
||||
static void subghz_view_receiver_timer_callback(void* context) {
|
||||
furi_assert(context);
|
||||
SubGhzViewReceiver* subghz_receiver = context;
|
||||
@@ -451,7 +450,7 @@ bool subghz_view_receiver_input(InputEvent* event, void* context) {
|
||||
SubGhzViewReceiverModel * model,
|
||||
{
|
||||
if(model->idx != 0) model->idx--;
|
||||
model->scroll_counter = 0;
|
||||
subghz_view_receiver_show_time_moment(context);
|
||||
},
|
||||
true);
|
||||
} else if(
|
||||
@@ -461,9 +460,10 @@ bool subghz_view_receiver_input(InputEvent* event, void* context) {
|
||||
subghz_receiver->view,
|
||||
SubGhzViewReceiverModel * model,
|
||||
{
|
||||
if((model->history_item != 0) && (model->idx != model->history_item - 1))
|
||||
if((model->history_item != 0) && (model->idx != model->history_item - 1)) {
|
||||
model->idx++;
|
||||
model->scroll_counter = 0;
|
||||
subghz_view_receiver_show_time_moment(context);
|
||||
}
|
||||
},
|
||||
true);
|
||||
} else if(event->key == InputKeyLeft && event->type == InputTypeShort) {
|
||||
@@ -500,13 +500,7 @@ bool subghz_view_receiver_input(InputEvent* event, void* context) {
|
||||
|
||||
void subghz_view_receiver_enter(void* context) {
|
||||
furi_assert(context);
|
||||
SubGhzViewReceiver* subghz_receiver = context;
|
||||
with_view_model(
|
||||
subghz_receiver->view,
|
||||
SubGhzViewReceiverModel * model,
|
||||
{ model->scroll_counter = 0; },
|
||||
true);
|
||||
furi_timer_start(subghz_receiver->scroll_timer, SCROLL_INTERVAL);
|
||||
subghz_view_receiver_show_time_moment(context);
|
||||
}
|
||||
|
||||
void subghz_view_receiver_exit(void* context) {
|
||||
@@ -534,7 +528,7 @@ void subghz_view_receiver_exit(void* context) {
|
||||
},
|
||||
false);
|
||||
furi_timer_stop(subghz_receiver->timer);
|
||||
furi_timer_stop(subghz_receiver->scroll_timer);
|
||||
furi_timer_stop(subghz_receiver->flip_time_timer);
|
||||
}
|
||||
|
||||
SubGhzViewReceiver* subghz_view_receiver_alloc() {
|
||||
@@ -553,8 +547,8 @@ SubGhzViewReceiver* subghz_view_receiver_alloc() {
|
||||
view_set_enter_callback(subghz_receiver->view, subghz_view_receiver_enter);
|
||||
view_set_exit_callback(subghz_receiver->view, subghz_view_receiver_exit);
|
||||
|
||||
subghz_receiver->scroll_timer = furi_timer_alloc(
|
||||
subghz_view_receiver_scroll_timer_callback, FuriTimerTypePeriodic, subghz_receiver);
|
||||
subghz_receiver->flip_time_timer = furi_timer_alloc(
|
||||
subghz_view_receiver_flip_string_callback, FuriTimerTypeOnce, subghz_receiver);
|
||||
|
||||
with_view_model(
|
||||
subghz_receiver->view,
|
||||
@@ -578,7 +572,7 @@ SubGhzViewReceiver* subghz_view_receiver_alloc() {
|
||||
void subghz_view_receiver_free(SubGhzViewReceiver* subghz_receiver) {
|
||||
furi_assert(subghz_receiver);
|
||||
|
||||
furi_timer_free(subghz_receiver->scroll_timer);
|
||||
furi_timer_free(subghz_receiver->flip_time_timer);
|
||||
|
||||
with_view_model(
|
||||
subghz_receiver->view,
|
||||
|
||||
@@ -655,3 +655,77 @@ type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 3539 1637 533 1225 502 1193 534 375 501 376 501 376 500 1226 501 376 501 376 500 1226 500 1227 501 376 529 1197 558 320 557 319 555 1169 531 1195 531 346 529 1196 530 1198 528 349 526 352 524 1229 497 379 497 379 497 1230 497 380 497 380 497 379 498 380 497 380 497 380 497 380 497 380 497 380 497 380 497 380 497 380 497 380 497 380 497 380 497 9042 3535 1674 496 1230 497 1230 497 380 497 380 497 380 497 1230 497 380 497 380 496 1230 497 1230 497 380 497 1230 497 380 497 380 497 1231 496 1230 497 380 497 1231 496 1231 496 380 496 380 497 1231 496 380 497 380 496 1231 496 380 497 380 497 380 497 380 497 380 497 380 497 380 497 380 497 380 497 380 496 380 497 380 497 380 497 380 497 380 496 381 496 380 497 380 497 380 497 381 496 1231 496 381 496 380 497 380 497 381 496 381 496 1231 496 381 496 381 496 380 497 381 495 1231 496 1231 496 1231 496 380 497 381 496 381 496 380 496 381 496 381 496 381 496 381 496 381 496 1231 496 1231 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 1231 496 381 496 381 496 1232 495 381 495 1232 495 381 496 1231 496 1231 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 496 381 495 381 496 381 496 381 496 381 496 1232 495 381 496 381 496 381 496 381 496 381 495 381 496 381 495 382 495 381 496 382 495 381 495 382 495 381 495 382 495 382 495 382 495 382 495 382 495 382 495 382 495 382 495 382 495 381 495 1232 495 1232 495 1232 495 1232 495 1232 495 382 495 382 495 382 495
|
||||
#
|
||||
# Model: Subtropic SUB/in-07HN1
|
||||
name: Off
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 9019 4453 576 1665 603 1639 602 504 602 505 601 507 599 508 598 1644 573 1669 573 1669 572 1670 572 1670 572 1670 572 1670 572 1670 572 1670 572 535 572 535 572 535 572 535 572 535 572 535 572 1670 572 1670 572 1670 571 535 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 536 571 1670 572 535 572 1670 572 535 572 535 572 536 571 536 571 536 571 536 571 535 572 536 571 536 571 536 571 536 571 536 571 536 571 1670 572 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 537 570 536 571 537 570 536 571 537 570 536 571 537 570 537 570 537 570 537 570 537 570 537 570 538 569 538 569 538 569 561 546 562 545 562 545 562 545 1696 546 562 545 1697 545 562 545 562 545 562 545 562 545 562 545 1696 546 1697 545 1697 545 562 545 562 545 1697 545 1697 545 1697 545
|
||||
#
|
||||
name: Cool_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 9048 4454 577 1665 576 1665 576 531 601 506 600 508 599 509 572 1670 572 1670 572 1670 572 1670 572 1670 572 535 572 535 572 536 571 1670 572 536 571 536 571 536 571 535 572 536 571 536 571 1670 572 1670 572 1671 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 1671 571 536 571 1671 571 536 571 536 571 536 571 536 571 536 571 536 571 537 570 537 570 536 571 537 570 537 570 536 571 537 570 1671 571 537 570 536 571 537 570 536 571 537 570 537 570 537 570 537 570 536 571 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 1671 571 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 571 537 570 537 570 1672 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 1672 570 1672 570 538 569 1672 570 537 570 537 570 1672 570 1672 570
|
||||
#
|
||||
name: Heat_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 9049 4454 603 1638 604 1638 603 504 602 506 600 507 600 508 598 1644 573 1670 572 1670 572 1670 572 1670 572 535 572 535 572 535 572 1670 597 1645 572 535 573 535 572 535 597 510 573 535 572 1670 572 1670 572 1670 572 535 597 510 572 535 573 535 572 535 572 535 572 535 572 535 572 535 572 535 572 536 571 535 572 535 572 1670 572 536 571 1671 571 536 571 536 571 536 572 536 571 536 571 536 572 536 571 536 571 536 571 536 571 536 571 536 571 536 571 537 570 537 570 1672 570 537 570 537 570 537 570 538 569 537 570 537 570 561 546 562 545 562 545 562 546 562 545 562 545 562 545 562 546 562 545 562 545 562 545 562 545 562 546 562 545 1697 545 1697 545 562 545 562 545 562 545 562 545 562 545 562 545 562 546 562 545 562 545 562 545 562 545 562 545 563 544 562 546 562 545 563 544 562 545 562 545 562 545 1697 545 563 545 1697 545 1698 544 1697 545 563 544 1698 544
|
||||
#
|
||||
name: Heat_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 9048 4454 576 1665 602 1640 603 504 602 506 600 507 599 509 573 1669 573 1670 572 1670 572 1670 572 1670 572 1670 572 1670 572 1670 572 1670 572 535 572 535 573 535 572 535 572 535 572 535 573 1670 572 1670 572 1670 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 535 572 1670 572 535 572 1670 572 535 572 535 572 536 572 535 572 535 572 535 572 535 572 536 571 535 572 536 571 535 572 536 571 536 571 536 571 536 571 1671 571 536 571 536 571 536 571 536 596 511 571 536 572 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 572 536 571 1671 595 1647 571 536 571 536 571 536 572 536 571 536 595 512 571 536 571 536 571 536 572 536 571 1671 571 536 571 536 571 537 570 536 571 536 571 537 570 537 570 1672 570 1671 571 537 570 537 571 1671 571 1672 570 1672 570 537 570
|
||||
#
|
||||
name: Cool_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 9017 4455 577 1665 576 1665 576 531 575 532 600 508 574 535 572 1670 572 1671 571 1671 571 1671 571 1671 571 1671 571 1671 571 1671 571 1671 571 536 571 536 571 536 571 536 571 536 571 536 571 1671 571 1671 571 1671 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 536 571 1671 571 536 571 1671 571 537 570 537 570 537 570 537 570 537 570 537 570 537 570 538 569 538 569 538 569 538 569 538 569 538 569 1695 546 538 569 561 546 561 546 561 546 561 546 561 546 561 546 561 546 561 546 561 546 561 546 561 546 561 546 561 546 561 546 561 546 561 546 561 546 561 546 562 545 561 546 561 546 561 546 1696 545 562 545 562 545 562 545 562 545 562 545 562 545 562 545 562 545 562 545 562 545 562 545 562 545 562 545 563 544 563 544 563 544 563 544 563 544 563 544 1698 544 563 544 564 543 563 544 564 543 564 543 564 543
|
||||
#
|
||||
name: Dh
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 9046 4455 577 1665 577 1665 576 531 601 506 600 508 599 509 573 1670 572 1670 572 1670 572 1671 571 1670 572 1671 571 1671 571 1671 571 1671 571 536 571 536 571 536 571 536 571 536 571 536 571 1671 571 1671 571 1671 571 536 571 536 571 536 571 536 571 536 571 536 571 537 570 536 571 536 571 536 571 536 571 537 570 536 571 1672 570 537 570 1671 571 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 537 570 1672 570 537 570 538 569 538 569 537 570 537 570 537 570 537 570 537 570 538 569 537 570 538 569 537 570 538 569 538 569 538 569 538 569 562 545 561 546 539 569 561 546 562 545 562 545 1696 546 562 545 562 546 562 545 562 545 562 545 562 545 562 545 562 545 562 545 562 545 1696 546 562 545 562 545 562 545 562 545 562 545 562 545 562 545 1697 545 1697 545 562 545 562 545 562 545 1697 545 562 545 562 545
|
||||
#
|
||||
# Model: Hitachi RAK-50PEB
|
||||
name: Off
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 30683 50966 3411 1600 493 1186 493 347 492 348 491 348 491 349 490 349 490 350 489 351 488 351 488 352 487 352 488 351 488 1192 487 352 487 351 488 352 487 352 487 352 488 352 488 351 488 1192 487 1191 488 352 487 352 487 352 487 352 487 352 487 352 487 352 487 352 487 1192 487 352 487 1192 487 1192 487 1192 487 1192 488 1192 487 1192 488 352 487 1192 487 1192 487 352 487 352 487 352 487 352 488 352 487 352 488 352 487 352 487 1192 487 1192 487 1192 487 1192 487 1192 487 1192 487 1192 487 1192 487 352 487 352 488 352 487 1192 487 352 487 352 487 352 487 352 487 1192 487 352 487 353 486 1192 487 353 486 353 486 353 486 353 486 1193 486 353 487 353 486 353 486 353 486 353 486 353 486 1193 486 1193 486 353 487 353 486 353 486 353 486 353 487 353 486 353 486 353 486 1193 486 353 486 353 486 1193 486 353 487 353 486 353 487 353 486 353 486 353 486 353 486 353 487 353 486 353 486 1193 486 1193 486 353 487 353 486 353 486 353 486 354 485 353 486 354 485 353 486 354 486 353 486 353 486 354 486 353 486 353 487 1193 486 1194 485 353 487 353 486 354 485 354 485 354 486 354 485 354 485 354 485 354 485 354 485 354 485 354 485 354 485 354 485 354 486 354 485 354 485 354 485 354 485 354 485 354 485 354 485 354 485 354 485 354 486 354 485 354 485 354 485 354 485 354 485 354 485 354 485 354 485 354 485 354 485 354 485 354 485 355 484 355 484 355 484 354 485 354 485 355 484 355 484 355 484 355 484 354 486 355 484 378 461 356 484 378 461 355 485 355 484 355 484 355 485 355 484 378 461 378 461 355 484 356 483 355 484 378 461 378 462 355 485 378 461 378 462 378 461 379 461 356 483 378 461 1195 484 378 461 379 461 356 484 378 461 379 460 379 461 378 461 378 462 378 461 379 461 378 461 378 461 379 460 379 460 379 461 378 461 378 461 378 461 378 461 378 461 379 460 379 460 379 460 379 461 379 460 1219 460 1219 460 379 461 1219 460 379 461 1219 460
|
||||
#
|
||||
name: Dh
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 30684 50965 3412 1599 494 1185 494 346 493 346 493 347 492 348 491 349 490 349 490 350 489 351 489 350 489 350 489 351 489 1191 488 351 488 351 488 351 489 351 488 351 488 351 488 351 488 1191 488 1191 488 351 488 351 488 351 488 351 488 351 488 351 489 351 488 351 488 1191 488 351 489 1191 488 1191 488 1191 488 1191 488 1191 488 1191 488 351 488 1191 488 1192 487 351 488 352 487 351 488 351 488 352 487 352 487 352 487 352 488 1192 487 1192 487 1216 463 1192 487 1192 488 1192 487 1193 486 1192 488 352 487 352 487 352 487 1193 486 376 463 376 463 376 464 352 487 1216 463 376 463 376 463 1216 464 376 463 376 463 376 463 1216 463 376 463 376 463 353 486 353 487 376 463 376 463 376 463 1216 463 376 463 1216 463 376 464 376 463 376 463 376 464 376 463 376 463 376 463 376 463 1216 463 376 463 1216 463 376 463 376 463 376 463 376 463 376 463 376 463 376 463 376 463 376 464 376 463 1216 463 1217 463 376 463 377 462 377 462 377 463 376 463 376 463 377 462 376 463 377 462 377 462 377 463 376 463 377 462 377 462 1217 462 1216 463 377 463 377 462 377 462 377 462 377 463 376 463 377 462 377 463 377 462 377 462 377 462 377 462 377 462 377 462 377 462 377 462 377 463 377 462 377 463 377 462 377 462 1217 462 377 462 377 462 377 463 377 462 377 463 377 462 377 462 377 462 377 462 377 463 377 462 377 462 377 462 377 462 377 462 377 463 377 462 377 462 377 462 377 462 377 462 377 462 377 463 377 462 377 462 377 462 377 462 377 462 377 462 377 462 377 462 377 462 377 462 377 462 377 463 377 462 377 463 377 462 377 462 377 462 377 462 377 462 377 462 377 462 377 462 377 462 377 462 377 462 1217 462 377 462 377 462 377 462 377 462 378 461 377 462 377 462 378 462 377 462 377 462 377 463 377 462 378 461 378 462 377 462 378 461 377 462 378 461 378 461 378 461 378 462 377 462 378 462 1217 462 1218 461 1218 461 378 461 378 461 1218 462 377 462 378 462
|
||||
#
|
||||
name: Cool_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 30747 50897 3484 1554 543 1137 542 310 529 309 530 309 530 309 530 310 529 309 530 310 529 309 530 309 530 309 530 309 530 1138 541 309 531 309 530 309 530 309 530 309 530 309 530 309 530 1138 541 1138 541 310 529 309 530 309 531 309 530 309 530 309 530 309 530 310 529 1139 541 309 530 1138 541 1138 541 1138 541 1138 542 1138 541 1138 541 310 529 1138 541 1138 541 309 530 309 530 309 531 310 529 309 530 309 530 309 530 309 530 1139 541 1139 540 1139 541 1138 541 1139 540 1139 540 1138 541 1139 540 310 529 310 529 309 530 1139 541 310 529 309 530 309 530 309 530 1139 540 309 530 309 530 1139 541 309 530 309 530 309 530 1139 540 309 531 309 530 1139 541 309 530 309 530 309 530 309 530 309 530 309 530 1139 540 309 531 309 530 309 530 309 530 309 530 309 530 309 531 309 530 309 531 309 530 1139 540 310 529 309 530 309 530 309 530 309 530 309 531 310 529 310 529 309 531 310 529 1140 540 309 530 309 531 309 530 309 530 309 530 309 531 309 530 309 530 309 530 309 530 309 531 309 530 309 531 309 530 310 529 1140 539 1140 539 309 530 309 530 309 530 309 530 310 529 309 530 309 530 309 530 309 530 309 531 309 530 309 530 309 530 309 530 309 530 309 531 309 530 309 530 309 530 309 530 309 530 1140 540 309 530 309 530 309 530 309 530 309 531 309 530 309 531 309 530 309 530 310 530 309 530 309 531 309 530 309 530 309 530 309 530 309 530 309 531 309 530 309 530 309 531 309 530 309 530 309 531 309 531 309 530 309 530 309 530 309 530 309 531 309 531 309 530 309 530 309 530 309 530 309 530 309 531 309 530 309 531 309 530 309 531 309 530 309 530 309 531 309 530 309 530 309 530 309 530 1141 538 309 531 309 530 309 530 309 530 309 531 309 530 309 530 309 530 309 531 309 530 309 530 309 530 309 530 309 530 309 530 309 530 310 530 309 531 309 530 309 530 309 530 309 530 309 530 309 531 1142 537 309 530 1142 538 309 530 1141 538 309 530 309 530
|
||||
#
|
||||
name: Cool_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 30694 50951 3483 1555 542 1137 542 308 531 309 530 308 531 308 531 308 531 308 531 308 531 308 531 308 532 308 531 308 532 1139 541 308 531 308 531 308 531 308 531 308 531 309 531 308 531 1139 541 1139 540 308 531 308 531 308 531 308 531 309 530 308 531 308 531 308 532 1139 541 308 532 1139 540 1139 541 1139 540 1139 540 1139 540 1139 541 309 530 1139 540 1139 540 308 531 308 531 308 531 308 532 308 531 308 531 308 531 308 531 1140 540 1139 541 1139 540 1139 540 1139 540 1139 541 1139 540 1139 540 308 531 308 531 308 531 1140 540 309 530 308 531 308 532 308 531 1140 540 308 531 308 532 1140 539 308 531 308 531 308 531 308 532 308 531 308 531 1140 540 308 531 308 531 308 531 308 531 308 532 308 531 1140 540 308 531 308 531 308 531 308 531 308 531 308 531 1140 540 1140 540 1140 539 308 531 1140 539 308 531 308 531 308 532 308 531 306 533 308 531 306 533 308 531 307 533 308 531 1141 539 308 532 308 531 308 531 306 534 306 533 306 534 306 533 306 533 306 533 306 533 306 534 307 532 307 533 306 533 308 532 1141 539 1141 539 308 531 308 532 308 531 307 533 307 481 352 538 307 533 307 532 307 533 307 481 352 539 307 532 307 533 306 482 352 487 352 537 306 534 307 482 352 538 307 482 352 487 1192 539 309 530 307 531 306 483 352 487 352 538 307 482 352 538 306 483 352 487 352 487 352 487 353 486 352 488 353 486 352 487 352 487 353 487 353 486 353 486 353 487 352 487 353 486 353 486 353 486 353 486 353 487 353 487 353 486 353 486 353 487 353 486 353 486 353 486 353 487 353 486 353 487 352 487 353 486 353 486 353 487 353 486 353 486 353 487 353 486 353 487 353 486 353 487 353 486 1193 537 306 483 353 486 353 487 353 486 353 487 353 486 353 486 353 487 353 486 353 486 353 487 353 486 353 486 353 486 353 486 353 487 353 486 353 486 353 486 353 486 353 486 353 486 353 486 1194 485 353 487 1193 538 1142 486 1193 486 353 486 353 486 353 568
|
||||
#
|
||||
name: Heat_hi
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 30703 50953 3432 1606 490 1189 490 349 490 349 490 349 490 350 489 350 489 350 489 350 490 350 489 350 489 350 490 350 489 1190 490 350 489 350 489 350 489 350 489 350 490 350 489 350 490 1190 490 1190 489 350 489 350 489 350 489 350 490 350 490 350 489 350 490 350 490 1190 489 350 490 1190 489 1190 490 1190 489 1190 490 1190 489 1190 489 350 490 1190 489 1190 489 350 490 350 489 350 490 350 489 350 489 350 490 350 489 350 490 1190 489 1190 489 1190 490 1190 489 1190 490 1190 489 1190 489 1191 489 350 489 350 489 350 490 1190 490 350 489 350 490 350 489 350 490 1190 489 350 490 350 489 1190 490 350 489 350 490 350 490 350 489 350 489 350 489 1191 489 350 489 350 490 350 489 350 489 1191 489 1190 489 350 489 350 490 350 489 350 490 350 489 351 489 350 489 350 489 350 489 350 490 350 489 350 489 1191 489 350 489 351 489 351 488 351 489 351 488 351 489 350 489 351 489 351 489 1191 488 351 488 351 488 351 489 350 489 351 488 350 490 350 489 351 488 351 488 351 489 350 489 350 489 351 489 351 489 350 489 1191 488 1191 489 350 489 351 488 351 489 351 488 351 489 351 488 351 488 351 489 351 489 351 489 350 489 351 489 351 488 351 488 351 488 351 489 351 488 351 488 351 488 351 489 351 489 1191 488 351 489 351 488 351 489 351 488 351 489 351 489 351 488 351 488 351 489 351 489 351 488 351 488 351 488 351 489 351 488 351 488 351 489 351 488 351 488 351 489 351 489 351 488 351 488 351 489 351 489 351 488 351 489 351 488 351 489 351 488 351 489 351 488 351 489 351 488 351 489 351 488 351 488 351 489 351 488 351 489 351 489 351 489 351 488 351 489 351 488 351 488 351 489 351 488 1192 488 351 488 351 488 351 489 351 488 351 488 351 489 351 489 351 489 351 488 351 488 351 489 351 488 351 489 351 488 351 489 351 488 351 488 351 489 351 488 351 489 351 488 351 489 351 488 351 489 351 489 1191 488 1191 488 352 488 351 488 352 488 351 489
|
||||
#
|
||||
name: Heat_lo
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.330000
|
||||
data: 30675 50953 3432 1606 490 1190 489 350 489 350 489 350 489 350 489 351 488 350 489 351 489 351 488 351 489 351 488 351 489 1191 488 351 488 351 489 351 488 351 488 351 488 351 489 351 488 1191 489 1191 489 351 488 351 488 351 488 351 488 351 489 351 489 351 488 351 489 1191 488 351 488 1191 489 1191 488 1191 488 1191 488 1191 488 1191 488 351 489 1191 488 1191 489 351 488 351 489 351 488 351 489 351 488 351 488 351 488 351 488 1191 488 1191 488 1191 488 1191 489 1191 488 1191 488 1191 489 1191 488 351 488 351 489 351 488 1191 488 351 489 351 488 351 488 351 489 1191 488 351 489 351 488 1191 488 351 488 351 488 351 489 351 489 351 488 351 489 1191 488 351 488 351 489 351 488 351 488 1191 488 1191 488 351 488 351 489 351 488 351 489 351 488 351 489 351 489 1191 488 1192 488 1191 488 351 489 1191 489 351 488 351 488 351 489 351 489 351 488 351 488 351 489 351 488 351 488 351 488 1192 488 351 489 351 488 351 488 351 489 351 489 351 488 351 488 351 488 352 487 352 488 351 488 352 488 351 488 351 488 351 488 1192 488 1192 487 352 488 352 487 352 487 352 488 352 487 352 488 351 488 352 488 352 488 352 487 352 488 351 488 351 488 352 488 352 487 352 488 352 487 352 488 352 488 352 488 352 487 1192 487 352 487 352 488 352 488 352 488 352 487 352 487 352 488 352 487 352 487 352 487 352 488 352 488 352 487 352 487 352 488 352 487 352 488 352 487 352 487 352 487 352 487 352 487 352 488 352 487 352 487 352 487 352 488 352 487 352 488 352 487 352 488 352 487 352 487 352 488 352 487 352 488 352 487 352 488 352 488 352 487 352 487 352 487 352 487 352 487 352 488 352 487 352 487 352 487 1193 486 352 487 352 488 352 487 352 487 352 488 352 487 352 488 352 488 352 487 352 488 352 487 353 486 353 487 352 487 352 488 352 488 352 487 352 487 352 487 352 487 353 487 352 488 352 488 352 487 1193 486 1193 486 1193 486 1193 487 353 487 352 487 353 486
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Filetype: IR library file
|
||||
Version: 1
|
||||
# Last Updated 16th Jun, 2023
|
||||
# Last Checked 16th Jun, 2023
|
||||
# Last Updated 1st Jul, 2023
|
||||
# Last Checked 1st Jul, 2023
|
||||
#
|
||||
name: Power
|
||||
type: parsed
|
||||
@@ -3662,3 +3662,21 @@ type: parsed
|
||||
protocol: NEC
|
||||
address: 00 00 00 00
|
||||
command: 44 00 00 00
|
||||
#
|
||||
name: Power
|
||||
type: parsed
|
||||
protocol: SIRC15
|
||||
address: 30 00 00 00
|
||||
command: 2F 00 00 00
|
||||
#
|
||||
name: Power
|
||||
type: parsed
|
||||
protocol: NEC
|
||||
address: 80 00 00 00
|
||||
command: 05 00 00 00
|
||||
#
|
||||
name: Vol_up
|
||||
type: parsed
|
||||
protocol: NEC
|
||||
address: 80 00 00 00
|
||||
command: 02 00 00 00
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Filetype: IR library file
|
||||
Version: 1
|
||||
# Last Updated 16th Jun, 2023
|
||||
# Last Checked 16th Jun, 2023
|
||||
# Last Updated 1st Jul, 2023
|
||||
# Last Checked 1st Jul, 2023
|
||||
#
|
||||
name: Power
|
||||
type: raw
|
||||
@@ -1779,3 +1779,57 @@ type: parsed
|
||||
protocol: NEC
|
||||
address: 04 00 00 00
|
||||
command: 07 00 00 00
|
||||
#
|
||||
name: Power
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.33
|
||||
data: 9248 4429 664 479 662 504 663 478 664 478 663 1588 687 1611 663 478 662 480 661 1615 659 1616 659 1616 658 1616 659 483 658 483 658 1616 658 1616 658 1616 658 1617 657 1616 658 483 658 1617 657 483 658 483 658 1616 658 483 658 483 658 483 658 1617 657 483 657 1617 657 1617 657 484 657 39720 9237 2194 658
|
||||
#
|
||||
name: Speed_up
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.33
|
||||
data: 9281 4426 667 503 640 503 666 477 666 477 666 1609 666 1610 665 478 664 480 662 1614 661 1615 661 1615 661 1615 661 482 661 482 661 1615 661 1615 661 482 661 1615 661 1616 660 482 661 483 660 482 661 482 660 1616 660 1616 660 483 660 483 660 1616 659 1616 660 1616 660 1616 659 483 660 39712 9244 2192 659
|
||||
#
|
||||
name: Mode
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.33
|
||||
data: 9278 4401 665 478 663 479 687 479 664 477 664 1586 688 1610 664 478 662 479 661 1614 660 1615 659 1615 660 1615 660 482 659 482 659 1615 660 1615 659 1615 659 1615 659 1615 659 482 659 482 659 482 659 482 659 1615 659 482 659 482 659 482 659 1615 659 1615 659 1615 659 1615 659 482 659
|
||||
#
|
||||
name: Timer
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.33
|
||||
data: 9261 4448 641 499 642 499 642 498 643 498 643 1632 643 1632 667 475 666 475 666 1609 665 1610 664 1611 663 1612 662 479 662 479 662 1613 661 1614 660 479 662 479 662 1613 661 1612 662 1637 637 504 637 504 637 1637 637 1637 637 1613 661 504 637 504 637 504 636 1637 637 1637 637 504 636 39707 9242 2184 662
|
||||
#
|
||||
name: Rotate
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.33
|
||||
data: 9265 4406 688 455 686 479 662 479 662 479 662 1612 661 1613 660 481 659 482 658 1617 657 1618 656 1618 656 1618 656 485 656 485 655 1618 656 1618 656 1618 656 485 655 1618 655 485 656 1618 655 485 656 485 655 1618 655 485 655 1619 655 485 655 1619 654 486 654 1619 655 1619 655 486 654 39717 9230 2198 654
|
||||
#
|
||||
name: Power
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.33
|
||||
data: 1261 422 1260 422 514 1169 1260 422 1260 422 418 1265 418 1266 417 1266 514 1169 514 1169 514 1168 1262 7159 1261 422 1261 422 418 1265 1261 422 1260 422 418 1265 418 1266 417 1266 417 1266 418 1264 419 1265 1261 7159 1260 422 1260 422 418 1265 1261 421 1262 422 418 1266 514 1168 516 1169 515 1167 516 1168 515 1168 1261 7160 1261 422 1261 421 515 1168 1262 422 1261 421 515 1169 515 1167 516 1167 516 1167 516 1168 515 1168 1261 7160 1260 422 1260 422 514 1168 1262 421 1261 421 419 1264 515 1169 515 1169 514 1169 515 1169 515 1168 1262 7160 1260 421 1261 421 418 1266 1260 422 1261 422 417 1265 418 1265 418 1266 417 1265 418 1265 418 1266 1260 7159 1261 422 1260 422 418 1266 1260 421 1261 422 417 1265 418 1266 417 1266 417 1265 418 1266 417 1265 1261
|
||||
#
|
||||
name: Timer
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.33
|
||||
data: 1341 341 1341 341 498 1186 1340 341 1341 342 497 1186 521 1160 499 1186 1340 342 522 1162 521 1162 521 7900 1340 342 1340 343 521 1163 1339 343 1339 343 521 1162 521 1162 521 1162 1340 343 521 1163 521 1163 520 7902 1338 344 1338 343 496 1187 1340 343 1339 343 521 1164 520 1164 519 1163 1339 344 519 1163 496 1187 521 7901 1339 343 1339 344 495 1187 1340 342 1341 343 496 1187 497 1186 497 1187 1340 343 496 1188 495 1187 496 7927 1337 343 1339 343 496 1187 1339 343 1339 343 496 1188 520 1163 520 1163 1340 343 496 1187 520 1163 520
|
||||
#
|
||||
name: Mode
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.33
|
||||
data: 1342 341 1341 340 500 1183 1343 341 1341 341 499 1184 499 1184 499 1184 499 1183 1343 340 499 1185 499 7923 1341 340 1342 341 498 1184 1342 341 1341 341 498 1185 498 1186 497 1184 500 1186 1341 342 497 1185 498 7923 1341 342 1340 342 497 1185 1342 341 1341 342 521 1162 498 1186 497 1185 498 1186 1340 342 521 1162 521 7899 1341 341 1341 341 498 1185 1341 342 1340 341 498 1186 497 1185 499 1185 498 1185 1341 341 498 1185 499 7923 1341 342 1341 341 499 1184 1342 342 1341 342 497 1184 499 1185 498 1184 499 1185 1341 342 497 1185 499 7922 1342 341 1341 341 499 1185 1341 341 1341 341 499 1183 500 1185 498 1185 498 1184 1342 342 497 1185 499
|
||||
#
|
||||
name: Rotate
|
||||
type: raw
|
||||
frequency: 38000
|
||||
duty_cycle: 0.33
|
||||
data: 1286 396 1287 396 444 1240 1286 396 1286 397 443 1239 444 1240 1285 396 444 1239 444 1240 443 1241 442 7977 1286 396 1286 396 500 1183 1287 396 1286 395 501 1183 501 1184 1286 395 500 1184 499 1183 500 1183 501 7922 1340 341 1341 341 499 1184 1342 341 1341 340 500 1184 499 1183 1343 340 500 1184 499 1183 500 1184 499 7922 1342 340 1342 340 500 1184 1342 340 1342 340 500 1185 498 1184 1342 340 500 1184 499 1184 499 1186 498 7922 1341 341 1341 341 499 1184 1342 341 1341 340 500 1183 500 1184 1342 341 499 1184 500 1184 499 1184 499
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Filetype: IR library file
|
||||
Version: 1
|
||||
# Last Updated 16th Jun, 2023
|
||||
# Last Checked 16th Jun, 2023
|
||||
# Last Checked 1st Jul, 2023
|
||||
#
|
||||
# ON
|
||||
name: Power
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Filetype: IR library file
|
||||
Version: 1
|
||||
# Last Updated 16th Jun, 2023
|
||||
# Last Checked 16th Jun, 2023
|
||||
# Last Updated 1st Jul, 2023
|
||||
# Last Checked 1st Jul, 2023
|
||||
#
|
||||
name: Power
|
||||
type: parsed
|
||||
@@ -2052,7 +2052,7 @@ protocol: Samsung32
|
||||
address: 3E 00 00 00
|
||||
command: 0D 00 00 00
|
||||
#
|
||||
# TCL LED49D2930
|
||||
# TCL LED49D2930 / Thomson Remote RC3000E02
|
||||
#
|
||||
name: Power
|
||||
type: parsed
|
||||
|
||||
@@ -2873,6 +2873,7 @@ Function,+,subghz_receiver_search_decoder_base_by_name,SubGhzProtocolDecoderBase
|
||||
Function,+,subghz_receiver_set_filter,void,"SubGhzReceiver*, SubGhzProtocolFlag"
|
||||
Function,+,subghz_receiver_set_rx_callback,void,"SubGhzReceiver*, SubGhzReceiverCallback, void*"
|
||||
Function,+,subghz_setting_alloc,SubGhzSetting*,
|
||||
Function,-,subghz_setting_customs_presets_to_log,uint8_t,SubGhzSetting*
|
||||
Function,+,subghz_setting_delete_custom_preset,_Bool,"SubGhzSetting*, const char*"
|
||||
Function,+,subghz_setting_free,void,SubGhzSetting*
|
||||
Function,+,subghz_setting_get_default_frequency,uint32_t,SubGhzSetting*
|
||||
|
||||
|
@@ -63,7 +63,8 @@ const SubGhzProtocolEncoder subghz_protocol_kia_encoder = {
|
||||
const SubGhzProtocol subghz_protocol_kia = {
|
||||
.name = SUBGHZ_PROTOCOL_KIA_NAME,
|
||||
.type = SubGhzProtocolTypeDynamic,
|
||||
.flag = SubGhzProtocolFlag_433 | SubGhzProtocolFlag_FM | SubGhzProtocolFlag_Decodable,
|
||||
.flag = SubGhzProtocolFlag_433 | SubGhzProtocolFlag_FM | SubGhzProtocolFlag_Decodable |
|
||||
SubGhzProtocolFlag_AutoAlarms,
|
||||
|
||||
.decoder = &subghz_protocol_kia_decoder,
|
||||
.encoder = &subghz_protocol_kia_encoder,
|
||||
|
||||
@@ -64,7 +64,8 @@ const SubGhzProtocol subghz_protocol_magellan = {
|
||||
.name = SUBGHZ_PROTOCOL_MAGELLAN_NAME,
|
||||
.type = SubGhzProtocolTypeStatic,
|
||||
.flag = SubGhzProtocolFlag_433 | SubGhzProtocolFlag_AM | SubGhzProtocolFlag_Decodable |
|
||||
SubGhzProtocolFlag_Load | SubGhzProtocolFlag_Save | SubGhzProtocolFlag_Send,
|
||||
SubGhzProtocolFlag_Load | SubGhzProtocolFlag_Save | SubGhzProtocolFlag_Send |
|
||||
SubGhzProtocolFlag_Magelan,
|
||||
|
||||
.decoder = &subghz_protocol_magellan_decoder,
|
||||
.encoder = &subghz_protocol_magellan_encoder,
|
||||
|
||||
@@ -70,7 +70,7 @@ const SubGhzProtocol subghz_protocol_scher_khan = {
|
||||
.name = SUBGHZ_PROTOCOL_SCHER_KHAN_NAME,
|
||||
.type = SubGhzProtocolTypeDynamic,
|
||||
.flag = SubGhzProtocolFlag_433 | SubGhzProtocolFlag_FM | SubGhzProtocolFlag_Decodable |
|
||||
SubGhzProtocolFlag_Save,
|
||||
SubGhzProtocolFlag_Save | SubGhzProtocolFlag_AutoAlarms,
|
||||
|
||||
.decoder = &subghz_protocol_scher_khan_decoder,
|
||||
.encoder = &subghz_protocol_scher_khan_encoder,
|
||||
|
||||
@@ -79,7 +79,8 @@ const SubGhzProtocol subghz_protocol_star_line = {
|
||||
.name = SUBGHZ_PROTOCOL_STAR_LINE_NAME,
|
||||
.type = SubGhzProtocolTypeDynamic,
|
||||
.flag = SubGhzProtocolFlag_433 | SubGhzProtocolFlag_AM | SubGhzProtocolFlag_Decodable |
|
||||
SubGhzProtocolFlag_Load | SubGhzProtocolFlag_Save | SubGhzProtocolFlag_Send,
|
||||
SubGhzProtocolFlag_Load | SubGhzProtocolFlag_Save | SubGhzProtocolFlag_Send |
|
||||
SubGhzProtocolFlag_StarLine,
|
||||
|
||||
.decoder = &subghz_protocol_star_line_decoder,
|
||||
.encoder = &subghz_protocol_star_line_encoder,
|
||||
|
||||
@@ -474,3 +474,35 @@ uint32_t subghz_setting_get_default_frequency(SubGhzSetting* instance) {
|
||||
return subghz_setting_get_frequency(
|
||||
instance, subghz_setting_get_frequency_default_index(instance));
|
||||
}
|
||||
|
||||
uint8_t subghz_setting_customs_presets_to_log(SubGhzSetting* instance) {
|
||||
furi_assert(instance);
|
||||
#ifndef FURI_DEBUG
|
||||
FURI_LOG_I(TAG, "Logging loaded presets allow only Debug build");
|
||||
#else
|
||||
uint8_t count = 0;
|
||||
FuriString* temp = furi_string_alloc();
|
||||
|
||||
FURI_LOG_I(TAG, "Loaded presets");
|
||||
for
|
||||
M_EACH(item, instance->preset->data, SubGhzSettingCustomPresetItemArray_t) {
|
||||
furi_string_reset(temp);
|
||||
|
||||
for(uint8_t i = 0; i < item->custom_preset_data_size; i++) {
|
||||
furi_string_cat_printf(temp, "%02u ", item->custom_preset_data[i]);
|
||||
}
|
||||
|
||||
FURI_LOG_I(
|
||||
TAG, "%u - %s", count + 1, furi_string_get_cstr(item->custom_preset_name));
|
||||
FURI_LOG_I(TAG, " Size: %u", item->custom_preset_data_size);
|
||||
FURI_LOG_I(TAG, " Data: %s", furi_string_get_cstr(temp));
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
furi_string_free(temp);
|
||||
|
||||
return count;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,8 @@ uint32_t subghz_setting_get_default_frequency(SubGhzSetting* instance);
|
||||
|
||||
void subghz_setting_set_default_frequency(SubGhzSetting* instance, uint32_t frequency_to_setup);
|
||||
|
||||
uint8_t subghz_setting_customs_presets_to_log(SubGhzSetting* instance);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -117,6 +117,9 @@ typedef enum {
|
||||
SubGhzProtocolFlag_Load = (1 << 8),
|
||||
SubGhzProtocolFlag_Send = (1 << 9),
|
||||
SubGhzProtocolFlag_BinRAW = (1 << 10),
|
||||
SubGhzProtocolFlag_StarLine = (1 << 11),
|
||||
SubGhzProtocolFlag_AutoAlarms = (1 << 12),
|
||||
SubGhzProtocolFlag_Magelan = (1 << 13),
|
||||
} SubGhzProtocolFlag;
|
||||
|
||||
struct SubGhzProtocol {
|
||||
|
||||
Reference in New Issue
Block a user