SubGHz: Show Weather Station icon for WS signals

This commit is contained in:
Willy-JL
2024-09-03 01:13:03 +02:00
parent a3e1b66be4
commit aebde09f02
5 changed files with 8 additions and 0 deletions

View File

@@ -269,6 +269,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;
}
item->preset->frequency = preset->frequency;
item->preset->name = furi_string_alloc();
furi_string_set(item->preset->name, preset->name);

View File

@@ -38,6 +38,7 @@ static const Icon* ReceiverItemIcons[] = {
[SubGhzProtocolTypeUnknown] = &I_Quest_7x8,
[SubGhzProtocolTypeStatic] = &I_Static_9x7,
[SubGhzProtocolTypeDynamic] = &I_Dynamic_9x7,
[SubGhzProtocolWeatherStation] = &I_Weather_7x8,
[SubGhzProtocolTypeBinRAW] = &I_Raw_9x7,
};