Sub-GHz: Move Weather, POCSAG & TPMS to ext apps

This commit is contained in:
WillyJL
2025-06-24 04:08:16 +01:00
parent 99495b75f4
commit 9671c878bc
8 changed files with 78 additions and 65 deletions
@@ -19,8 +19,8 @@ enum SubGhzSettingIndex {
SubGhzSettingIndexIgnoreMagellan,
SubGhzSettingIndexIgnorePrinceton,
SubGhzSettingIndexIgnoreNiceFlorS,
SubGhzSettingIndexIgnoreWeather,
SubGhzSettingIndexIgnoreTPMS,
// SubGhzSettingIndexIgnoreWeather,
// SubGhzSettingIndexIgnoreTPMS,
SubGhzSettingIndexSound,
SubGhzSettingIndexResetToDefault,
SubGhzSettingIndexLock,
@@ -431,12 +431,13 @@ static void subghz_scene_receiver_config_set_niceflors(VariableItem* item) {
subghz_scene_receiver_config_set_ignore_filter(item, SubGhzProtocolFilter_NiceFlorS);
}
static void subghz_scene_receiver_config_set_weather(VariableItem* item) {
subghz_scene_receiver_config_set_ignore_filter(item, SubGhzProtocolFilter_Weather);
}
static void subghz_scene_receiver_config_set_tpms(VariableItem* item) {
subghz_scene_receiver_config_set_ignore_filter(item, SubGhzProtocolFilter_TPMS);
}
// static void subghz_scene_receiver_config_set_weather(VariableItem* item) {
// subghz_scene_receiver_config_set_ignore_filter(item, SubGhzProtocolFilter_Weather);
// }
// static void subghz_scene_receiver_config_set_tpms(VariableItem* item) {
// subghz_scene_receiver_config_set_ignore_filter(item, SubGhzProtocolFilter_TPMS);
// }
static void subghz_scene_receiver_config_var_list_enter_callback(void* context, uint32_t index) {
furi_assert(context);
@@ -664,29 +665,29 @@ void subghz_scene_receiver_config_on_enter(void* context) {
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, combobox_text[value_index]);
item = variable_item_list_add(
subghz->variable_item_list,
"Ignore Weather",
COMBO_BOX_COUNT,
subghz_scene_receiver_config_set_weather,
subghz);
// item = variable_item_list_add(
// subghz->variable_item_list,
// "Ignore Weather",
// COMBO_BOX_COUNT,
// subghz_scene_receiver_config_set_weather,
// subghz);
value_index = subghz_scene_receiver_config_ignore_filter_get_index(
subghz->ignore_filter, SubGhzProtocolFilter_Weather);
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, combobox_text[value_index]);
// value_index = subghz_scene_receiver_config_ignore_filter_get_index(
// subghz->ignore_filter, SubGhzProtocolFilter_Weather);
// variable_item_set_current_value_index(item, value_index);
// variable_item_set_current_value_text(item, combobox_text[value_index]);
item = variable_item_list_add(
subghz->variable_item_list,
"Ignore TPMS",
COMBO_BOX_COUNT,
subghz_scene_receiver_config_set_tpms,
subghz);
// item = variable_item_list_add(
// subghz->variable_item_list,
// "Ignore TPMS",
// COMBO_BOX_COUNT,
// subghz_scene_receiver_config_set_tpms,
// subghz);
value_index = subghz_scene_receiver_config_ignore_filter_get_index(
subghz->ignore_filter, SubGhzProtocolFilter_TPMS);
variable_item_set_current_value_index(item, value_index);
variable_item_set_current_value_text(item, combobox_text[value_index]);
// value_index = subghz_scene_receiver_config_ignore_filter_get_index(
// subghz->ignore_filter, SubGhzProtocolFilter_TPMS);
// variable_item_set_current_value_index(item, value_index);
// variable_item_set_current_value_text(item, combobox_text[value_index]);
}
// Enable speaker, will send all incoming noises and signals to speaker so you can listen how your remote sounds like :)
+5 -5
View File
@@ -266,11 +266,11 @@ bool subghz_history_add_to_history(
SubGhzHistoryItem* item = SubGhzHistoryItemArray_push_raw(instance->history->data);
item->preset = malloc(sizeof(SubGhzRadioPreset));
item->type = decoder_base->protocol->type;
if(decoder_base->protocol->filter & SubGhzProtocolFilter_Weather) {
// Other code uses protocol type to check if signal is usable
// so we can't change the actual protocol type, we fake it here
item->type = SubGhzProtocolWeatherStation;
}
// if(decoder_base->protocol->filter & SubGhzProtocolFilter_Weather) {
// // Other code uses protocol type to check if signal is usable
// // so we can't change the actual protocol type, we fake it here
// item->type = SubGhzProtocolWeatherStation;
// }
item->preset->frequency = preset->frequency;
item->preset->name = furi_string_alloc();
furi_string_set(item->preset->name, preset->name);
+1 -1
View File
@@ -38,7 +38,7 @@ static const Icon* ReceiverItemIcons[] = {
[SubGhzProtocolTypeUnknown] = &I_Quest_7x8,
[SubGhzProtocolTypeStatic] = &I_Static_9x7,
[SubGhzProtocolTypeDynamic] = &I_Dynamic_9x7,
[SubGhzProtocolWeatherStation] = &I_Weather_7x8,
// [SubGhzProtocolWeatherStation] = &I_Weather_7x8,
[SubGhzProtocolTypeBinRAW] = &I_Raw_9x7,
};