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

@@ -13,13 +13,13 @@ bool subghz_scene_transmitter_update_data_show(void* context) {
SubGhz* subghz = context;
if(subghz->txrx->decoder_result) {
string_t key_str;
string_t frequency_str;
string_t modulation_str;
FuriString* key_str;
FuriString* frequency_str;
FuriString* modulation_str;
string_init(key_str);
string_init(frequency_str);
string_init(modulation_str);
key_str = furi_string_alloc();
frequency_str = furi_string_alloc();
modulation_str = furi_string_alloc();
uint8_t show_button = 0;
subghz_protocol_decoder_base_deserialize(
@@ -34,14 +34,14 @@ bool subghz_scene_transmitter_update_data_show(void* context) {
subghz_get_frequency_modulation(subghz, frequency_str, modulation_str);
subghz_view_transmitter_add_data_to_show(
subghz->subghz_transmitter,
string_get_cstr(key_str),
string_get_cstr(frequency_str),
string_get_cstr(modulation_str),
furi_string_get_cstr(key_str),
furi_string_get_cstr(frequency_str),
furi_string_get_cstr(modulation_str),
show_button);
string_clear(frequency_str);
string_clear(modulation_str);
string_clear(key_str);
furi_string_free(frequency_str);
furi_string_free(modulation_str);
furi_string_free(key_str);
return true;
}
@@ -94,7 +94,7 @@ bool subghz_scene_transmitter_on_event(void* context, SceneManagerEvent event) {
subghz->scene_manager, SubGhzSceneStart);
return true;
} else if(event.event == SubGhzCustomEventViewTransmitterError) {
string_set_str(subghz->error_str, "Protocol not\nfound!");
furi_string_set(subghz->error_str, "Protocol not\nfound!");
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowErrorSub);
}
} else if(event.type == SceneManagerEventTypeTick) {