diff options
author | Anna Prosvetova <anna@prosvetova.me> | 2021-11-12 16:04:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-12 16:04:35 +0300 |
commit | 558fa5670bb624c63c03f76f9f434dc7189f2aa9 (patch) | |
tree | 0a4f521af9d25fde4258bfd6d0feac5f9f05ee45 /applications/subghz | |
parent | b564e8eb3851d976f5e690aaaa13db7c653c7455 (diff) |
RPC: Add Virtual Display & Unify log tags (#814)
* RPC: Update protobuf sources
* RPC: Add Virtual Display
* Unify log tags
* RPC: Virtual Display placeholder
* Rpc: clear frame buffer callback before confirm.
* Firmware: full assert for hal, move fatfs initialization to furi hal.
* FuriHal: VCP optimizations, thread safe console. Rpc: adjust buffer sizes.
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Diffstat (limited to 'applications/subghz')
-rw-r--r-- | applications/subghz/subghz_i.c | 29 | ||||
-rw-r--r-- | applications/subghz/views/subghz_test_static.c | 6 |
2 files changed, 19 insertions, 16 deletions
diff --git a/applications/subghz/subghz_i.c b/applications/subghz/subghz_i.c index 26472901..ce693991 100644 --- a/applications/subghz/subghz_i.c +++ b/applications/subghz/subghz_i.c @@ -20,7 +20,7 @@ bool subghz_set_pteset(SubGhz* subghz, const char* preset) { } else if(!strcmp(preset, "FuriHalSubGhzPreset2FSKDev476Async")) { subghz->txrx->preset = FuriHalSubGhzPreset2FSKDev476Async; } else { - FURI_LOG_E(SUBGHZ_KEY_TAG, "Unknown preset"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "Unknown preset"); return false; } return true; @@ -41,7 +41,7 @@ bool subghz_get_preset_name(SubGhz* subghz, string_t preset) { case FuriHalSubGhzPreset2FSKDev476Async: preset_name = "FuriHalSubGhzPreset2FSKDev476Async"; break; - FURI_LOG_E(SUBGHZ_KEY_TAG, "Unknown preset"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "Unknown preset"); default: return false; break; @@ -210,11 +210,12 @@ bool subghz_key_load(SubGhz* subghz, const char* file_path) { do { if(!flipper_file_open_existing(flipper_file, string_get_cstr(path))) { - FURI_LOG_E(SUBGHZ_KEY_TAG, "Unable to open file for read: %s", string_get_cstr(path)); + FURI_LOG_E( + SUBGHZ_PARSER_TAG, "Unable to open file for read: %s", string_get_cstr(path)); break; } if(!flipper_file_read_header(flipper_file, temp_str, &version)) { - FURI_LOG_E(SUBGHZ_KEY_TAG, "Missing or incorrect header"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "Missing or incorrect header"); break; } @@ -222,18 +223,18 @@ bool subghz_key_load(SubGhz* subghz, const char* file_path) { (!strcmp(string_get_cstr(temp_str), SUBGHZ_RAW_FILE_TYPE))) && version == SUBGHZ_KEY_FILE_VERSION) { } else { - FURI_LOG_E(SUBGHZ_KEY_TAG, "Type or version mismatch"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "Type or version mismatch"); break; } if(!flipper_file_read_uint32( flipper_file, "Frequency", (uint32_t*)&subghz->txrx->frequency, 1)) { - FURI_LOG_E(SUBGHZ_KEY_TAG, "Missing Frequency"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "Missing Frequency"); break; } if(!flipper_file_read_string(flipper_file, "Preset", temp_str)) { - FURI_LOG_E(SUBGHZ_KEY_TAG, "Missing Preset"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "Missing Preset"); break; } if(!subghz_set_pteset(subghz, string_get_cstr(temp_str))) { @@ -241,14 +242,14 @@ bool subghz_key_load(SubGhz* subghz, const char* file_path) { } if(!flipper_file_read_string(flipper_file, "Protocol", temp_str)) { - FURI_LOG_E(SUBGHZ_KEY_TAG, "Missing Protocol"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "Missing Protocol"); break; } subghz->txrx->protocol_result = subghz_parser_get_by_name(subghz->txrx->parser, string_get_cstr(temp_str)); if(subghz->txrx->protocol_result == NULL) { - FURI_LOG_E(SUBGHZ_KEY_TAG, "This type of protocol was not found"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "This type of protocol was not found"); break; } if(!subghz->txrx->protocol_result->to_load_protocol_from_file( @@ -310,7 +311,7 @@ bool subghz_save_protocol_to_file(SubGhz* subghz, const char* dev_name) { do { // Checking that this type of people can be saved if(subghz->txrx->protocol_result->to_save_file == NULL) { - FURI_LOG_E(SUBGHZ_KEY_TAG, "No saving of this type of keys"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "No saving of this type of keys"); break; } // Create subghz folder directory if necessary @@ -334,19 +335,19 @@ bool subghz_save_protocol_to_file(SubGhz* subghz, const char* dev_name) { // Open file if(!flipper_file_open_always(flipper_file, string_get_cstr(dev_file_name))) { - FURI_LOG_E(SUBGHZ_KEY_TAG, "Unable to open file for write: %s", dev_file_name); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "Unable to open file for write: %s", dev_file_name); break; } if(!flipper_file_write_header_cstr( flipper_file, SUBGHZ_KEY_FILE_TYPE, SUBGHZ_KEY_FILE_VERSION)) { - FURI_LOG_E(SUBGHZ_KEY_TAG, "Unable to add header"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "Unable to add header"); break; } if(!flipper_file_write_uint32( flipper_file, "Frequency", (uint32_t*)&subghz->txrx->frequency, 1)) { - FURI_LOG_E(SUBGHZ_KEY_TAG, "Unable to add Frequency"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "Unable to add Frequency"); break; } @@ -354,7 +355,7 @@ bool subghz_save_protocol_to_file(SubGhz* subghz, const char* dev_name) { break; } if(!flipper_file_write_string_cstr(flipper_file, "Preset", string_get_cstr(temp_str))) { - FURI_LOG_E(SUBGHZ_KEY_TAG, "Unable to add Preset"); + FURI_LOG_E(SUBGHZ_PARSER_TAG, "Unable to add Preset"); break; } diff --git a/applications/subghz/views/subghz_test_static.c b/applications/subghz/views/subghz_test_static.c index aa701464..bc672406 100644 --- a/applications/subghz/views/subghz_test_static.c +++ b/applications/subghz/views/subghz_test_static.c @@ -8,6 +8,8 @@ #include <notification/notification-messages.h> #include <lib/subghz/protocols/subghz_protocol_princeton.h> +#define TAG "SubGhzTestStatic" + typedef enum { SubghzTestStaticStatusIDLE, SubghzTestStaticStatusTX, @@ -99,7 +101,7 @@ bool subghz_test_static_input(InputEvent* event, void* context) { } else { notification_message_block(notification, &sequence_set_red_255); - FURI_LOG_I("SubghzTestStatic", "TX Start"); + FURI_LOG_I(TAG, "TX Start"); subghz_encoder_princeton_set( instance->encoder, subghz_test_static_keys[model->button], 10000); @@ -110,7 +112,7 @@ bool subghz_test_static_input(InputEvent* event, void* context) { } } else if(event->type == InputTypeRelease) { if(instance->satus_tx == SubghzTestStaticStatusTX) { - FURI_LOG_I("SubghzTestStatic", "TX Stop"); + FURI_LOG_I(TAG, "TX Stop"); subghz_encoder_princeton_print_log(instance->encoder); furi_hal_subghz_stop_async_tx(); notification_message(notification, &sequence_reset_red); |