mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
SubGHz decoders can provide a one-line string to be used in the history list
This commit is contained in:
@@ -265,7 +265,6 @@ bool subghz_history_add_to_history(
|
||||
instance->code_last_hash_data = hash_data;
|
||||
instance->last_update_timestamp = furi_get_tick();
|
||||
|
||||
FuriString* text = furi_string_alloc();
|
||||
SubGhzHistoryItem* item = SubGhzHistoryItemArray_push_raw(instance->history->data);
|
||||
item->preset = malloc(sizeof(SubGhzRadioPreset));
|
||||
item->type = decoder_base->protocol->type;
|
||||
@@ -285,6 +284,15 @@ bool subghz_history_add_to_history(
|
||||
item->flipper_string = flipper_format_string_alloc();
|
||||
subghz_protocol_decoder_base_serialize(decoder_base, item->flipper_string, preset);
|
||||
|
||||
if(decoder_base->protocol && decoder_base->protocol->decoder &&
|
||||
decoder_base->protocol->decoder->get_string_brief) {
|
||||
decoder_base->protocol->decoder->get_string_brief(decoder_base, item->item_str);
|
||||
instance->last_index_write++;
|
||||
return true;
|
||||
}
|
||||
|
||||
FuriString* text = furi_string_alloc();
|
||||
|
||||
do {
|
||||
if(!flipper_format_rewind(item->flipper_string)) {
|
||||
FURI_LOG_E(TAG, "Rewind error");
|
||||
|
||||
Reference in New Issue
Block a user