Skip to content

Commit 05489fd

Browse files
committed
Merge branch 'dev' into release
2 parents 1b12526 + 319108b commit 05489fd

File tree

393 files changed

+8068
-5555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

393 files changed

+8068
-5555
lines changed

.pvsconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@
4444

4545
# Functions that always return the same error code
4646
//-V:picopass_device_decrypt:1048
47+
48+
# Examples
49+
//V_EXCLUDE_PATH applications/examples/

CHANGELOG.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
11
### New changes
22
* If you have copied apps into `apps` folder - remove `apps` folder on your microSD before installing this release to avoid issues!
3-
* SubGHz: Fixed timings for static CAME 12 bit and other types (fixed issue #280)
4-
* SubGHz: Fix #370 and fix other protocol counter issues
5-
* SubGHz: **Custom buttons for Nice Flor S / Somfy Telis (+Programming mode)** - now you can use arrow buttons to send signal with different button code
6-
* SubGHz: Somfy Telis -> Add manually (create new remote, now with programming button (Prog / 0x8) you can write it into receiver)
7-
* SubGHz: BFT Mitto -> Add manually (create new remote, now with programming button (0xF) you can write it into receiver)
8-
* SubGHz: Nice One -> Add manually (programming is possible using regular button)
9-
* SubGHz: More precise settings for debug counter increase value
10-
* Plugins -> MouseJacker: Features, Fixes and improvements (by @MatthisC | PR #366)
11-
* Plugins -> HC-SR04: Improve accuracy by measuring microseconds (by @clashlab | PR #367)
12-
* OFW PR: 2441 - Infrared: Fix hangups on repeated button press (by gsurkov)
13-
* OFW PR: 2440 - Fix navigation on unsupported card types (by Astrrra)
14-
* OFW: BadUSB UI fixes
15-
* OFW: Plugins: move to designated categories -> **We moved some plugins to new categories too**
16-
* OFW: Drivers: remove excessive check in bq25896 and make PVS happy
17-
* OFW: FuriHal, Power, UnitTests: fix, rename battery charging voltage limit API -> **Breaking API change, api was changed from 14.x to 15.x**
3+
* SubGHz: Default custom buttons layout for non standard remotes (for example your remote has broken buttons and transmit only 0xC, now you can use other buttons)
4+
* SubGHz: Fix issues with external module 5v power (now all works automatically, enabling +5v manually not required) (**Only for modules that work with 5v->3.3v converter!!!!!**)
5+
* SubGHz: Option to disable automatic 5v power for external modules - (5v is enabled by default, if you are using module without converter you can set this option to OFF)
6+
* SubGHz: Fix and update subghz protocols to use new error system
7+
* SubGHz: Fix default frequency being overwritten bug (Add manually fixes)
8+
* SubGHz: Fix 464Mhz and (390MHz for external module only) was showing up in Frequency analyzer all the time due to noise
9+
* iButton: Fix ibutton app - add manually - duplicate names
10+
* Plugins: NFC Magic fix - reinit nfc at app start
11+
* Plugins: Update **Unitemp - Temperature sensors reader** (DHT11/22, DS18B20, BMP280, HTU21x and more) [(by quen0n)](https://github.com/quen0n/unitemp-flipperzero)
12+
* Plugins: Update **SWD Probe** [(by g3gg0)](https://github.com/g3gg0/flipper-swd_probe)
13+
* Plugins: Massive plugins refactoring - not full refactoring, only small issues is fixed and moved all plugins to furi mutex instead of valuemutex
14+
* Plugins: Many small issues was found and fixed due mutex upgrade
15+
* Plugins: `Extra pack` updated and fixed (valuemutex to furi_mutex upgrade)
16+
* Plugins: SubGHz playlist - rewind (skip or play previous file) [(by alvarotorijano)](https://github.com/alvarotorijano/playListMod/blob/main/playlistMod.c)
17+
* Plugins: Properly rename unirf remix to subghz remote - And automatically migrate user files to new folder (unirf -> subghz_remote)
18+
* Plugins: Fix unirf freeze (protocol deserialize status ok) (by @Willy-JL | PR #375)
19+
* Plugins: Blackjack game: fix bug counting more than one ace (by @403-Fruit | PR #374)
20+
* Plugins: Update POCSAG Pager app to new error system
21+
* Plugins: Update iButton Fuzzer to new iButton system
22+
* Infrared: Update universal remote assets (by @amec0e | PR #378)
23+
* OFW: PicoPass: auth cleanup
24+
* OFW: More UI fixes and improvements
25+
* OFW: NFC: Support reading Mifare Classic key B from sector trailer, reading sector with B key where A key can't read block, Nfc Magic app not using NFC folder by default (in file select)
26+
* OFW: Remove ValueMutex -> **Breaking API change, api was changed from 17.x to 18.x**
27+
* OFW: Support reseting iCx cards
28+
* OFW: Fixed picopass load save file overrun
29+
* OFW: Fix SD card CID parsing
30+
* OFW: Archive browser: update path on dir leave
31+
* OFW: SubGhz: better and more verbose error handling in protocols, stricter CAME validation -> **Breaking API change, api was changed from 16.x to 17.x**
32+
* OFW: iButton system and app refactoring (+new protocols) -> **Breaking API change, api was changed from 15.x to 16.x**
1833
**(this will make your manually copied plugins not work, update them in same way you installed them, or delete `apps` folder and then install firmware, if you using extra pack builds (with `e` in version) all apps in _Extra will be updated automatically)**
1934

20-
* OFW: Fix incorrect type choise condition in image compressor
21-
* OFW: Updater: handle storage errors when removing files, fix folder remove routine, prevent unused services from starting
22-
* OFW: Unify power info, power debug, and device_info into one info command
23-
* OFW: SD Cache: moved to diskio layer, invalidation in case of error
24-
* OFW: Picopass: factory key support, minor code cleanup
35+
* OFW: New pin reset splashscreen
36+
* OFW: Getter for application data path
2537

2638
#### [🎲 Download latest extra apps pack](https://github.com/xMasterX/unleashed-extra-pack/archive/refs/heads/main.zip)
2739

applications/debug/keypad_test/keypad_test.c

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ typedef struct {
1111
uint16_t left;
1212
uint16_t right;
1313
uint16_t ok;
14+
FuriMutex* mutex;
1415
} KeypadTestState;
1516

1617
static void keypad_test_reset_state(KeypadTestState* state) {
@@ -22,7 +23,8 @@ static void keypad_test_reset_state(KeypadTestState* state) {
2223
}
2324

2425
static void keypad_test_render_callback(Canvas* canvas, void* ctx) {
25-
KeypadTestState* state = (KeypadTestState*)acquire_mutex((ValueMutex*)ctx, 25);
26+
KeypadTestState* state = ctx;
27+
furi_mutex_acquire(state->mutex, FuriWaitForever);
2628
canvas_clear(canvas);
2729
char strings[5][20];
2830

@@ -51,7 +53,7 @@ static void keypad_test_render_callback(Canvas* canvas, void* ctx) {
5153

5254
canvas_draw_str(canvas, 10, 63, "[back] - reset, hold to exit");
5355

54-
release_mutex((ValueMutex*)ctx, state);
56+
furi_mutex_release(state->mutex);
5557
}
5658

5759
static void keypad_test_input_callback(InputEvent* input_event, void* ctx) {
@@ -64,17 +66,17 @@ int32_t keypad_test_app(void* p) {
6466
FuriMessageQueue* event_queue = furi_message_queue_alloc(32, sizeof(InputEvent));
6567
furi_check(event_queue);
6668

67-
KeypadTestState _state = {{false, false, false, false, false}, 0, 0, 0, 0, 0};
69+
KeypadTestState state = {{false, false, false, false, false}, 0, 0, 0, 0, 0, NULL};
70+
state.mutex = furi_mutex_alloc(FuriMutexTypeNormal);
6871

69-
ValueMutex state_mutex;
70-
if(!init_mutex(&state_mutex, &_state, sizeof(KeypadTestState))) {
72+
if(!state.mutex) {
7173
FURI_LOG_E(TAG, "cannot create mutex");
7274
return 0;
7375
}
7476

7577
ViewPort* view_port = view_port_alloc();
7678

77-
view_port_draw_callback_set(view_port, keypad_test_render_callback, &state_mutex);
79+
view_port_draw_callback_set(view_port, keypad_test_render_callback, &state);
7880
view_port_input_callback_set(view_port, keypad_test_input_callback, event_queue);
7981

8082
// Open GUI and register view_port
@@ -83,7 +85,7 @@ int32_t keypad_test_app(void* p) {
8385

8486
InputEvent event;
8587
while(furi_message_queue_get(event_queue, &event, FuriWaitForever) == FuriStatusOk) {
86-
KeypadTestState* state = (KeypadTestState*)acquire_mutex_block(&state_mutex);
88+
furi_mutex_acquire(state.mutex, FuriWaitForever);
8789
FURI_LOG_I(
8890
TAG,
8991
"key: %s type: %s",
@@ -92,62 +94,62 @@ int32_t keypad_test_app(void* p) {
9294

9395
if(event.key == InputKeyRight) {
9496
if(event.type == InputTypePress) {
95-
state->press[0] = true;
97+
state.press[0] = true;
9698
} else if(event.type == InputTypeRelease) {
97-
state->press[0] = false;
99+
state.press[0] = false;
98100
} else if(event.type == InputTypeShort) {
99-
++state->right;
101+
++state.right;
100102
}
101103
} else if(event.key == InputKeyLeft) {
102104
if(event.type == InputTypePress) {
103-
state->press[1] = true;
105+
state.press[1] = true;
104106
} else if(event.type == InputTypeRelease) {
105-
state->press[1] = false;
107+
state.press[1] = false;
106108
} else if(event.type == InputTypeShort) {
107-
++state->left;
109+
++state.left;
108110
}
109111
} else if(event.key == InputKeyUp) {
110112
if(event.type == InputTypePress) {
111-
state->press[2] = true;
113+
state.press[2] = true;
112114
} else if(event.type == InputTypeRelease) {
113-
state->press[2] = false;
115+
state.press[2] = false;
114116
} else if(event.type == InputTypeShort) {
115-
++state->up;
117+
++state.up;
116118
}
117119
} else if(event.key == InputKeyDown) {
118120
if(event.type == InputTypePress) {
119-
state->press[3] = true;
121+
state.press[3] = true;
120122
} else if(event.type == InputTypeRelease) {
121-
state->press[3] = false;
123+
state.press[3] = false;
122124
} else if(event.type == InputTypeShort) {
123-
++state->down;
125+
++state.down;
124126
}
125127
} else if(event.key == InputKeyOk) {
126128
if(event.type == InputTypePress) {
127-
state->press[4] = true;
129+
state.press[4] = true;
128130
} else if(event.type == InputTypeRelease) {
129-
state->press[4] = false;
131+
state.press[4] = false;
130132
} else if(event.type == InputTypeShort) {
131-
++state->ok;
133+
++state.ok;
132134
}
133135
} else if(event.key == InputKeyBack) {
134136
if(event.type == InputTypeLong) {
135-
release_mutex(&state_mutex, state);
137+
furi_mutex_release(state.mutex);
136138
break;
137139
} else if(event.type == InputTypeShort) {
138-
keypad_test_reset_state(state);
140+
keypad_test_reset_state(&state);
139141
}
140142
}
141143

142-
release_mutex(&state_mutex, state);
144+
furi_mutex_release(state.mutex);
143145
view_port_update(view_port);
144146
}
145147

146148
// remove & free all stuff created by app
147149
gui_remove_view_port(gui, view_port);
148150
view_port_free(view_port);
149151
furi_message_queue_free(event_queue);
150-
delete_mutex(&state_mutex);
152+
furi_mutex_free(state.mutex);
151153

152154
furi_record_close(RECORD_GUI);
153155

applications/debug/text_box_test/text_box_test.c

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,17 @@ static void (*text_box_test_render[])(Canvas* canvas) = {
5353

5454
typedef struct {
5555
uint32_t idx;
56+
FuriMutex* mutex;
5657
} TextBoxTestState;
5758

5859
static void text_box_test_render_callback(Canvas* canvas, void* ctx) {
59-
TextBoxTestState* state = acquire_mutex((ValueMutex*)ctx, 25);
60+
TextBoxTestState* state = ctx;
61+
furi_mutex_acquire(state->mutex, FuriWaitForever);
6062
canvas_clear(canvas);
6163

6264
text_box_test_render[state->idx](canvas);
6365

64-
release_mutex((ValueMutex*)ctx, state);
66+
furi_mutex_release(state->mutex);
6567
}
6668

6769
static void text_box_test_input_callback(InputEvent* input_event, void* ctx) {
@@ -74,17 +76,17 @@ int32_t text_box_test_app(void* p) {
7476
FuriMessageQueue* event_queue = furi_message_queue_alloc(32, sizeof(InputEvent));
7577
furi_check(event_queue);
7678

77-
TextBoxTestState _state = {.idx = 0};
79+
TextBoxTestState state = {.idx = 0, .mutex = NULL};
80+
state.mutex = furi_mutex_alloc(FuriMutexTypeNormal);
7881

79-
ValueMutex state_mutex;
80-
if(!init_mutex(&state_mutex, &_state, sizeof(TextBoxTestState))) {
82+
if(!state.mutex) {
8183
FURI_LOG_E(TAG, "Cannot create mutex");
8284
return 0;
8385
}
8486

8587
ViewPort* view_port = view_port_alloc();
8688

87-
view_port_draw_callback_set(view_port, text_box_test_render_callback, &state_mutex);
89+
view_port_draw_callback_set(view_port, text_box_test_render_callback, &state);
8890
view_port_input_callback_set(view_port, text_box_test_input_callback, event_queue);
8991

9092
// Open GUI and register view_port
@@ -94,32 +96,32 @@ int32_t text_box_test_app(void* p) {
9496
uint32_t test_renders_num = COUNT_OF(text_box_test_render);
9597
InputEvent event;
9698
while(furi_message_queue_get(event_queue, &event, FuriWaitForever) == FuriStatusOk) {
97-
TextBoxTestState* state = acquire_mutex_block(&state_mutex);
99+
furi_mutex_acquire(state.mutex, FuriWaitForever);
98100

99101
if(event.type == InputTypeShort) {
100102
if(event.key == InputKeyRight) {
101-
if(state->idx < test_renders_num - 1) {
102-
state->idx++;
103+
if(state.idx < test_renders_num - 1) {
104+
state.idx++;
103105
}
104106
} else if(event.key == InputKeyLeft) {
105-
if(state->idx > 0) {
106-
state->idx--;
107+
if(state.idx > 0) {
108+
state.idx--;
107109
}
108110
} else if(event.key == InputKeyBack) {
109-
release_mutex(&state_mutex, state);
111+
furi_mutex_release(state.mutex);
110112
break;
111113
}
112114
}
113115

114-
release_mutex(&state_mutex, state);
116+
furi_mutex_release(state.mutex);
115117
view_port_update(view_port);
116118
}
117119

118120
// remove & free all stuff created by app
119121
gui_remove_view_port(gui, view_port);
120122
view_port_free(view_port);
121123
furi_message_queue_free(event_queue);
122-
delete_mutex(&state_mutex);
124+
furi_mutex_free(state.mutex);
123125

124126
furi_record_close(RECORD_GUI);
125127

applications/debug/unit_tests/furi/furi_test.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
// v2 tests
77
void test_furi_create_open();
8-
void test_furi_valuemutex();
98
void test_furi_concurrent_access();
109
void test_furi_pubsub();
1110

@@ -30,10 +29,6 @@ MU_TEST(mu_test_furi_create_open) {
3029
test_furi_create_open();
3130
}
3231

33-
MU_TEST(mu_test_furi_valuemutex) {
34-
test_furi_valuemutex();
35-
}
36-
3732
MU_TEST(mu_test_furi_pubsub) {
3833
test_furi_pubsub();
3934
}
@@ -51,7 +46,6 @@ MU_TEST_SUITE(test_suite) {
5146

5247
// v2 tests
5348
MU_RUN_TEST(mu_test_furi_create_open);
54-
MU_RUN_TEST(mu_test_furi_valuemutex);
5549
MU_RUN_TEST(mu_test_furi_pubsub);
5650
MU_RUN_TEST(mu_test_furi_memmgr);
5751
}

applications/debug/unit_tests/furi/furi_valuemutex_test.c

Lines changed: 0 additions & 41 deletions
This file was deleted.

applications/debug/unit_tests/rpc/rpc_test.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static void clean_directory(Storage* fs_api, const char* clean_dir) {
191191
size_t size = strlen(clean_dir) + strlen(name) + 1 + 1;
192192
char* fullname = malloc(size);
193193
snprintf(fullname, size, "%s/%s", clean_dir, name);
194-
if(fileinfo.flags & FSF_DIRECTORY) {
194+
if(file_info_is_dir(&fileinfo)) {
195195
clean_directory(fs_api, fullname);
196196
}
197197
FS_Error error = storage_common_remove(fs_api, fullname);
@@ -608,9 +608,8 @@ static void test_rpc_storage_list_create_expected_list(
608608
}
609609

610610
if(path_contains_only_ascii(name)) {
611-
list->file[i].type = (fileinfo.flags & FSF_DIRECTORY) ?
612-
PB_Storage_File_FileType_DIR :
613-
PB_Storage_File_FileType_FILE;
611+
list->file[i].type = file_info_is_dir(&fileinfo) ? PB_Storage_File_FileType_DIR :
612+
PB_Storage_File_FileType_FILE;
614613
list->file[i].size = fileinfo.size;
615614
list->file[i].data = NULL;
616615
/* memory free inside rpc_encode_and_send() -> pb_release() */
@@ -873,7 +872,7 @@ static void test_rpc_storage_stat_run(const char* path, uint32_t command_id) {
873872
if(error == FSE_OK) {
874873
response->which_content = PB_Main_storage_stat_response_tag;
875874
response->content.storage_stat_response.has_file = true;
876-
response->content.storage_stat_response.file.type = (fileinfo.flags & FSF_DIRECTORY) ?
875+
response->content.storage_stat_response.file.type = file_info_is_dir(&fileinfo) ?
877876
PB_Storage_File_FileType_DIR :
878877
PB_Storage_File_FileType_FILE;
879878
response->content.storage_stat_response.file.size = fileinfo.size;

0 commit comments

Comments
 (0)