mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
change: add measure loading to SubGHz
This commit is contained in:
@@ -112,7 +112,9 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
|
||||
|
||||
// Open Notification record
|
||||
subghz->notifications = furi_record_open(RECORD_NOTIFICATION);
|
||||
|
||||
#ifdef SUBGHZ_MEASURE_LOADING
|
||||
uint32_t load_ticks = furi_get_tick();
|
||||
#endif
|
||||
subghz->txrx = subghz_txrx_alloc();
|
||||
|
||||
if(!alloc_for_tx_only) {
|
||||
@@ -229,6 +231,10 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
|
||||
subghz->last_settings->rssi = SUBGHZ_LAST_SETTING_FREQUENCY_ANALYZER_TRIGGER;
|
||||
}
|
||||
}
|
||||
#ifdef SUBGHZ_MEASURE_LOADING
|
||||
load_ticks = furi_get_tick() - load_ticks;
|
||||
FURI_LOG_I(TAG, "Loaded: %ld ms.", load_ticks);
|
||||
#endif
|
||||
//Init Error_str
|
||||
subghz->error_str = furi_string_alloc();
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#define SUBGHZ_MAX_LEN_NAME 64
|
||||
#define SUBGHZ_EXT_PRESET_NAME true
|
||||
#define SUBGHZ_RAW_THRESHOLD_MIN (-90.0f)
|
||||
#define SUBGHZ_MEASURE_LOADING true
|
||||
|
||||
typedef struct {
|
||||
uint8_t fix[4];
|
||||
@@ -106,7 +107,6 @@ bool subghz_tx_start(SubGhz* subghz, FlipperFormat* flipper_format);
|
||||
void subghz_dialog_message_freq_error(SubGhz* subghz, bool only_rx);
|
||||
|
||||
bool subghz_key_load(SubGhz* subghz, const char* file_path, bool show_dialog);
|
||||
// Not used
|
||||
bool subghz_get_next_name_file(SubGhz* subghz, uint8_t max_len);
|
||||
bool subghz_save_protocol_to_file(
|
||||
SubGhz* subghz,
|
||||
|
||||
Reference in New Issue
Block a user