mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
SubGhz: rename SubGhzPresetDefinition into SubGhzRadioPreset, cleanup subghz types.
This commit is contained in:
@@ -29,7 +29,7 @@ typedef struct {
|
||||
FuriString* protocol_name;
|
||||
bool is_file;
|
||||
uint8_t type;
|
||||
SubGhzPresetDefinition* preset;
|
||||
SubGhzRadioPreset* preset;
|
||||
} SubGhzHistoryItem;
|
||||
|
||||
ARRAY_DEF(SubGhzHistoryItemArray, SubGhzHistoryItem, M_POD_OPLIST)
|
||||
@@ -194,7 +194,7 @@ uint32_t subghz_history_get_frequency(SubGhzHistory* instance, uint16_t idx) {
|
||||
return item->preset->frequency;
|
||||
}
|
||||
|
||||
SubGhzPresetDefinition* subghz_history_get_preset_def(SubGhzHistory* instance, uint16_t idx) {
|
||||
SubGhzRadioPreset* subghz_history_get_radio_preset(SubGhzHistory* instance, uint16_t idx) {
|
||||
furi_assert(instance);
|
||||
SubGhzHistoryItem* item = SubGhzHistoryItemArray_get(instance->history->data, idx);
|
||||
return item->preset;
|
||||
@@ -321,7 +321,7 @@ void subghz_history_get_text_item_menu(SubGhzHistory* instance, FuriString* outp
|
||||
bool subghz_history_add_to_history(
|
||||
SubGhzHistory* instance,
|
||||
void* context,
|
||||
SubGhzPresetDefinition* preset) {
|
||||
SubGhzRadioPreset* preset) {
|
||||
furi_assert(instance);
|
||||
furi_assert(context);
|
||||
|
||||
@@ -342,7 +342,7 @@ bool subghz_history_add_to_history(
|
||||
FuriString* text;
|
||||
text = furi_string_alloc();
|
||||
SubGhzHistoryItem* item = SubGhzHistoryItemArray_push_raw(instance->history->data);
|
||||
item->preset = malloc(sizeof(SubGhzPresetDefinition));
|
||||
item->preset = malloc(sizeof(SubGhzRadioPreset));
|
||||
item->type = decoder_base->protocol->type;
|
||||
item->preset->frequency = preset->frequency;
|
||||
item->preset->name = furi_string_alloc();
|
||||
|
||||
Reference in New Issue
Block a user