[FL-2706, FL-2709] SubGhz: checking saved key files for length (#1485)

* [FL-2706] SubGhz: checking saved key files for length
* SubGhz: fix RAW file upload error
* [FL-2709] GubGhz: RAW screen fix

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Skorpionm
2022-08-01 16:24:21 +04:00
committed by GitHub
parent 84550d5878
commit 4da6eba395
28 changed files with 390 additions and 46 deletions

View File

@@ -331,8 +331,10 @@ bool subghz_key_load(SubGhz* subghz, const char* file_path, bool show_dialog) {
subghz->txrx->decoder_result = subghz_receiver_search_decoder_base_by_name(
subghz->txrx->receiver, string_get_cstr(temp_str));
if(subghz->txrx->decoder_result) {
subghz_protocol_decoder_base_deserialize(
subghz->txrx->decoder_result, subghz->txrx->fff_data);
if(!subghz_protocol_decoder_base_deserialize(
subghz->txrx->decoder_result, subghz->txrx->fff_data)) {
break;
}
} else {
FURI_LOG_E(TAG, "Protocol not found");
break;

View File

@@ -216,8 +216,8 @@ void subghz_read_raw_draw(Canvas* canvas, SubGhzReadRAWModel* model) {
uint8_t graphics_mode = 1;
canvas_set_color(canvas, ColorBlack);
canvas_set_font(canvas, FontSecondary);
canvas_draw_str(canvas, 5, 8, string_get_cstr(model->frequency_str));
canvas_draw_str(canvas, 40, 8, string_get_cstr(model->preset_str));
canvas_draw_str(canvas, 5, 7, string_get_cstr(model->frequency_str));
canvas_draw_str(canvas, 40, 7, string_get_cstr(model->preset_str));
canvas_draw_str_aligned(
canvas, 126, 0, AlignRight, AlignTop, string_get_cstr(model->sample_write));