mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-25 22:32:29 +03:00
Merge branch 'fix-subghz-last-used-settings' into dev
This commit is contained in:
commit
d390381d5a
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include <lib/subghz/protocols/raw.h>
|
#include <lib/subghz/protocols/raw.h>
|
||||||
|
|
||||||
|
#define TAG "SubGhzSceneReceiverConfig"
|
||||||
|
|
||||||
enum SubGhzSettingIndex {
|
enum SubGhzSettingIndex {
|
||||||
SubGhzSettingIndexFrequency,
|
SubGhzSettingIndexFrequency,
|
||||||
SubGhzSettingIndexHopping,
|
SubGhzSettingIndexHopping,
|
||||||
@ -227,7 +229,8 @@ static void subghz_scene_receiver_config_set_hopping_running(VariableItem* item)
|
|||||||
subghz_setting_get_frequency_default_index(subghz->setting));
|
subghz_setting_get_frequency_default_index(subghz->setting));
|
||||||
}
|
}
|
||||||
|
|
||||||
subghz->txrx->hopper_state = subghz->last_setting->hopping = hopping_value[index];
|
subghz->txrx->hopper_state = hopping_value[index];
|
||||||
|
subghz->last_setting->hopping = hopping_value[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void subghz_scene_receiver_config_var_list_enter_callback(void* context, uint32_t index) {
|
static void subghz_scene_receiver_config_var_list_enter_callback(void* context, uint32_t index) {
|
||||||
|
@ -142,7 +142,7 @@ bool subghz_history_add_to_history(
|
|||||||
if((instance->code_last_hash_data ==
|
if((instance->code_last_hash_data ==
|
||||||
subghz_protocol_decoder_base_get_hash_data(decoder_base)) &&
|
subghz_protocol_decoder_base_get_hash_data(decoder_base)) &&
|
||||||
((furi_get_tick() - instance->last_update_timestamp) < 500)) {
|
((furi_get_tick() - instance->last_update_timestamp) < 500)) {
|
||||||
//FURI_LOG_W(TAG, "Too short period for add");
|
FURI_LOG_W(TAG, "Too short period for add");
|
||||||
instance->last_update_timestamp = furi_get_tick();
|
instance->last_update_timestamp = furi_get_tick();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -340,6 +340,7 @@ bool subghz_view_receiver_input(InputEvent* event, void* context) {
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
} else if(event->key == InputKeyLeft && event->type == InputTypeShort) {
|
} else if(event->key == InputKeyLeft && event->type == InputTypeShort) {
|
||||||
|
//Config receiver
|
||||||
subghz_receiver->callback(SubGhzCustomEventViewReceiverConfig, subghz_receiver->context);
|
subghz_receiver->callback(SubGhzCustomEventViewReceiverConfig, subghz_receiver->context);
|
||||||
} else if(event->key == InputKeyOk && event->type == InputTypeShort) {
|
} else if(event->key == InputKeyOk && event->type == InputTypeShort) {
|
||||||
with_view_model(
|
with_view_model(
|
||||||
|
Loading…
Reference in New Issue
Block a user