M*LIB: non-inlined strings, FuriString primitive (#1795)

* Quicksave 1
* Header stage complete
* Source stage complete
* Lint & merge fixes
* Includes
* Documentation step 1
* FBT: output free size considering BT STACK
* Documentation step 2
* py lint
* Fix music player plugin
* unit test stage 1: string allocator, mem, getters, setters, appends, compare, search.
* unit test: string equality
* unit test: string replace
* unit test: string start_with, end_with
* unit test: string trim
* unit test: utf-8
* Rename
* Revert fw_size changes
* Simplify CLI backspace handling
* Simplify CLI character insert
* Merge fixes
* Furi: correct filenaming and spelling
* Bt: remove furi string include

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Sergey Gavrilov
2022-10-06 01:15:23 +10:00
committed by GitHub
parent 0f9ea925d3
commit 4bf29827f8
370 changed files with 5597 additions and 3963 deletions

View File

@@ -2,7 +2,6 @@
#include "keeloq_common.h"
#include "../subghz_keystore.h"
#include <m-string.h>
#include <m-array.h>
#include "../blocks/const.h"
@@ -229,7 +228,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
//Simple Learning
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name);
*manufacture_name = furi_string_get_cstr(manufacture_code->name);
return 1;
}
break;
@@ -240,7 +239,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning);
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name);
*manufacture_name = furi_string_get_cstr(manufacture_code->name);
return 1;
}
break;
@@ -248,7 +247,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
// Simple Learning
decrypt = subghz_protocol_keeloq_common_decrypt(hop, manufacture_code->key);
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name);
*manufacture_name = furi_string_get_cstr(manufacture_code->name);
return 1;
}
// Check for mirrored man
@@ -260,7 +259,7 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
}
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_rev);
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name);
*manufacture_name = furi_string_get_cstr(manufacture_code->name);
return 1;
}
//###########################
@@ -270,13 +269,13 @@ static uint8_t subghz_protocol_star_line_check_remote_controller_selector(
subghz_protocol_keeloq_common_normal_learning(fix, manufacture_code->key);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning);
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name);
*manufacture_name = furi_string_get_cstr(manufacture_code->name);
return 1;
}
man_normal_learning = subghz_protocol_keeloq_common_normal_learning(fix, man_rev);
decrypt = subghz_protocol_keeloq_common_decrypt(hop, man_normal_learning);
if(subghz_protocol_star_line_check_decrypt(instance, decrypt, btn, end_serial)) {
*manufacture_name = string_get_cstr(manufacture_code->name);
*manufacture_name = furi_string_get_cstr(manufacture_code->name);
return 1;
}
break;
@@ -355,7 +354,7 @@ bool subghz_protocol_decoder_star_line_deserialize(void* context, FlipperFormat*
return res;
}
void subghz_protocol_decoder_star_line_get_string(void* context, string_t output) {
void subghz_protocol_decoder_star_line_get_string(void* context, FuriString* output) {
furi_assert(context);
SubGhzProtocolDecoderStarLine* instance = context;
@@ -370,7 +369,7 @@ void subghz_protocol_decoder_star_line_get_string(void* context, string_t output
uint32_t code_found_reverse_hi = code_found_reverse >> 32;
uint32_t code_found_reverse_lo = code_found_reverse & 0x00000000ffffffff;
string_cat_printf(
furi_string_cat_printf(
output,
"%s %dbit\r\n"
"Key:%08lX%08lX\r\n"