Fix typo in subghz (#1467)
* fix typo across subghz Co-authored-by: あく <alleteam@gmail.com> Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
This commit is contained in:
@@ -72,11 +72,11 @@ typedef enum {
|
||||
SubGhzViewIdTestPacket,
|
||||
} SubGhzViewId;
|
||||
|
||||
struct SubGhzPesetDefinition {
|
||||
struct SubGhzPresetDefinition {
|
||||
string_t name;
|
||||
uint32_t frequency;
|
||||
uint8_t* data;
|
||||
size_t data_size;
|
||||
};
|
||||
|
||||
typedef struct SubGhzPesetDefinition SubGhzPesetDefinition;
|
||||
typedef struct SubGhzPresetDefinition SubGhzPresetDefinition;
|
||||
|
@@ -28,8 +28,8 @@ static bool subghz_scene_receiver_info_update_parser(void* context) {
|
||||
subghz->txrx->decoder_result,
|
||||
subghz_history_get_raw_data(subghz->txrx->history, subghz->txrx->idx_menu_chosen));
|
||||
|
||||
SubGhzPesetDefinition* preset =
|
||||
subghz_history_get_presset(subghz->txrx->history, subghz->txrx->idx_menu_chosen);
|
||||
SubGhzPresetDefinition* preset =
|
||||
subghz_history_get_preset_def(subghz->txrx->history, subghz->txrx->idx_menu_chosen);
|
||||
subghz_preset_init(
|
||||
subghz,
|
||||
string_get_cstr(preset->name),
|
||||
|
@@ -199,7 +199,7 @@ SubGhz* subghz_alloc() {
|
||||
//init Worker & Protocol & History & KeyBoard
|
||||
subghz->lock = SubGhzLockOff;
|
||||
subghz->txrx = malloc(sizeof(SubGhzTxRx));
|
||||
subghz->txrx->preset = malloc(sizeof(SubGhzPesetDefinition));
|
||||
subghz->txrx->preset = malloc(sizeof(SubGhzPresetDefinition));
|
||||
string_init(subghz->txrx->preset->name);
|
||||
subghz_preset_init(
|
||||
subghz, "AM650", subghz_setting_get_default_frequency(subghz->setting), NULL, 0);
|
||||
|
@@ -12,7 +12,7 @@ typedef struct {
|
||||
string_t item_str;
|
||||
FlipperFormat* flipper_string;
|
||||
uint8_t type;
|
||||
SubGhzPesetDefinition* preset;
|
||||
SubGhzPresetDefinition* preset;
|
||||
} SubGhzHistoryItem;
|
||||
|
||||
ARRAY_DEF(SubGhzHistoryItemArray, SubGhzHistoryItem, M_POD_OPLIST)
|
||||
@@ -61,7 +61,7 @@ uint32_t subghz_history_get_frequency(SubGhzHistory* instance, uint16_t idx) {
|
||||
return item->preset->frequency;
|
||||
}
|
||||
|
||||
SubGhzPesetDefinition* subghz_history_get_presset(SubGhzHistory* instance, uint16_t idx) {
|
||||
SubGhzPresetDefinition* subghz_history_get_preset_def(SubGhzHistory* instance, uint16_t idx) {
|
||||
furi_assert(instance);
|
||||
SubGhzHistoryItem* item = SubGhzHistoryItemArray_get(instance->history->data, idx);
|
||||
return item->preset;
|
||||
@@ -139,7 +139,7 @@ void subghz_history_get_text_item_menu(SubGhzHistory* instance, string_t output,
|
||||
bool subghz_history_add_to_history(
|
||||
SubGhzHistory* instance,
|
||||
void* context,
|
||||
SubGhzPesetDefinition* preset) {
|
||||
SubGhzPresetDefinition* preset) {
|
||||
furi_assert(instance);
|
||||
furi_assert(context);
|
||||
|
||||
@@ -159,7 +159,7 @@ bool subghz_history_add_to_history(
|
||||
string_t text;
|
||||
string_init(text);
|
||||
SubGhzHistoryItem* item = SubGhzHistoryItemArray_push_raw(instance->history->data);
|
||||
item->preset = malloc(sizeof(SubGhzPesetDefinition));
|
||||
item->preset = malloc(sizeof(SubGhzPresetDefinition));
|
||||
item->type = decoder_base->protocol->type;
|
||||
item->preset->frequency = preset->frequency;
|
||||
string_init(item->preset->name);
|
||||
|
@@ -35,7 +35,7 @@ void subghz_history_reset(SubGhzHistory* instance);
|
||||
*/
|
||||
uint32_t subghz_history_get_frequency(SubGhzHistory* instance, uint16_t idx);
|
||||
|
||||
SubGhzPesetDefinition* subghz_history_get_presset(SubGhzHistory* instance, uint16_t idx);
|
||||
SubGhzPresetDefinition* subghz_history_get_preset_def(SubGhzHistory* instance, uint16_t idx);
|
||||
|
||||
/** Get preset to history[idx]
|
||||
*
|
||||
@@ -88,13 +88,13 @@ bool subghz_history_get_text_space_left(SubGhzHistory* instance, string_t output
|
||||
*
|
||||
* @param instance - SubGhzHistory instance
|
||||
* @param context - SubGhzProtocolCommon context
|
||||
* @param preset - SubGhzPesetDefinition preset
|
||||
* @param preset - SubGhzPresetDefinition preset
|
||||
* @return bool;
|
||||
*/
|
||||
bool subghz_history_add_to_history(
|
||||
SubGhzHistory* instance,
|
||||
void* context,
|
||||
SubGhzPesetDefinition* preset);
|
||||
SubGhzPresetDefinition* preset);
|
||||
|
||||
/** Get SubGhzProtocolCommonLoad to load into the protocol decoder bin data
|
||||
*
|
||||
|
@@ -49,7 +49,7 @@ struct SubGhzTxRx {
|
||||
SubGhzProtocolDecoderBase* decoder_result;
|
||||
FlipperFormat* fff_data;
|
||||
|
||||
SubGhzPesetDefinition* preset;
|
||||
SubGhzPresetDefinition* preset;
|
||||
SubGhzHistory* history;
|
||||
uint16_t idx_menu_chosen;
|
||||
SubGhzTxRxState txrx_state;
|
||||
|
Reference in New Issue
Block a user